Unity ECS 1.0 generated mesh not visible

I’ve been procedurally trying to generate voxel-chunk meshes in my game-scene in ECS 1.0.0-exp.12 (Unity 2022.2.0b16). In ECS 0.51, I was able to- but transitioning over caused the problem. As you can see, the mesh itself is being generated, but the render for it is not. Were there major rendering changes made to ECS 1.0? Is it something to do with scene tags? I’m truly lost. I would love some help on this and if any more information is needed, I’m happy to give it. Thank you.


Were there major rendering changes made to ECS 1.0?

Yes. Rendering backend changed. RenderMesh is gone, split into MaterialMeshInfo & RenderMeshArray.

Here is a documentation page on runtime mesh generation.

Entity entity = EntityManager.CreateEntity();
var desc = new RenderMeshDescription(shadowCastingMode: ShadowCastingMode.On, receiveShadows: true , renderingLayerMask:1 );
var renderMeshArray = new RenderMeshArray(
	new Material[] { myMaterial },
	new Mesh[] { myMesh }
);
RenderMeshUtility.AddComponents(entity, EntityManager, desc, renderMeshArray, MaterialMeshInfo.FromRenderMeshArrayIndices(0, 0));
// don't forget to initialize transform components (and aabb bounds in some procedural cases)

When upgrading from 0.51
you need to remove hybrid renderer package and add com.unity.entities.graphics in it’s place. You haven’t done this thus you are still seeing this obsolete RenderMesh component.

@andrew-lukasik helped answer a portion of the question, in which I also found out that my rendering layer mask, within the render filter settings, needed to be set to 1 instead of 0. It took me over 9 days to figure this out! Thanks for the help.

204002-cap222ture.png