Search Unity

Noob Question: Cann't See Entity On Android Phone Which Has Rendermesh

Discussion in 'Graphics for ECS' started by YakShaver_dc, Apr 11, 2019.

  1. YakShaver_dc

    YakShaver_dc

    Joined:
    Mar 27, 2019
    Posts:
    29
    I am the beginner of ECS and c# Job system. I create my first ECS project and use RenderMesh component to set mesh and material. The materail is using standard shader and enabled GPU instancing. It works fine and could show the entities in unity editor and PC standalone. But, after i built and installed the apk in my android phone, i couldn't see the same entities on screen. I tried to use 'Frame Debugger' and found none of the mesh and material of the entity was drawn... I googled this issue for several days and cannot find the solution. Could anyone help me solve it?
     
    Last edited: Apr 11, 2019
  2. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,685
    Which Unity version, Entities package version, Hybrid Renderer package version?
     
  3. YakShaver_dc

    YakShaver_dc

    Joined:
    Mar 27, 2019
    Posts:
    29
    Unity 2018.3.6f1,
    Entities version 0.0.12 - preview.24,
    Hybrid Renderer version 0.0.1 - preview.4
     
  4. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,685
  5. YakShaver_dc

    YakShaver_dc

    Joined:
    Mar 27, 2019
    Posts:
    29
    I tried both create the entity totally by codes and by prefab which has GameObjectEntity script, but in these two ways, the entities were both missing on Android phone.
    I also has tried link.xml. I put it in Assets directory. Is there any mistake in link.xml?

    Code (xml):
    1.  
    2. <linker>
    3.    <assembly fullname="Unity.Rendering.Hybrid" preserve="all"/>
    4.    <assembly fullname="Unity.Rendering" preserve="all"/>
    5. </linker>
    6.  
     
    Last edited: Apr 12, 2019
  6. YakShaver_dc

    YakShaver_dc

    Joined:
    Mar 27, 2019
    Posts:
    29
    I will be appreciated to get any new clue:)
     
  7. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,685
    Did you debug build? Put some Debug.Log in to systems, connect ADB and check that systems runs (Also you can put it in Renderer system to check)
     
    Last edited: Apr 12, 2019
  8. YakShaver_dc

    YakShaver_dc

    Joined:
    Mar 27, 2019
    Posts:
    29
    Thank you very much, eizenhorn, your advices save me. Yes, it's all about IL2CPP strip codes.
    There was an exception in debug build: 'MissingMethodException: Constructor on type 'Unity.Transforms.EndFrameTransformSystem' not found.'. Add the codes below into link.xml and the entites work fine.
    Code (xml):
    1.  
    2. <assembly fullname="Unity.Transforms" preserve="all"/>
    3.  
     
    Last edited: Apr 12, 2019