Search Unity

Resolved GetHashCodeFunc' for which no ahead of time (AOT) code was generated

Discussion in 'NetCode for ECS' started by optimise, Jun 16, 2022.

  1. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    Tried to upgrade a sample dots netcode project to Unity 2021.3.4f1 and build the android build. The android build doesn't work properly anymore.

    ExecutionEngineException: Attempting to call method 'Unity.Entities.FastEquality+GetHashCodeImpl`1[[Unity.Entities.SceneSection, Unity.Entities, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]::GetHashCodeFunc' for which no ahead of time (AOT) code was generated.
    Unity.Entities.TypeManager.GetHashCode (System.Void* val, System.Int32 typeIndex) (at <00000000000000000000000000000000>:0)
    Unity.Entities.TypeManager.GetHashCode (System.Object val, System.Int32 typeIndex) (at <00000000000000000000000000000000>:0)
    Unity.Entities.Serialization.SerializeUtility.ReadSharedComponents (Unity.Entities.ExclusiveEntityTransaction manager, Unity.Entities.Serialization.ManagedObjectBinaryReader managedDataReader, Unity.Collections.NativeArray`1[T] sharedComponentRemap, Unity.Collections.NativeArray`1[T] sharedComponentRecordArray) (at <00000000000000000000000000000000>:0)
    Unity.Entities.Serialization.SerializeUtility.EndDeserializeWorld (Unity.Entities.ExclusiveEntityTransaction manager, Unity.Entities.Serialization.DotsSerializationReader dotsReader, Unity.Entities.Serialization.SerializeUtility+WorldDeserializationStatus& status, Unity.Entities.Serialization.SerializeUtility+WorldDeserializationResult& deserializationResult, System.Object[] unityObjects) (at <00000000000000000000000000000000>:0)
    Unity.Scenes.AsyncLoadSceneOperation+AsyncLoadSceneJob.Execute () (at <00000000000000000000000000000000>:0)
    Unity.Scenes.SceneSectionStreamingSystem:UpdateLoadOperation(AsyncLoadSceneOperation, World, Entity, Boolean)
    Unity.Scenes.SceneSectionStreamingSystem:processActiveStreams()
    Unity.Scenes.SceneSectionStreamingSystem:OnUpdate()
    Unity.Entities.SystemBase:Update()
    Unity.Entities.ComponentSystemGroup:UpdateAllSystems()
    Unity.Entities.ComponentSystem:Update()
    Unity.Entities.ComponentSystemGroup:UpdateAllSystems()
    Unity.Entities.ComponentSystem:Update()

    Error when processing 'AsyncLoadSceneJob(jar:file:///data/app/~~DeF-pQRQqEw-HbknVUpgxA==/com.DefaultCompany.NetCube-YGehwBMMya8Exs69qNxKrw==/base.apk!/assets/EntityScenes/b3b4427e1963245ed97bcf69eaca92da.0.entities)': Attempting to call method 'Unity.Entities.FastEquality+GetHashCodeImpl`1[[Unity.Entities.SceneSection, Unity.Entities, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]::GetHashCodeFunc' for which no ahead of time (AOT) code was generated.
    Unity.Scenes.SceneSectionStreamingSystem:UpdateLoadOperation(AsyncLoadSceneOperation, World, Entity, Boolean)
    Unity.Scenes.SceneSectionStreamingSystem:processActiveStreams()
    Unity.Scenes.SceneSectionStreamingSystem:OnUpdate()
    Unity.Entities.SystemBase:Update()
    Unity.Entities.ComponentSystemGroup:UpdateAllSystems()
    Unity.Entities.ComponentSystem:Update()
    Unity.Entities.ComponentSystemGroup:UpdateAllSystems()
    Unity.Entities.ComponentSystem:Update()
     
  2. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,759
    Not a netcode issue specifically - building Il2cpp is broken with Entities.

    Empty project, default DOTS packages, build il2cpp any shared component breaks. Mono works on platforms that support it. Upgrading properties package does not fix it.
     
    deus0 and Anthiese like this.
  3. deus0

    deus0

    Joined:
    May 12, 2015
    Posts:
    256
    Is there anyway to hack around this bug? Is it reported? :)
     
  4. Spy-Master

    Spy-Master

    Joined:
    Aug 4, 2022
    Posts:
    585
    deus0 likes this.
  5. deus0

    deus0

    Joined:
    May 12, 2015
    Posts:
    256