Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

ECS (DOTS) Created mesh not visible

Discussion in 'Entity Component System' started by Wrymnn, Sep 12, 2022.

  1. Wrymnn

    Wrymnn

    Joined:
    Sep 24, 2014
    Posts:
    352
    Trying to use Unity ECS DOTS, but getting following message in a console:

    "No SRP present, no compute shader support, or running with -nographics. Hybrid Renderer disabled"

    Unity version: 2021.3.9f1 LTS

    When creating an entity with mesh from the code, I see no cube. But the Entity with valid components is present:

    upload_2022-9-12_13-47-16.png

    Code (CSharp):
    1.  
    2. public class Creator : MonoBehaviour
    3. {
    4.     public Mesh mesh;
    5.     public Material material;
    6.  
    7.     private void Start()
    8.     {
    9.         EntityManager entityManager = World.DefaultGameObjectInjectionWorld.EntityManager;
    10.         EntityArchetype archetype = entityManager.CreateArchetype(
    11.             typeof(Transform),
    12.             typeof(Rotation),
    13.             typeof(RenderMesh),
    14.             typeof(RenderBounds),
    15.             typeof(LocalToWorld)
    16.         );
    17.         Entity entity = entityManager.CreateEntity(archetype);
    18.         entityManager.AddComponentData(entity, new Translation()
    19.         {
    20.             Value = new float3(2, 0, 4)
    21.         });
    22.         entityManager.SetSharedComponentData(entity, new RenderMesh()
    23.         {
    24.             mesh = mesh,
    25.             material = material
    26.         });
    27.     }
    28. }
    29.  
    Yes mesh and material variables are set correctly.

    I also tried to create a simple scriptable render pipeline asset and assign it in Graphics settings via this tutorial, but no help. Any idea what could be the issue?

    Package versions:
    upload_2022-9-12_15-36-6.png
     
    Last edited: Sep 12, 2022
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,623
    This isn't the DOTS forum. The forums for that are here.

    I can move your post to one of then if you wish.
     
  3. Wrymnn

    Wrymnn

    Joined:
    Sep 24, 2014
    Posts:
    352
    Yes, please do :) And if you can, please also fix the typo in the title "create" into "created"
     
    MelvMay likes this.
  4. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,623
    Done and done. You didn't say which sub-forum so moved to the root one.
     
    Wrymnn likes this.
  5. WAYNGames

    WAYNGames

    Joined:
    Mar 16, 2019
    Posts:
    944
    Create a cube game object in the hierarchy.
    Remove the collider and enable convert to entity.

    Compare your entity with the cube.
    Any missing component ?
    Are all values set to something sensible ?
    Maybe you have a render bounds set to a zero sized cube.
    Also check the render system in the systems widow to see which components it expects.
     
  6. Luxxuor

    Luxxuor

    Joined:
    Jul 18, 2019
    Posts:
    89
  7. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    3,993
    Hybrid Renderer is only compatible with HDRP and URP, not built-in.
     
    saikarthi_unity, Wrymnn and Anthiese like this.
  8. Wrymnn

    Wrymnn

    Joined:
    Sep 24, 2014
    Posts:
    352
  9. yubingx

    yubingx

    Joined:
    Jan 3, 2023
    Posts:
    1