Search Unity

Objects not redering in build

Discussion in 'Entity Component System' started by davidfrk, Oct 15, 2018.

  1. davidfrk

    davidfrk

    Joined:
    Feb 13, 2017
    Posts:
    43
    Objects are rendering in editor but not in build.

    I saw some examples using TransformMatrix, but the name is not recognized. I think it should be in Unity.Transforms.

    Maybe it's another component now? Am I missing something?


    Code (CSharp):
    1.  
    2. particleArchetype = entityManager.CreateArchetype(
    3.   ComponentType.Create<Position>(),
    4.   ComponentType.Create<Speed>(),
    5.   ComponentType.Create<MeshInstanceRenderer>());
    6.  
    7. Entity particle = entityManager.CreateEntity(particleArchetype);
    8.  
    9. entityManager.SetComponentData(particle, new Position { Value = position});
    10. entityManager.SetComponentData(particle, new Speed { Value = velocity });
    11. entityManager.SetSharedComponentData(particle, new MeshInstanceRenderer()
    12. {
    13.   mesh = particleMesh,
    14.   material = particleMaterial
    15. });
     
  2. davidfrk

    davidfrk

    Joined:
    Feb 13, 2017
    Posts:
    43
    TransformMatrix is now LocalToWorld, but this is not the problem.

    EndFrameTransformSystem is not being called. Should it run on build?
     
    Last edited: Oct 15, 2018