我有一个可编写脚本的资产,其中包含一个 GameObject 变量上的 fxbModel,并且我正在这样做:
model = Instantiate(caAsset.model, origin);
fbxComponents.All(fbxComponent => fbxComponent.gameObject.AddComponent<MeshCollider>());
是否从 Ressources 加载资产,一切正常。*
但是来自 AssetBundle 的资产**会发生以下错误。
CollisionMeshData couldn't be created because the mesh has been marked as non-accessible.
Mesh asset path "" Mesh name "Flanschdeckel_low"
UnityEngine.GameObject:AddComponent()
(*)
MyScriptableAsset caAsset = Resources.Load(scriptableObjectName);
(**)
MyScriptableAsset caAsset = bundle.LoadAsset<MyScriptableAsset>(scriptableObjectName);