Jump to content

Why does gena spawner remove unrelated monobehaviours from the spawned prefab object


Abdalla

Recommended Posts

Hi,

Gena spawner seems to delete all mono behaviours from spawned prefab object.

I have the root game object in the spawned prefab like this.

spacer.png

And I have a sub game object with a biome mask monobehaviour that gets removed when the object is spawned.

spacer.png

Here's the spawned object tree, and this _Sp_HomeAreaBiomeMask doesn't have the biome mask behaviour.

spacer.png

Thanks for advance.

Link to comment
Share on other sites

10 hours ago, Manny said:

Hey @Abdalla,

I can confirm this works by design. Due to how the decorator system functions, GeNa actually unpacks + reconstructs GameObjects when you spawn. This is so that GeNa can add variation to whatever you spawn in the scene. 

The good news is that there are definitely workarounds to what you're trying to do though! Instead of trying to spawn the object unpacked, you could put your HomeAreaBiomeMask GameObject into a Prefab and GeNa should spawn the object as a prefab instance! 

Give it a try and let me know if it works for you 😁

That worked, thank you!

Link to comment
Share on other sites

  • Adam locked and 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...