#How do you make runtime instanced entities selectable in the SCENE VIEW?
1 messages · Page 1 of 1 (latest)
it should just work, does the entity exist in the same space as the prefab?
No, I am basically rendering a bunch of cubes from a prefab, but when I select one of the "new cubes" it selects all of them, and the inspector does not show me Entity Data, just prefab data. If I select it in the Entities Hierarchy it does work.
And in the Authoring component:
CubePrefab= GetEntity(authoring.Prefab, TransformUsageFlags.WorldSpace | TransformUsageFlags.Renderable | TransformUsageFlags.Dynamic),
And inside a system
for (int i = 0; i < 5000; i++)
{
var e = ecb.Instantiate(outpost.ValueRO.CubePrefab);
ecb.AddComponent(e, new LocalTransform()
{
Position = i * 5,
Rotation = quaternion.identity,
Scale = 1
});
ecb.SetName(e, $"Cube{i}");
}