From be602cd425b4977201c9a3285835e90fc2695ab1 Mon Sep 17 00:00:00 2001 From: Mateusz Janczewski Date: Fri, 4 Sep 2026 19:49:41 +0300 Subject: [PATCH] Fix Unity 6.5 build error in AppleBuildProfileEditor Unity 6.5 (6000.5) makes the EntityId -> int conversion obsolete as an ERROR (CS0619), not a warning. Object.GetInstanceID() now returns EntityId, so AssetDatabase.GetAssetPath(int) no longer compiles: error CS0619: 'EntityId.implicit operator int(EntityId)' is obsolete: 'Use EntityId explicitly instead of int' Both call sites already hold the Object itself, so they can use the AssetDatabase.GetAssetPath(Object) overload directly. That is equivalent - GetAssetPath(int) resolved the instance id back to the same object - and it compiles on every Unity version that has the Object overload, so this is not conditional on 6.5. Without this, Apple.Core fails to compile on Unity 6.5 and the plug-in packages cannot be built. Co-Authored-By: Claude Opus 5 --- .../Assets/Apple.Core/Editor/AppleBuildProfileEditor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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..37d4703d 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,7 @@ public override void OnInspectorGUI() { if (_serializedDefaultInfoPlist.objectReferenceValue != null) { - string filePath = AssetDatabase.GetAssetPath(_serializedDefaultInfoPlist.objectReferenceValue.GetInstanceID()); + string filePath = AssetDatabase.GetAssetPath(_serializedDefaultInfoPlist.objectReferenceValue); if (!filePath.EndsWith(".plist")) { _serializedDefaultInfoPlist.objectReferenceValue = null; @@ -232,7 +232,7 @@ public override void OnInspectorGUI() EditorGUILayout.ObjectField(_serializedDefaultEntitlements, typeof(UnityEngine.Object), defaultEntitlementsLabel, GUILayout.MinWidth(_minLabelWidth)); if (EditorGUI.EndChangeCheck() && !(_serializedDefaultEntitlements.objectReferenceValue is null)) { - string filePath = AssetDatabase.GetAssetPath(_serializedDefaultEntitlements.objectReferenceValue.GetInstanceID()); + string filePath = AssetDatabase.GetAssetPath(_serializedDefaultEntitlements.objectReferenceValue); if (!filePath.EndsWith(".entitlements")) { _serializedDefaultEntitlements.objectReferenceValue = null;