Workspace/Unity3d

[Addressable] System.MissingMethodException: Default constructor not found for type에러

Bombus 2023. 3. 14. 12:12

| 문제

빌드에서 아래와 같은 에러와 함께 어드레서블 어셋 로드에 실패하는 경우

 

E/Unity: System.MissingMethodException: Default constructor not found for type UnityEngine.ResourceManagement.AsyncOperations.ProviderOperation`1[[UnityEngine.AddressableAssets.Initialization.ResourceManagerRuntimeData, Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]

 

| 해결방법

<linker>
    <assembly fullname="Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" preserve="all">
        <type fullname="UnityEngine.ResourceManagement.ResourceProviders.LegacyResourcesProvider" preserve="all" />
        <type fullname="UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider" preserve="all" />
        <type fullname="UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider" preserve="all" />
        <type fullname="UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider" preserve="all" />
        <type fullname="UnityEngine.ResourceManagement.AsyncOperations" preserve="all" />
    </assembly>
    <assembly fullname="Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" preserve="all">
        <type fullname="UnityEngine.AddressableAssets.Addressables" preserve="all" />
    </assembly>
	<assembly fullname="UnityEngine">
		<type fullname="UnityEngine.Rigidbody" preserve="all"/>
	</assembly>
</linker>

 

Assets폴더 하위에 link.xml 파일을 생성 위와같이, 어드레서블 내에 정의된 타입들을 정의

 

 

반응형