diff --git a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleBuildProfileEditor.cs b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleBuildProfileEditor.cs index aef4ad7e..82c17ae8 100644 --- a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleBuildProfileEditor.cs +++ b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleBuildProfileEditor.cs @@ -180,7 +180,11 @@ public override void OnInspectorGUI() { if (_serializedDefaultInfoPlist.objectReferenceValue != null) { +#if UNITY_6000_4_OR_NEWER + string filePath = AssetDatabase.GetAssetPath(_serializedDefaultInfoPlist.objectReferenceValue.GetEntityId()); +#else string filePath = AssetDatabase.GetAssetPath(_serializedDefaultInfoPlist.objectReferenceValue.GetInstanceID()); +#endif if (!filePath.EndsWith(".plist")) { _serializedDefaultInfoPlist.objectReferenceValue = null; @@ -232,7 +236,11 @@ public override void OnInspectorGUI() EditorGUILayout.ObjectField(_serializedDefaultEntitlements, typeof(UnityEngine.Object), defaultEntitlementsLabel, GUILayout.MinWidth(_minLabelWidth)); if (EditorGUI.EndChangeCheck() && !(_serializedDefaultEntitlements.objectReferenceValue is null)) { +#if UNITY_6000_4_OR_NEWER + string filePath = AssetDatabase.GetAssetPath(_serializedDefaultEntitlements.objectReferenceValue.GetEntityId()); +#else string filePath = AssetDatabase.GetAssetPath(_serializedDefaultEntitlements.objectReferenceValue.GetInstanceID()); +#endif if (!filePath.EndsWith(".entitlements")) { _serializedDefaultEntitlements.objectReferenceValue = null;