Jump to content

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


Recommended Posts

Posted

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.

Posted
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!

  • 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
  • STORM is here!

    STORM supercharges Unity to render massive open AAA worlds—on mobile and desktop—up to 10 times faster.

    STORM is your go-to tool for game makers and studios who are serious about performance and profitability.

  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
×
×
  • Create New...