GetKeyValue passed null for baseValue when not reloading domain
Posted: Wed Oct 14, 2020 4:24 pm
If in Project Settings / Editor / Enter Play Mode Settings if you check Enter Play Mode Options (Experimental) and uncheck Reload domain, then the condition Dialog[thisID].SimStatus ~= "WasDisplayed" will fail if you play the same conversation twice without changing code or restarting the editor.
To fix this, it is necessary to reset any static variables as follows:
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
static public void SubsystemRegistrationInit()
{
// Clear static variables
}
Error is "Lookup of field '6' in the table element failed because the table element itself isn't in the table.
Cause: baseValue is NULL when passed to GetKeyValue in LuaValue.cs
As noted, changing code will reset all global static variables, and after doing so GetKeyValue will work correctly for one additional run.
Using Unity 2019.4.12f1
Dialogue System 2.2.9
To fix this, it is necessary to reset any static variables as follows:
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
static public void SubsystemRegistrationInit()
{
// Clear static variables
}
Error is "Lookup of field '6' in the table element failed because the table element itself isn't in the table.
Cause: baseValue is NULL when passed to GetKeyValue in LuaValue.cs
As noted, changing code will reset all global static variables, and after doing so GetKeyValue will work correctly for one additional run.
Using Unity 2019.4.12f1
Dialogue System 2.2.9