Post by magique on Jan 2, 2018 1:53:41 GMT
Are you doing something different with PlayerPrefs in the new version? Everything was working fine for me on the Wii U until this latest version. After updating, I'm now getting errors when running on the Wii U:
NullReferenceException: Object reference not set to an instance of an object
at PreviewLabs.PlayerPrefs.Deserialize () [0x00000] in <filename unknown>:0
at PreviewLabs.PlayerPrefs..cctor () [0x00000] in <filename unknown>:0
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for PreviewLabs.PlayerPrefs
at DarkTonic.CoreGameKit.InGameWorldVariable.get_CurrentIntValue () [0x00000] in <filename unknown>:0
at DarkTonic.CoreGameKit.InGameWorldVariable.set_CurrentIntValue (Int32 value) [0x00000] in <filename unknown>:0
at DarkTonic.CoreGameKit.WorldVariableTracker.Init () [0x00000] in <filename unknown>:0
at DarkTonic.CoreGameKit.WorldVariableTracker.Awake () [0x00000] in <filename unknown>:0
It's happening when I try to get a couple of values as follows:
_healthVar = WorldVariableTracker.GetWorldVariable("Health");
_livesVar = WorldVariableTracker.GetWorldVariable("Lives");
I had seen this sort of thing before when the World Variables were initially set to remember their state. I got around it by changing them all to reset to starting values. But now it's doing this even when I have them set to reset to starting values. I don't need to use the saving/restoring capability of Core GameKit so it would be useful if I could just insure that it doesn't ever try to read or write world variables to PlayerPrefs at all. Is there some way to stop it from making these calls?
NullReferenceException: Object reference not set to an instance of an object
at PreviewLabs.PlayerPrefs.Deserialize () [0x00000] in <filename unknown>:0
at PreviewLabs.PlayerPrefs..cctor () [0x00000] in <filename unknown>:0
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for PreviewLabs.PlayerPrefs
at DarkTonic.CoreGameKit.InGameWorldVariable.get_CurrentIntValue () [0x00000] in <filename unknown>:0
at DarkTonic.CoreGameKit.InGameWorldVariable.set_CurrentIntValue (Int32 value) [0x00000] in <filename unknown>:0
at DarkTonic.CoreGameKit.WorldVariableTracker.Init () [0x00000] in <filename unknown>:0
at DarkTonic.CoreGameKit.WorldVariableTracker.Awake () [0x00000] in <filename unknown>:0
It's happening when I try to get a couple of values as follows:
_healthVar = WorldVariableTracker.GetWorldVariable("Health");
_livesVar = WorldVariableTracker.GetWorldVariable("Lives");
I had seen this sort of thing before when the World Variables were initially set to remember their state. I got around it by changing them all to reset to starting values. But now it's doing this even when I have them set to reset to starting values. I don't need to use the saving/restoring capability of Core GameKit so it would be useful if I could just insure that it doesn't ever try to read or write world variables to PlayerPrefs at all. Is there some way to stop it from making these calls?