#[1.0.0-pre.65] Strip out redundant transform related components
1 messages · Page 1 of 1 (latest)
The Child component is automatically added/removed/maintained by the ParentSystem, and several other systems assume that it exists and use it to traverse entity hierarchies. If you're really okay with breaking all of that, you can set ParentSystem.Enabled to false to stop it from running entirely. But that's a pretty big step, not to be taken lightly.
Do u mean disable ParentSystem at runtime? Actually what I want is when I bake entity, at parent entity I want to keep all the transform related components except Child buffer and then its child entities I would like to remove all the transform related components except Parent component
Yes, I mean disabling ParentSystem at runtime. Child components aren't currently added at baking time (due to restrictions on serializing ICleanupBufferElementData and ICleanupComponentData), so the child components aren't added until the ParentSystem runs at runtime. If you subsequently remove them, they'll likely just get added again.
Seems like it's caused by can't bake ICleanupComponent/ICleanupBufferElementData into subscene. Any plan to improve this to make this new transform system better? Or introduce something like ExcludeUpdateChildEntityTransform component to make it dun add any transform related components like Child component at runtime system to update child entity transform components. I want to get similar behavior before 1.0 that at least able to strip out all unused transform components at child entities except Parent component to group entity at Entities Hierarchy. The main goal is to make transform system not running and to go through and update all the child entities transform components for nothing. But sadly currently I will get error spamming due to some transform components failed to strip out. If I remember correctly it's caused by Child component.
@low steeple Any plan to improve this new transform v2? I just want to get similar result before 1.0
yes, it is very actively under development. i have no thoughts about your particular questions because i'm not remotely a transform expert, but i do see significant transform prs going by frequently
🤔 Any new improvement for baker too? I guess maybe the main issue is at baker that can't strip out all the unnecessary transform components.
baking is also being worked on actively, but i don't know if in general stripping transform components is a focus for anybody or not. @fallow topaz might have an idea about that
Yes, a significant change just landed that should help bakers better express which transform components are required. It will allow you to express intents like "This entity will always be in world-space" or "This entity will never move" or even "This entity has no spatial representation at all, and does not require any transform components".
Thanks for the reply. Btw does official have any plan to make ICleanupComponent and ICleanupBufferElementData able to bake into entity instead of only able to add at runtime? I would like this to happen so Child component no longer required to add at runtime that directly bake into entity too
@sharp radish I would like to ask is this possible now at pre.65? If yes, how can I do it?
Basically I want to try to remove all the transform related components at all the child entities except Parent component.
But previously I believe is at pre.47, I will get error spamming that there's transform system trying to walkthrough and update all the child entities. Seems like I also need to remove some of redundant transform related components at parent entity. I'm not sure how it works at pre.65 now.
You want the children associated with a Parent, but not to have any transform data? What do you expect the association to do in this case?
The goal here is to group child entities into parent entity to make it easier to view at Entities Hierarchy until official has proper grouping tooling
While we support stripping hierarchies now, the issue is that we won't keep a Parent relationship either.
What you could do is mark all of those Entities transform usage in their Bakers as None, then add a Parent to the children yourself. This might get what you're looking for with the Hierarchy window
I see. How about this? Does it still adding Child component at runtime instead of at baker?
if every usage flag in the hierarchy is None, nothing will be added
Ok. So at pre.65 transform system no longer add and setup any transform related component at runtime anymore? This is current concern now that I can't have full control
If you use TransformUsageFlags.ManualOverride you can customise it with whatever you like
take a look at the API documentation around TransformUsageFlags for a good explanation
I successfully remove all the transform related components at child entity and preserve Parent component but sadly due to current transform system design, it will have error spamming. Will need official to fix this issue