playMaker

Author Topic: [SOLVED] send event from one scene to another scene  (Read 2954 times)

cenab

  • Playmaker Newbie
  • *
  • Posts: 16
    • View Profile
[SOLVED] send event from one scene to another scene
« on: May 22, 2014, 05:28:07 AM »
Hello,i want to make like this ,but how send event to another scene create game object ,i try use global event,but it is not working

the first scene player can choose one character
i am also trying to make like this
first i made all prefabs for character
second i put the send global event
it is seen to another scene but not working
for the secend scene i made that if this global event recieve create gameobject
gameobject-it is going to be character prefabs
« Last Edit: May 23, 2014, 02:12:01 PM by Lane »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2488
  • Yup.
    • View Profile
    • Cleverous
Re: send event from one scene to another scene
« Reply #1 on: May 22, 2014, 06:12:00 AM »
You can use the DontDestroyOnLoad action on the character GameObject and it will persist through the scenes.

cenab

  • Playmaker Newbie
  • *
  • Posts: 16
    • View Profile
Re: send event from one scene to another scene
« Reply #2 on: May 22, 2014, 12:34:48 PM »
i am already try it
it is not working too

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2488
  • Yup.
    • View Profile
    • Cleverous
Re: send event from one scene to another scene
« Reply #3 on: May 22, 2014, 01:26:17 PM »
Can you post your scene or some screenshots of your setup?

cenab

  • Playmaker Newbie
  • *
  • Posts: 16
    • View Profile

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2488
  • Yup.
    • View Profile
    • Cleverous
Re: send event from one scene to another scene
« Reply #5 on: May 23, 2014, 04:18:16 AM »
The DontDestroyOnLoad action needs to be on any object you want to survive between scenes. You also have to tell it to load the next scene from in the game, (in case you were just double clicking another scene) and I can't really see whats happening in those screenshots.

cenab

  • Playmaker Newbie
  • *
  • Posts: 16
    • View Profile
Re: send event from one scene to another scene
« Reply #6 on: May 23, 2014, 07:07:40 AM »
there is not have another variant to send event from scene to another?

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2488
  • Yup.
    • View Profile
    • Cleverous
Re: send event from one scene to another scene
« Reply #7 on: May 23, 2014, 07:12:58 AM »
There is only one active scene at a time, so the way to pass information between them at runtime is by using DontDestroyOnLoad so that the entire object persists to the next loaded scene.

cenab

  • Playmaker Newbie
  • *
  • Posts: 16
    • View Profile
Re: send event from one scene to another scene
« Reply #8 on: May 23, 2014, 07:20:50 AM »
i am working with mobile game
that is why i am a liitle afraid that 2 scene can make lag

cenab

  • Playmaker Newbie
  • *
  • Posts: 16
    • View Profile
Re: send event from one scene to another scene
« Reply #9 on: May 23, 2014, 01:05:15 PM »
perfect i done it like this
1)make game object and add fsm
2) if one character choosen send event + dont destroy action and another action load level + wait+create game object ...destroy self