I'm having trouble instantiating objects - with or without a transform component, the objects never show up in the Hierachy - instead i get an entry for Unity.Rendering.PushBlendWeightSystem. If i go and expect that, it seems the underlying GameObject is None.
[Serializable]
public class CellConfiguration
{
public int Id;
public int NumberOfCells;
public GameObject Prefab;
}
public class CellSpawnerMono : MonoBehaviour
{
public float2 Dimension;
public float Speed;
[SerializeReference]
public List<CellConfiguration> CellConfigurations;
}
public class CellSpawnerBaker : Baker<CellSpawnerMono>
{
public override void Bake(CellSpawnerMono authoring)
{
var list = new NativeList<CellConfigurationProperties>(Allocator.Temp);
authoring.CellConfigurations.ForEach(a =>
{
var ccp = new CellConfigurationProperties
{
Id = a.Id,
NumberOfCells = a.NumberOfCells,
Prefab = GetEntity(a.Prefab)
};
list.Add(ccp);
});
AddComponent(new WorldProperties
{
Dimension = authoring.Dimension,
Speed = 42f,
Properties = list.ToArray(Allocator.Persistent)
});
}
}