playMaker

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

cenab

  • Playmaker Newbie
  • *
  • Posts: 16
[SOLVED] send event from one scene to another scene
« on: May 22, 2014, 08: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, 05:12:01 PM by Lane »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: send event from one scene to another scene
« Reply #1 on: May 22, 2014, 09:12:00 AM »
You can use the DontDestroyOnLoad action on the character GameObject and it will persist through the scenes.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

cenab

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

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: send event from one scene to another scene
« Reply #3 on: May 22, 2014, 04:26:17 PM »
Can you post your scene or some screenshots of your setup?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

cenab

  • Playmaker Newbie
  • *
  • Posts: 16

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: send event from one scene to another scene
« Reply #5 on: May 23, 2014, 07: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.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

cenab

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

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: send event from one scene to another scene
« Reply #7 on: May 23, 2014, 10: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.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

cenab

  • Playmaker Newbie
  • *
  • Posts: 16
Re: send event from one scene to another scene
« Reply #8 on: May 23, 2014, 10: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
Re: send event from one scene to another scene
« Reply #9 on: May 23, 2014, 04: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