Hi, I have a very simple project with DOTS 1.0:
The “Test” GameObject has a simple component with a baker:
public class Comp : MonoBehaviour
{
}
struct CompData : IComponentData
{
}
public class CompBaker : Baker<Comp>
{
public override void Bake(Comp authoring)
{
Debug.LogWarning("BAKING: " + authoring.name);
AddComponent<CompData>();
}
}
The component is attached to the GameObject:
However, when I press play: nothing bakes.
The “TEST” GameObject is never converted to an entity.
In the Entities Hierarchy, I only see the original GameObject:
The old ConvertToEntity method still works fine though:
Am I supposed to use ConvertToEntity and Baker together?
Why does it never create anything?
Why is this getting no reply?
Well I was also confused, asked the same thing and nobody answers as well.
The docs does not mention when or what runs the baker.
But I found out you are supposed to put your GO into a subscene to convert them with the baker.
Gekigengar:
Why is this getting no reply?
Well I was also confused, asked the same thing and nobody answers as well.
The docs does not mention when or what runs the baker.
But I found out you are supposed to put your GO into a subscene to convert them with the baker.
Seems that way.
It does seem strange that every gameobject needs to be in a subscene now, but well
Perhaps unity either has a problem with empty objects or that CompData is not public.
But isn’t this the wrong forum for this question?
Oh damn you are right, this is not the DOTS forum