GetKeyValue passed null for baseValue when not reloading domain

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
rakkar
Posts: 51
Joined: Mon Jan 13, 2020 10:39 pm

GetKeyValue passed null for baseValue when not reloading domain

Post 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
Attachments
DSFUCallstack1.PNG
DSFUCallstack1.PNG (119.28 KiB) Viewed 224 times
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: GetKeyValue passed null for baseValue when not reloading domain

Post 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.
Post Reply