playMaker

Author Topic: Object not loading  (Read 1497 times)

mathius777

  • Playmaker Newbie
  • *
  • Posts: 38
Object not loading
« on: June 08, 2013, 06:34:11 PM »
I have a Load script that calls Create Object, and I create multiple game objects from prefabs. When I load a level, load gets called and creates the global objects I have saved(gInputManager, gCamera). This all works fine. However, when the player enters a door and loads a new level, the new level(which has the same Load prefab on it) loads ONLY the gCamera. The gInputManager is never loaded, and so the player can't move after changing levels. I cannot figure out why it would load one global object but not the other. Any ideas? Thank you.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Object not loading
« Reply #1 on: June 10, 2013, 02:04:09 AM »
Hi,

 It's because when you load a scene, it destroys everything and load a new scene fresh.

 you have several options here.

 load additivly, that is when you load a new scene it will "add" to the existing content.

or you can mark objects as "don't destroy on Load", there is an action for this.

bye,

 Jean