Search Unity

ConvertToEntity Gameobject with MeshCollider

Discussion in 'Physics for ECS' started by u_ladon, Sep 10, 2020.

  1. u_ladon

    u_ladon

    Joined:
    Aug 6, 2019
    Posts:
    6
    if fbx not set export bool - read/write enabled im get error
    Code (CSharp):
    1. InvalidOperationException: Mesh 'Coin (UnityEngine.Mesh)' assigned to Unity.Physics.MeshCollider on Coin is not readable. Ensure that you have enabled Read/Write on its import settings.
    2. Unity.Physics.Authoring.LegacyMeshColliderConversionSystem.GenerateComputationData (UnityEngine.MeshCollider shape, Unity.Physics.Authoring.ColliderInstance colliderInstance, Unity.Collections.NativeList`1[T]
    is it possible to fix this without setting this flag?
     
  2. brunocoimbra

    brunocoimbra

    Joined:
    Sep 2, 2015
    Posts:
    679
    You can set this flag on Unity FBX importer, don't need to set it when exporting the FBX
     
    u_ladon likes this.
  3. u_ladon

    u_ladon

    Joined:
    Aug 6, 2019
    Posts:
    6
    I figured out how to get around this so as not to waste extra memory.
    You need to set this flag and after loading manually and after processing the mesh data, you can call
    UploadMeshData(true) to unload mesh data.