From f9c80727be691bc7a2fe005b90a9eeb462e03310 Mon Sep 17 00:00:00 2001 From: Majky Date: Thu, 30 Jul 2026 15:20:37 +0200 Subject: [PATCH] fix obsolete unity method throws error in unity 6000.4 or newer --- .../Assets/Apple.Core/Editor/AppleBuildProfileEditor.cs | 8 ++++++++ 1 file changed, 8 insertions(+) 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;