Example #1
0
 public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem)
 {
     if (!conversionSystem.TryGetBuildConfigurationComponent <DotsRuntimeBuildProfile>(out var _))
     {
         return;
     }
     Unity.Tiny.Rendering.MeshRenderer mr = dstManager.GetComponentData <Unity.Tiny.Rendering.MeshRenderer>(entity);
 }
Example #2
0
 public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem)
 {
     if (!conversionSystem.TryGetBuildSettingsComponent <DotsRuntimeBuildProfile>(out var _))
     {
         return;
     }
     Unity.Tiny.Rendering.MeshRenderer mr = dstManager.GetComponentData <Unity.Tiny.Rendering.MeshRenderer>(entity);
     dstManager.AddComponent <DynamicMaterial>(mr.material);
 }
Example #3
0
        public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem)
        {
            MeshRenderer meshRenderer = dstManager.GetComponentData <MeshRenderer>(entity);

            dstManager.AddComponent <DynamicMaterial>(meshRenderer.material);
        }