playMaker

Author Topic: Cant Pass GameObject variable [SOLVED]  (Read 1671 times)

johanesnw

  • Playmaker Newbie
  • *
  • Posts: 26
Cant Pass GameObject variable [SOLVED]
« on: January 13, 2014, 06:37:52 AM »
i have several global vars, but the GameObject type always reset to None whenever I load new level.
any solutions?
I have used don't destroy on load (but I think it doesn't have any use since variable shouldn't be destroyed on level load)

Im using it for my character selection

thanks
« Last Edit: January 13, 2014, 09:28:39 AM by johanesnw »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Cant Pass GameObject variable
« Reply #1 on: January 13, 2014, 07:43:35 AM »
Hi,

 They resolve to none likely because the gamobject is gone, isn't it?!

 Bye,

 Jean

johanesnw

  • Playmaker Newbie
  • *
  • Posts: 26
Re: Cant Pass GameObject variable
« Reply #2 on: January 13, 2014, 08:35:37 AM »
make sense. but I have them in prefab too.
so how to pass the object? or should I pass the name(string) instead?
then create them from given names?

EDIT:
solved it. thanks jean :)
I just make those objects persist on next scene, then destroy them after the objects has been used as reference.
« Last Edit: January 13, 2014, 09:31:52 AM by johanesnw »