Page 1 of 1

GetKeyValue passed null for baseValue when not reloading domain

Posted: Wed Oct 14, 2020 4:24 pm
by rakkar
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

Re: GetKeyValue passed null for baseValue when not reloading domain

Posted: Wed Oct 14, 2020 5:07 pm
by Tony Li
Thanks. I thought I had caught all static variables that had needed to be handled, but looks like I missed that one. I'll get that updated in the next version.