#Prefabs with baking behavior exist perpetually in subscene editor
1 messages · Page 1 of 1 (latest)
losing my marbles, i desparately need those two objects to not show up automatically at runtime 😭
Blue means they are Prefabs (they have the Prefab tag)
the white versions below them are instance values
it looks to me your spawner has a reference to a gameobject prefab converted to an entity
that reference is the blue entity you see
when you spawn it, the instantiated copy is the white entity but the entity prefab still exists
I'm following so far, It is true i convert a GameObject reference into an Entity reference so that I may spawn more of them later- is there a different variable type I should use if I don't want it to automatically store a copy of the reference?
you have to store a copy
otherwise your spawner can't instantiate it
otherwise what's it spawning?
well, one prefab is a single hexagon (it creates a grid as you saw before, but one extra hexagon does not necessarily do too much damage), but the other is a trigger which grows and affects said hexagons- which means starting the simulation with one already in motion is problematic
the blue object isn't in your simulation
any object with the Prefab tag is ignored from entity queries unless you specifically include it
by doing .WithOptions(EntityQueryOptions.IncludePrefab)
these blue objects will appear in no system queries and will not be simulated
they are prefabs, not part of the simulation
that's really strange because as of this moment, I can say without a doubt that the one prefab trigger is in fact affecting the hexes in the grid (that's what compelled me to open up my hierarchy)
what you're saying is making a whole lot of sense to me, but i'm seeing silliness in my scene XD
Would this return prefab entities as well? It doesn't seem to say so in the manual
hmm never used it
seems like an odd method to use tbh for anything
but it seems like it
I'm rewriting it now to use a more conventional query, fingers crossed!
it seems like it only doesn't return system and meta entities
this is definitely something you shouldn't use outside some type of editor tooling
(or some world serialization thing)
That makes alot of sense, I'll abstain until I know what i'm doing XD