Playmaker Forum

Bug Reporting => PlayMaker Bug Reporting => Topic started by: ToxicBlob on February 17, 2012, 09:53:35 PM

Title: [FIXED] Global variable GameObject reset to null
Post by: ToxicBlob on February 17, 2012, 09:53:35 PM
My global variable GameObjects are resetting to null between Unity sessions.
Title: Re: Global variable GameObject reset to null
Post by: Alex Chouls on February 17, 2012, 09:57:32 PM
Global variables are a saved asset, like a prefab, so they can't reference scene objects. This is a Unity limitation. Actually the global variable edit field shouldn't let you pick a scene object... I'll look into that...

To be safe I would always use an FSM to initialize global variables when the game starts.
Title: Re: Global variable GameObject reset to null
Post by: Alex Chouls on May 09, 2012, 12:44:51 PM
Global variables should keep their default values now in 1.3.3.

They still, however, can't reference scene objects.