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. Dismiss Notice

Resolved Android - ArgumentException: Cannot find TypeIndex for type hash

Discussion in 'Entity Component System' started by RoughSpaghetti3211, Oct 29, 2022.

  1. RoughSpaghetti3211

    RoughSpaghetti3211

    Joined:
    Aug 11, 2015
    Posts:
    1,695
    Launching my simple entities build on Oculus 2 I do not see any entities rendering. In the Android Logcat.

    Code (CSharp):
    1. ArgumentException: Cannot find TypeIndex for type hash 7881543491081840453. Check in the debug file ExportedTypes.log of your project Logs folder (<projectName>/Logs) the corresponding Component type name for the type hash 7881543491081840453. And ensure your runtime depends on all assemblies defining the Component types your data uses.
    The component type in ExportedTypes.log is Unity.Rendering.PerInstanceCullingTag
    com.unity.entities.graphics 1.0.0-exp.8

    com.unity.entities 1.0.0-exp.8
    IL2CPP - I can't build with mono, as far as I know, OpenXR does not support mono.
    Unity 2022.2.0b13

    Is this bad code stripping or some type that should not have made it to the build, or something else?

    Any help would be appreciated.
     
    Last edited: Nov 1, 2022
  2. AndyWWWW

    AndyWWWW

    Joined:
    Apr 13, 2021
    Posts:
    1
    add a link.xml anywhere under assets with the following content :


    <linker>
    <!--Preserve entire assembly-->
    <assembly fullname="Unity.Entities.Graphics" preserve="all"/>
    </linker>
     
  3. RoughSpaghetti3211

    RoughSpaghetti3211

    Joined:
    Aug 11, 2015
    Posts:
    1,695
    Thank you for the reply Andy, this worked THANK YOU !!
     
  4. NinhNv15

    NinhNv15

    Joined:
    Jan 31, 2016
    Posts:
    5
    I have to login to say thank you Andy:D
     
  5. nihil75

    nihil75

    Joined:
    Nov 21, 2021
    Posts:
    1
    Amazing. Thanks Andy!!!
     
  6. elliotc-unity

    elliotc-unity

    Unity Technologies

    Joined:
    Nov 5, 2015
    Posts:
    228
    This was a bug in entities that was fixed in pre.47, fwiw.
     
  7. LuisEGV

    LuisEGV

    Joined:
    Jul 21, 2015
    Posts:
    36
    No it wasn't
     
    dherault and filod like this.