Jump to content

GeNa One Child Of Decorator no longer functions following update?


FoxTheDog
 Share

Go to solution Solved by Manny,

Recommended Posts

I really cant figure this one out. After updating GeNa Pro to 3.3.16, my prototypes that used the One Child Of decorator started misbehaving. The behavior was erratic, so I re-made the prototypes. Now, I can't get the decorator to select from one of several child ga meobjects at all.  The parent gameobject has an 'Unpacker' decorator on it. Basically, I have a grid of gameobjects, each that have several prefabs as children. I was successfully using this structure before to randomly select a few of those gameobjects to spawn, then to only spawn one of the children within that gameobject. 

Now, I can get the chance of decorator to work (30% chance of each gameobject spawning), but once that occurs, all 10 or so of the child gameobjects spawn. 

Did this workflow change, or am I doing something wrong?

 

Thanks for any help you can provide.

 

OCOD.JPG

Edited by FoxTheDog
*removed duplicate screenshot
Link to comment
Share on other sites

I use a similar structure for a few prototypes in my project. In this case, I've got 12 or so loot spawn locations in a grid (the grid is the CargoElements parent GO. Each potential loot spawn is a prefab (SolidCommodity) with one of each of the potential loot objects as children. 

Desired (previous) behavior, n of k SolidCommodity GO's spawn, given the ChanceOf decorator. For each spawned SolidCommodity, 1 of k loot elements spawn, given the OneChildOf decorator. 

This CargoElements GO had been pretty deeply nested in other spawning rules when things stopped working. I isolated it, then rebuilt it, and still see the same issue. Currently, the n of k selection is working (ChanceOf decorator works), but k of k children spawn as well (OneChildOf decorator doesnt seem to take effect).

When I upgraded GeNa, I also noticed I had to do some rebuilding of the spawners. Notably in some cases GeNa would spawn something.. but no meshes would be present. The GO hierarchy that GeNa makes under the Gaia terrain object matched the intended prototype, but everything was empty. Terrain decorators would still work, that was it. Rebuilding not just the spawners, but the actual prefabs I was ingesting was the required fix. This specific OneChildOf issue persisted though.

Still having issues with bounds as well, but it looks like its limited to prefabs that have LOD groups? I dont know enough yet to write the post - it just felt somehow related. 

Thanks for all the work on these fixes, its super appreciated.

PrototypeHierarchy.png

Link to comment
Share on other sites

  • Solution
On 2/14/2022 at 3:00 PM, FoxTheDog said:

I use a similar structure for a few prototypes in my project. In this case, I've got 12 or so loot spawn locations in a grid (the grid is the CargoElements parent GO. Each potential loot spawn is a prefab (SolidCommodity) with one of each of the potential loot objects as children. 

Desired (previous) behavior, n of k SolidCommodity GO's spawn, given the ChanceOf decorator. For each spawned SolidCommodity, 1 of k loot elements spawn, given the OneChildOf decorator. 

This CargoElements GO had been pretty deeply nested in other spawning rules when things stopped working. I isolated it, then rebuilt it, and still see the same issue. Currently, the n of k selection is working (ChanceOf decorator works), but k of k children spawn as well (OneChildOf decorator doesnt seem to take effect).

When I upgraded GeNa, I also noticed I had to do some rebuilding of the spawners. Notably in some cases GeNa would spawn something.. but no meshes would be present. The GO hierarchy that GeNa makes under the Gaia terrain object matched the intended prototype, but everything was empty. Terrain decorators would still work, that was it. Rebuilding not just the spawners, but the actual prefabs I was ingesting was the required fix. This specific OneChildOf issue persisted though.

Still having issues with bounds as well, but it looks like its limited to prefabs that have LOD groups? I dont know enough yet to write the post - it just felt somehow related. 

Thanks for all the work on these fixes, its super appreciated.

PrototypeHierarchy.png

I can see the problem now. You need to use a prefab unpacker decorator on the objects that you're using a OneChildOf Decorator. Otherwise, GeNa will treat them as one prefab and spawn them all. 

Also, as of the new update, you don't necessarily need to add a 'Prefab Unpacker Decorator' instead you can just select 'Unpack Prefab' under the Common tab in the decorator.
image.png

Link to comment
Share on other sites

Good grief! The simplest fixes. Thanks for the input, sorry it was such a simple fix =P Either adding the decorator or checking 'Unpack Prefab' worked. 

Much obliged!

  • Like 1
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
 Share

×
×
  • Create New...