Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - tonyoakden

Pages: [1]
PlayMaker Tips & Tricks / accessing persistent objects between scenes
« on: August 02, 2012, 05:17:32 PM »
Hello,  I'm new to this forum so I apologise if this topic has been covered before.

I'm instantiating a game object in the first scene of my game and I'm making it persistent in it's start script thus: "DontDestroyOnLoad (transform.gameObject);"

which works fine.  I can access it from playmaker in that first scene but I need to access it from playmaker in subsequent scenes.  Because the object isn't part of the hierarchy of objects in the next scene I'm not sure of the best way to do that.  I suppose I could find the object in a script which is attached to playmaker by searching for it by name but that seems a bit clumsy. Any ideas?



Pages: [1]