edited May 2016 in ORK Support
Hi guys, I just wanted to say that I love this framework... its amazing.

Ive come across something that is giving me a huge headache though.

I have an event in a Scene.... this event ends up destroying the game object attached to it (cube) and spawns another one in its place (a different cube) with a new (different) event.

The problem?

When i change scenes and return to that scene with the object that was added by the event... the original event object that the event is attached to (that was destroyed) reappears and it removes the newly spawned prefab.

Basically... what i need to do..

1) I need the original game object (with the event that spawns the new one) to not return (when changing scenes) unless the newly spawned prefab is destroyed.

Any advice would be appreciated.

(P.S. Its probably worth mentioning that i plan on having multiple of these cubes in a scene at a time. Im pretty sure I could use a global variable to prevent the other cube from coming back, but Its going to get messy that way for what im trying to do.. (atleast in my opinion) I guess its also worth mentioning that my target platform is mobile.. thanks.)
Post edited by ThatRainGuy on
  • edited May 2016
    Use an object variable to remember the state of the cubes. You can set the variable after the event fires (like setting a bool to true), and when the scene loads, only spawn the cube when then bool is equal to false.

    This tutorial talks about them a little bit.
    Post edited by Firrerreo on
    My little chunk of the internet: http://artemic.com
  • Wow. I figured i overlooked something simple. Its been a couple of months since I ran through all the tutorials, but I got it to work. Thank you.

    Next time I'll make sure my question isnt answered by tutorials....
Sign In or Register to comment.