A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Introducing the new Universal Render Pipeline and High Definition Render Pipeline subforums!
Unity 2019.3 Beta is out now.
Discussion in 'Data Oriented Technology Stack' started by Joachim_Ante, Mar 4, 2019.
@Quantum1000 Does is also separate women and girls?
All this separation......Why?....
Bear with me on the phrasing of this question -
With entity conversion/prefab referencing is it an issue that prefabs seem to be, for lack of a better term, "unique" when there are multiple of the same type, originating from multiple entities that also pretty much the same?
Example: I have a "Door" entity, that can be destroyed. Stored on it is a buffer of five "Destroyed door entity prefabs". But if I make a duplicate of that Door entity, for its own buffer are five different(but same) Destroyed door entity prefabs.
How do I go about making it so that I'm not just needlessly creating extra entities for something like this? This situation isn't such a big deal for one off objects, but if say I wanted every part of the game to feature destruction like this wouldn't it be inefficient to have this kind of a situation?
It's not that I try to troll you, that was the pure question. There was no solid line to separate between it inherently both in prefab and subscene or in man and boy so we should have put more thought about use case scenario and definition
This is somewhat of a complex question. I'll have to find some time to put together a test, but my suspicion is that if you have multiple GameObjects in your scene each at the root of the scene being converted to an entity there will be duplicate prefab entities created.
If my assumption is correct putting the doors as a child of an object in your scene and having them all convert as part of the same hierarchy should yield non-duplicate prefab entities. It's a bit of a hacky solution to be honest, but that said if you then convert that to a subscene that can be loaded you'll gain a little in startup time.
SubScenes can be preconverted to ECS representation so you never need to load the GameObject representation at runtime. These SubScene ECS forms can be streamed in very efficiently at runtime. Prefabs are stored as GameObjects inside of bundles (and also stored in the Scene iirc). You can convert a GameObject prefab to an ECS prefab but this happens at runtime.