Fix Unity 6000.5 editor compile error in AppleBuildProfileEditor (CS0619) - #107
Open
oscarmakala wants to merge 1 commit into
Open
Fix Unity 6000.5 editor compile error in AppleBuildProfileEditor (CS0619)#107oscarmakala wants to merge 1 commit into
oscarmakala wants to merge 1 commit into
Conversation
…ompatibility Unity 6000.5's InstanceID->EntityId migration makes GetInstanceID()-based AssetDatabase.GetAssetPath(int) error-level obsolete (CS0619, not suppressible), breaking editor compilation. The Object overload works on all Unity versions. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Unity 6000.5 completes the InstanceID →
EntityIdmigration and marksAssetDatabase.GetAssetPath(int instanceID)as error-level obsolete (CS0619, not suppressible).AppleBuildProfileEditor.cscalls it viaobjectReferenceValue.GetInstanceID()in two places (the default Info.plist and default entitlements pickers), so Apple.Core fails to compile in the editor on Unity 6000.5+, which blocks every plug-in that depends on it (GameKit, etc.).Fix
Use the
AssetDatabase.GetAssetPath(UnityEngine.Object)overload directly withobjectReferenceValue— it has existed since Unity 5, so the change is compatible with all Unity versions the plug-ins support; no version defines needed.(and the same for
_serializedDefaultEntitlements.)Testing
Both
mainand27-betacurrently carry the affected code.🤖 Generated with Claude Code