You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Unity 6000.5 compilation fails because GetInstanceID is an obsolete error #1134
The latest stable MRTK packages do not compile with Unity 6000.5 because Unity changed UnityEngine.Object.GetInstanceID() from an obsolete warning to an obsolete error.
Confirmed affected packages:
org.mixedrealitytoolkit.input 3.3.0
org.mixedrealitytoolkit.spatialmanipulation 3.4.0
The same calls are also present in Input 4.0.0-pre.2 and the current main branch.
This blocks Editor compilation before entering Play Mode or building the project.
To reproduce
Open a project with Unity 6000.5.5f1.
Install MRTK Input 3.3.0 and Spatial Manipulation 3.4.0.
Allow Unity to compile the packages.
Observe the CS0619 errors.
Actual behavior
Spatial Manipulation 3.4.0:
Editor/Constraints/ConstraintManagerEditor.cs(291,66): error CS0619: 'Object.GetInstanceID()' is obsolete: 'GetInstanceID is deprecated. Use GetEntityId instead. This will be removed in a future version.'
Editor/Constraints/ConstraintManagerEditor.cs(373,76): error CS0619: 'Object.GetInstanceID()' is obsolete: 'GetInstanceID is deprecated. Use GetEntityId instead. This will be removed in a future version.'
Input 3.3.0:
Editor/Inspectors/InteractionModeManagerEditor.cs(91,25): error CS0619: 'Object.GetInstanceID()' is obsolete: 'GetInstanceID is deprecated. Use GetEntityId instead. This will be removed in a future version.'
MRTK should compile on Unity 6000.5 using EntityId while retaining compatibility with the packages' older supported Unity versions.
For example, the duplicate mapping logic can use HashSet<EntityId>, GetEntityId(), and EntityId.None on supported Unity versions. Conditional compilation or a compatibility helper may be needed because the packages currently support Unity versions where EntityId is unavailable.
Screenshots
Unity Console reports the CS0619 errors above during package compilation.
Your setup
Unity Version: 6000.5.5f1
MRTK Input: 3.3.0
MRTK Spatial Manipulation: 3.4.0
Editor OS: macOS
Regression check: Unity 6000.4.6f1 reports GetInstanceID() as an obsolete warning; Unity 6000.5.5f1 reports it as an obsolete error.
Target platform
Editor compilation issue; platform-independent. Observed in an iOS/OpenXR project.
Additional context
The latest stable Input 3.3.0 package contains the obsolete call.
Input 4.0.0-pre.2 and the current main branch also contain the same call.
Activity