#MaterialProperty component on multiple submeshes.
1 messages · Page 1 of 1 (latest)
How do i bake this? is there a way to add this component on every additional entity?
You can bake using baking systems
find all relevant entities and give them all proper components
Not a lot of people work with submeshes anyway, can't you just bake it as separate children?
No, it is not my asset
But how do i find all relevant entities in a baking?
It is an asset from asset store
well, first - try to take a look at result of baking in hierarchy inspector
maybe it'll be clear enough
this is how it looks like
But i can`t get this entities on a baker
can i?
there is only this
Is it even possible with a system adding it at runtime?
[WithNone((typeof(MaterialMeshInfo)))]
public partial struct AddIsometricCullOnHierarchiesJob : IJobEntity
{
public EntityCommandBuffer CommandBuffer;
[BurstCompile(CompileSynchronously = true)]
public void Execute(in DynamicBuffer<Child> child, in IsometricCullComponent cull, Entity e)
{
CommandBuffer.RemoveComponent<IsometricCullComponent>(e);
CommandBuffer.RemoveComponent<MaterialOpacityComponent>(e);
for (int it = 0; it < child.Length; ++it)
{
CommandBuffer.AddComponent(child[it].Value, cull);
CommandBuffer.AddComponent(child[it].Value, new MaterialOpacityComponent() { Value = 1.0f });
}
}
}```
i tried this but they are not Child ;c
How can i know this?
Nothing works, not even LinkedEntityGroup