Jump to content

GeNa preserve game object...


zumwaltwood
Go to solution Solved by Manny,

Recommended Posts

Not entirely sure what that script does but can you please remove the "donotdestroyonload" for it? Every time I switch scenes back and forth it is duplicating itself, only option I have is to delete GeNa from the scene once I am done with developing the scene the way I want, if I leave it on, it is constantly adding another copy of itself in the do not destroy list.  All of the tools should stay with the given scene and not keep making copies of themself to other scenes, that would be a great change, the work around for now is for me to just delete GeNa component from the scene before testing in the game.

Link to comment
Share on other sites

Hi, I checked and I can confirm that those GeNa objects do get added to "DontDestroyOnLoad". I'm not that deeply involved with GeNa development, but I assume it is this way because GeNa does work for runtime spawning as well and then needs some objects that survive a scene change. However it does not sound correct to me that those objects duplicate themselves then, I will check back with the team to see if that is intended behavior and / or if it can be changed.
It will probably take a bit to get a reply back from team as we are officially still on vacation until after the new years weekend.

Tagging @Manny for visibility.

Link to comment
Share on other sites

If they then can move the EventSystem to the scene root so it is a shared EventSystem instead of placing it on the UI element that is preferred, or simply do not tie it to the EventSystem at all, plus do it as a singleton, I totally understand the vacation thing, I use this time to try to build up the game more, didn't expect many answers to questions during your down time, I appreciate what you give when you can. I am rebuilding some scense that I built without GAIA And GeNa now using those tools, but having GeNa keep duplicating itself from scene to scene is rather annoying.  I figured I would wait on a response about how you can resolve it in the source before I try to write a single script that looks for GeNa on start and deletes it from the scene if it finds more than 1, probably have to write that as a post load event.  Thanks again.

  • Like 1
Link to comment
Share on other sites

  • Solution

Hey there @zumwaltwood,
I actually had someone else request a similar modification to the PreserveGameObject script. 

The behaviour is intended to keep a single instance of the GeNa root object (including the GeNa Manager child) working across multiple scenes.

Therefore, the final script behaviour has been modified to destroy any other instances of that script in the scene (only at Runtime).

This has been tested in a fair few scenarios.
image.png.03e473c14883928b171d78767ffe4961.png

This has been included in the upcoming version of GeNa (3.3.15) 

  • Like 1
Link to comment
Share on other sites

  • Ben Black locked this topic
  • Adam unlocked this topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

×
×
  • Create New...