edited October 3 in Makinom Support
Hello -

I have an interaction machine on a gameobject which runs a schematic that changes the scene. When you click this object, it seems to add the object to the donotdestroy list and the object ends up in the new scene. Is there a way to have this not happen i.e. have the schematic run and the new scene load but not effect gameobject which the interaction machine component is on?

Thanks,
-Mike
Post edited by indoflaven on
  • The machine object is automatically kept alive during scene changes, but you can use a Destroy Object node before or after the scene change to remove it.

    Just make sure your machine component doesn't use Stop On Destroy or the schematic will be stopped by the destruction.
    If the scene change is the last thing of the schematic, you can also use the Machine End Action setting of the component to destroy or disable the machine object.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Okay - actually what I need is for the machine gameobject to not change its place in the hierarchy at all for reasons I won't go into (basically I restore an overworld map without reloading the scene). I'll probably work around this by writing a script rather than using the interaction machine, but it would be nice if this was an option because the interaction machine would have worked great otherwise. Food for thought.
    Thanks,
    -Mike
  • I'll look into it - maybe an option to not keep the machine object alive in the Load Scene node.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.