Jump to content

Prefab Unpacker decorator spawns objects without render and material components


gphysono
Go to solution Solved by Bryan,

Recommended Posts

I am using Unity 2021.3.10f1 and Gena Pro 3.5.2-c5
I have a model comprised of a hierarchy of game objects. Then I create a empty game object and move the model under it. I attach the prefab unpacker to the empty game object and make a prefab of it all.
I put the prefab into a Spawner and inspect it - I see all the game objects as expected (so it seems the unpack decorator is working?)
HOWEVER, when I run the spawner, the resulting objects are invisible because the mesh render and material component for every object isn't there.

Aside from that, everything else works fine...
 

Thanks!

 

Link to comment
Share on other sites

  • Solution

Hi there,

Ah, I see where the confusion is coming from. The Prefab Unpacker Decorator Component is intended for unpacking prefabs nested within other prefabs and making them individually spawnable in GeNa.

When you put these prefabs into a GeNa spawner, GeNa actually creates a Prototype Resource from each prefab. This includes any decorators but does not include non-decorator components like Mesh Renderers and Colliders. As a result, your objects appear invisible when spawned because those components aren't being recreated.

To put it simply, GeNa doesn't recreate the entire component list of the original game objects. Instead, it maintains the prefab hierarchy when spawning.

For a better understanding, you can check out this video around the 5-minute mark:

Hope this clears things up! Let me know if you have any further questions.

Link to comment
Share on other sites

Thank you for the reply and solution.

I was confusing the function of the unpack decorator with the Unity unpack function.

I re-organized my model structure to be "a prefab of prefabs" and it now it handles perfectly!

Link to comment
Share on other sites

No problem, always happy to help. 
If you are satisfied with the product and support please don't forget to leave a review on the Unity asset store! 
 

Link to comment
Share on other sites

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...