playMaker

Author Topic: Global GameObject variable  (Read 2436 times)

weilies

  • Junior Playmaker
  • **
  • Posts: 74
Global GameObject variable
« on: February 24, 2015, 07:24:01 PM »
Dear gurus,

I have a global gameObject which holding a value. I realized the value lost everytime Load Level (trafer to another scene).

How can i keep holding the GameObject from scene to scene?

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: Global GameObject variable
« Reply #1 on: February 24, 2015, 08:05:46 PM »
Dear non-guru,
     A global variable holds it's value form scene to scene.  You could probably take some screen shots showing the state, variable and values so that us guru types who barely get what you are asking can help.  Windows comes with a snipping tool.  That way you can snag a shot of the area and quickly upload it.  However form your description, it's impossible to say.  Are you sure it's a global variable?

weilies

  • Junior Playmaker
  • **
  • Posts: 74
Re: Global GameObject variable
« Reply #2 on: February 24, 2015, 11:19:17 PM »

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: Global GameObject variable
« Reply #3 on: February 25, 2015, 01:32:56 PM »
Reply to this thread and include the screenshots here.

justifun

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 280
Re: Global GameObject variable
« Reply #4 on: February 27, 2015, 04:19:03 AM »
It appears that your object prefab link is broken (as indicated by the fact that the text is brown in your hierarchy tab.

weilies

  • Junior Playmaker
  • **
  • Posts: 74
Re: Global GameObject variable
« Reply #5 on: February 27, 2015, 07:41:14 PM »
Oh Justifun, thank for the highlight!

anyway, i change my approache abit. Now i assign the values which suppose to bring over to next scene into multiple global variable instead of passing over the game object. :)