diff --git a/Packages/Tracking Preview/AggregationProviders/Runtime/Scripts/JointOcclusion.cs b/Packages/Tracking Preview/AggregationProviders/Runtime/Scripts/JointOcclusion.cs index 702c17d6f6..3aff2191d8 100644 --- a/Packages/Tracking Preview/AggregationProviders/Runtime/Scripts/JointOcclusion.cs +++ b/Packages/Tracking Preview/AggregationProviders/Runtime/Scripts/JointOcclusion.cs @@ -28,7 +28,11 @@ public class JointOcclusion : MonoBehaviour /// public void Setup() { +#if UNITY_6000_4_OR_NEWER + List allJointOcclusions = FindObjectsByType().ToList(); +#else List allJointOcclusions = FindObjectsByType(FindObjectsSortMode.None).ToList(); +#endif layerName = "JointOcclusion" + allJointOcclusions.IndexOf(this).ToString(); cam = GetComponent(); diff --git a/Packages/Tracking Preview/HandRays/Runtime/Scripts/FarFieldLayerManager.cs b/Packages/Tracking Preview/HandRays/Runtime/Scripts/FarFieldLayerManager.cs index e66a1d84f1..26b2cdf36b 100644 --- a/Packages/Tracking Preview/HandRays/Runtime/Scripts/FarFieldLayerManager.cs +++ b/Packages/Tracking Preview/HandRays/Runtime/Scripts/FarFieldLayerManager.cs @@ -65,7 +65,12 @@ protected void GenerateLayers() protected void AssignLayers() { +#if UNITY_6000_4_OR_NEWER + FarFieldObject[] farFieldObjects = FindObjectsByType(FindObjectsInactive.Include); +#else FarFieldObject[] farFieldObjects = FindObjectsByType(FindObjectsInactive.Include, FindObjectsSortMode.None); +#endif + foreach (FarFieldObject ffo in farFieldObjects) { ffo.gameObject.layer = FarFieldObjectLayer; diff --git a/Packages/Tracking Preview/Locomotion/Runtime/Scripts/Teleportation/Teleport Action/Jump Gem Teleport/JumpGemTeleport.cs b/Packages/Tracking Preview/Locomotion/Runtime/Scripts/Teleportation/Teleport Action/Jump Gem Teleport/JumpGemTeleport.cs index c37aae9e01..f7e5973a85 100644 --- a/Packages/Tracking Preview/Locomotion/Runtime/Scripts/Teleportation/Teleport Action/Jump Gem Teleport/JumpGemTeleport.cs +++ b/Packages/Tracking Preview/Locomotion/Runtime/Scripts/Teleportation/Teleport Action/Jump Gem Teleport/JumpGemTeleport.cs @@ -48,7 +48,11 @@ public class JumpGemTeleport : TeleportActionBase private void Awake() { +#if UNITY_6000_4_OR_NEWER + _jumpGems = FindObjectsByType(FindObjectsInactive.Include).ToList(); +#else _jumpGems = FindObjectsByType(FindObjectsInactive.Include, FindObjectsSortMode.None).ToList(); +#endif for (int i = 0; i < _jumpGems.Count; i++) { int j = i; diff --git a/Packages/Tracking Preview/Locomotion/Runtime/Scripts/Teleportation/Teleport Action/TeleportActionBase.cs b/Packages/Tracking Preview/Locomotion/Runtime/Scripts/Teleportation/Teleport Action/TeleportActionBase.cs index d31f1dc133..6a755ebaa3 100644 --- a/Packages/Tracking Preview/Locomotion/Runtime/Scripts/Teleportation/Teleport Action/TeleportActionBase.cs +++ b/Packages/Tracking Preview/Locomotion/Runtime/Scripts/Teleportation/Teleport Action/TeleportActionBase.cs @@ -111,7 +111,11 @@ public virtual void Start() if (findTeleportAnchorsOnStart) { +#if UNITY_6000_4_OR_NEWER + _teleportAnchors = new List(FindObjectsByType(FindObjectsInactive.Include)); +#else _teleportAnchors = new List(FindObjectsByType(FindObjectsInactive.Include, FindObjectsSortMode.None)); +#endif } if (freeTeleportAnchor.TryGetComponent(out MeshCollider anchorCollider)) diff --git a/Packages/Tracking/CHANGELOG.md b/Packages/Tracking/CHANGELOG.md index cdc993a4df..d46eb878c6 100644 --- a/Packages/Tracking/CHANGELOG.md +++ b/Packages/Tracking/CHANGELOG.md @@ -6,6 +6,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [docs-website]: https://docs.ultraleap.com/unity-api/ "Ultraleap Docs" +## [vNext] - TBD + +### Added + - Updated scripts and some FBX assets to remove warnings in Unity 6.4 due to obsolete or deprecated Unity APIs/interfaces + +### Changed + +### Fixed + +### Known Issues +- Ultraleap tracking with Ultraleap hardware no longer works on a Meta Quest 3 headset running an OS version >76 due to [changes in which permissions are allowed.](https://developers.meta.com/horizon/resources/permissions-prohibited/) +- On Mac OS only, the client libraries now default to using a different tracking server port. For hand tracking to work, either change the Server Connection Input mode to PORT or set the port in the Server Name Space field to {"tracking_server_port": 12345} +- Pose detection scene does not illuminate all poses in green if built for mobile headsets when using URP (2022.3), spotlights don't work as intended on Unity 6. +- Turntable and pullchord scene only works (i.e. the pullchord works) if the physical hands physics settings are used +- Turntable and pullchord - origin material is pink (error) and only renders in one eye - BiRP and URP - Unity 2022 only +- Turntable and pullchord - scene produces a couple of 'the referenced script (unknown) on this Behaviour is missing' warnings - unless the tracking preview package/examples are imported +- A number of .so plugin files are not 16-byte aligned and produce warnings when a build is made (libLeapC.so, libUnityOpenXR.so, libLeapCLegacy.so) +- Console error on shader Ultraleap/GenericHandShader - Material 'GhostCapsule Hand (Instance)' with Shader 'Ultraleap/GenericHandShader' doesn't have a color property '_MainColor' +- Certain scenes containing physical interactions produce 'Setting linear velocity of a kinematic body is not supported' warnings (UnityEngine.RigidBody:set_velocity) +- Text missing on example scene panels in Unity 6.3, need to manually import TextMeshPro Essential Resources - Window > TextMeshPro > Import TMP Essential Resources +- Warnings about deprecated components when importing plugin into Unity 6.3 - XRStats, Physics.autoSyncTransforms +- The RuntimeGizmoManager and associated RuntimeGizmo.shader shader are not URP compatible and would require breaking changes to support URP; These remain as BiRP only +- Support either input system for all interactions, fixing HandRecorder and CycleHandPairs +- Scene(s) using physical hand interactions will prompt to go to settings to change parameters. One parameter is not being set, when set which is causing this repeated prompting +- Hand distortion seen on Pico devices using Ultraleap Tracking hardware (large hands, messed up hand rotation vectors) + ## [7.3.0] - 25/02/2026 ### Added diff --git a/Packages/Tracking/Core/Editor/Scripts/EditorUtils.cs b/Packages/Tracking/Core/Editor/Scripts/EditorUtils.cs index 8c3ba1965e..42451fac99 100644 --- a/Packages/Tracking/Core/Editor/Scripts/EditorUtils.cs +++ b/Packages/Tracking/Core/Editor/Scripts/EditorUtils.cs @@ -30,9 +30,12 @@ public static class EditorUtils /// public static void ReplaceSceneReferences(T a, T b) where T : UnityObject { +#if UNITY_6000_4_OR_NEWER + var aId = a.GetEntityId(); +#else var aId = a.GetInstanceID(); +#endif var refType = typeof(T); - var curScene = SceneManager.GetActiveScene(); var rootObjs = curScene.GetRootGameObjects(); foreach (var rootObj in rootObjs) @@ -53,7 +56,12 @@ public static void ReplaceSceneReferences(T a, T b) where T : UnityObject Where(fi => fi.FieldType.IsAssignableFrom(refType))) { var refValue = fieldInfo.GetValue(component) as T; + +#if UNITY_6000_4_OR_NEWER + if (refValue.GetEntityId() == aId) +#else if (refValue.GetInstanceID() == aId) +#endif { objectChanges.Add(() => { diff --git a/Packages/Tracking/Core/Runtime/Models/MediumPolySphere.fbx.meta b/Packages/Tracking/Core/Runtime/Models/MediumPolySphere.fbx.meta index 9826c75856..32686c83c9 100644 --- a/Packages/Tracking/Core/Runtime/Models/MediumPolySphere.fbx.meta +++ b/Packages/Tracking/Core/Runtime/Models/MediumPolySphere.fbx.meta @@ -1,36 +1,52 @@ fileFormatVersion: 2 guid: 2f496b1b1bec86743b418551f859020c -timeCreated: 1461985666 -licenseType: Pro ModelImporter: - serializedVersion: 19 - fileIDToRecycleName: - 100000: //RootNode - 400000: //RootNode - 2300000: //RootNode - 3300000: //RootNode - 4300000: Icosphere - 4300002: MediumPolySphere + serializedVersion: 24200 + internalIDToNameTable: + - first: + 1: 100000 + second: //RootNode + - first: + 4: 400000 + second: //RootNode + - first: + 23: 2300000 + second: //RootNode + - first: + 33: 3300000 + second: //RootNode + - first: + 43: 4300000 + second: Icosphere + - first: + 43: 4300002 + second: MediumPolySphere + externalObjects: {} materials: - importMaterials: 0 + materialImportMode: 1 materialName: 0 materialSearch: 1 + materialLocation: 1 animations: legacyGenerateAnimations: 4 bakeSimulation: 0 - resampleRotations: 1 + resampleCurves: 1 optimizeGameObjects: 0 + removeConstantScaleCurves: 0 motionNodeName: animationImportErrors: animationImportWarnings: animationRetargetingWarnings: animationDoRetargetingWarnings: 0 + importAnimatedCustomProperties: 0 + importConstraints: 0 animationCompression: 1 animationRotationError: 0.5 animationPositionError: 0.5 animationScaleError: 0.5 animationWrapMode: 0 extraExposedTransformPaths: [] + extraUserProperties: [] clipAnimations: [] isReadable: 0 meshes: @@ -38,25 +54,52 @@ ModelImporter: globalScale: 1 meshCompression: 0 addColliders: 0 + useSRGBMaterialColor: 1 + sortHierarchyByName: 1 + importPhysicalCameras: 0 + importVisibility: 0 importBlendShapes: 0 + importCameras: 0 + importLights: 0 + nodeNameCollisionStrategy: 0 + fileIdsGeneration: 1 swapUVChannels: 0 generateSecondaryUV: 0 useFileUnits: 1 - optimizeMeshForGPU: 1 keepQuads: 0 weldVertices: 1 + bakeAxisConversion: 0 + preserveHierarchy: 0 + skinWeightsMode: 0 + maxBonesPerVertex: 4 + minBoneWeight: 0.001 + optimizeBones: 1 + generateMeshLods: 0 + meshLodGenerationFlags: 0 + maximumMeshLod: -1 + meshOptimizationFlags: -1 + indexFormat: 1 secondaryUVAngleDistortion: 8 secondaryUVAreaDistortion: 15.000001 secondaryUVHardAngle: 88 + secondaryUVMarginMethod: 0 + secondaryUVMinLightmapResolution: 40 + secondaryUVMinObjectScale: 1 secondaryUVPackMargin: 4 useFileScale: 1 + strictVertexDataChecks: 0 tangentSpace: normalSmoothAngle: 60 normalImportMode: 0 tangentImportMode: 3 + normalCalculationMode: 0 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 1 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 + referencedClips: [] importAnimation: 0 - copyAvatar: 0 humanDescription: + serializedVersion: 3 human: [] skeleton: [] armTwist: 0.5 @@ -66,11 +109,19 @@ ModelImporter: armStretch: 0.05 legStretch: 0.05 feetSpacing: 0 + globalScale: 1 rootMotionBoneName: hasTranslationDoF: 0 + hasExtraRoot: 0 + skeletonHasParents: 0 lastHumanDescriptionAvatarSource: {instanceID: 0} + autoGenerateAvatarMappingIfUnspecified: 1 animationType: 0 humanoidOversampling: 1 + avatarSetup: 0 + addHumanoidExtraRootOnlyWhenUsingAvatar: 0 + importBlendShapeDeformPercent: 0 + remapMaterialsIfMaterialImportModeIsNone: 1 additionalBone: 0 userData: assetBundleName: diff --git a/Packages/Tracking/Core/Runtime/Models/Rounded Cube.fbx.meta b/Packages/Tracking/Core/Runtime/Models/Rounded Cube.fbx.meta index a5424b9c09..a6a18e6a11 100644 --- a/Packages/Tracking/Core/Runtime/Models/Rounded Cube.fbx.meta +++ b/Packages/Tracking/Core/Runtime/Models/Rounded Cube.fbx.meta @@ -1,16 +1,11 @@ fileFormatVersion: 2 guid: 47743910ad6de8e4daccb1f2bc15a25f ModelImporter: - serializedVersion: 20300 + serializedVersion: 24200 internalIDToNameTable: [] - externalObjects: - - first: - type: UnityEngine:Material - assembly: UnityEngine.CoreModule - name: Base_Colour - second: {fileID: 2100000, guid: 94349080088ec1f409368ae9716f875e, type: 2} + externalObjects: {} materials: - materialImportMode: 0 + materialImportMode: 1 materialName: 0 materialSearch: 1 materialLocation: 1 @@ -19,9 +14,8 @@ ModelImporter: bakeSimulation: 0 resampleCurves: 1 optimizeGameObjects: 0 + removeConstantScaleCurves: 0 motionNodeName: - rigImportErrors: - rigImportWarnings: animationImportErrors: animationImportWarnings: animationRetargetingWarnings: @@ -44,10 +38,12 @@ ModelImporter: addColliders: 0 useSRGBMaterialColor: 1 sortHierarchyByName: 1 + importPhysicalCameras: 1 importVisibility: 0 importBlendShapes: 0 importCameras: 0 importLights: 0 + nodeNameCollisionStrategy: 0 fileIdsGeneration: 1 swapUVChannels: 0 generateSecondaryUV: 0 @@ -59,6 +55,10 @@ ModelImporter: skinWeightsMode: 0 maxBonesPerVertex: 4 minBoneWeight: 0.001 + optimizeBones: 1 + generateMeshLods: 0 + meshLodGenerationFlags: 0 + maximumMeshLod: -1 meshOptimizationFlags: -1 indexFormat: 0 secondaryUVAngleDistortion: 8 @@ -69,6 +69,7 @@ ModelImporter: secondaryUVMinObjectScale: 1 secondaryUVPackMargin: 4 useFileScale: 1 + strictVertexDataChecks: 0 tangentSpace: normalSmoothAngle: 60 normalImportMode: 0 @@ -101,6 +102,7 @@ ModelImporter: humanoidOversampling: 1 avatarSetup: 0 addHumanoidExtraRootOnlyWhenUsingAvatar: 0 + importBlendShapeDeformPercent: 0 remapMaterialsIfMaterialImportModeIsNone: 1 additionalBone: 0 userData: diff --git a/Packages/Tracking/Core/Runtime/Models/Wire Cube.obj.meta b/Packages/Tracking/Core/Runtime/Models/Wire Cube.obj.meta index c0a69b52af..ffde44230f 100644 --- a/Packages/Tracking/Core/Runtime/Models/Wire Cube.obj.meta +++ b/Packages/Tracking/Core/Runtime/Models/Wire Cube.obj.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 guid: e52e140a2722aed4ea6b7b039188b507 ModelImporter: - serializedVersion: 21300 + serializedVersion: 24200 internalIDToNameTable: - first: 1: 100000 @@ -26,10 +26,10 @@ ModelImporter: second: default externalObjects: {} materials: - materialImportMode: 0 + materialImportMode: 1 materialName: 0 materialSearch: 1 - materialLocation: 0 + materialLocation: 1 animations: legacyGenerateAnimations: 4 bakeSimulation: 0 @@ -37,8 +37,6 @@ ModelImporter: optimizeGameObjects: 0 removeConstantScaleCurves: 0 motionNodeName: - rigImportErrors: - rigImportWarnings: animationImportErrors: animationImportWarnings: animationRetargetingWarnings: @@ -61,6 +59,7 @@ ModelImporter: addColliders: 0 useSRGBMaterialColor: 1 sortHierarchyByName: 1 + importPhysicalCameras: 1 importVisibility: 0 importBlendShapes: 0 importCameras: 0 @@ -78,6 +77,9 @@ ModelImporter: maxBonesPerVertex: 4 minBoneWeight: 0.001 optimizeBones: 1 + generateMeshLods: 0 + meshLodGenerationFlags: 0 + maximumMeshLod: -1 meshOptimizationFlags: -1 indexFormat: 0 secondaryUVAngleDistortion: 8 @@ -88,6 +90,7 @@ ModelImporter: secondaryUVMinObjectScale: 1 secondaryUVPackMargin: 4 useFileScale: 1 + strictVertexDataChecks: 0 tangentSpace: normalSmoothAngle: 60 normalImportMode: 1 @@ -120,6 +123,7 @@ ModelImporter: humanoidOversampling: 1 avatarSetup: 0 addHumanoidExtraRootOnlyWhenUsingAvatar: 0 + importBlendShapeDeformPercent: 0 remapMaterialsIfMaterialImportModeIsNone: 1 additionalBone: 0 userData: diff --git a/Packages/Tracking/Core/Runtime/Scripts/Fiducial Markers/TrackingMarkerObject.cs b/Packages/Tracking/Core/Runtime/Scripts/Fiducial Markers/TrackingMarkerObject.cs index de22ed258e..b86b75efdd 100644 --- a/Packages/Tracking/Core/Runtime/Scripts/Fiducial Markers/TrackingMarkerObject.cs +++ b/Packages/Tracking/Core/Runtime/Scripts/Fiducial Markers/TrackingMarkerObject.cs @@ -36,7 +36,9 @@ private void Start() // Ensure the LeapServiceProvider exists for us to position the device in world space if (leapServiceProvider == null) { -#if UNITY_6000_0_OR_NEWER +#if UNITY_6000_4_OR_NEWER + leapServiceProvider = FindAnyObjectByType(); +#elif UNITY_6000_0_OR_NEWER leapServiceProvider = FindFirstObjectByType(); #else leapServiceProvider = FindObjectOfType(); diff --git a/Packages/Tracking/Core/Runtime/Scripts/Utils/HandTrackingHintManager.cs b/Packages/Tracking/Core/Runtime/Scripts/Utils/HandTrackingHintManager.cs index 78723c4fff..f7fe332f9e 100644 --- a/Packages/Tracking/Core/Runtime/Scripts/Utils/HandTrackingHintManager.cs +++ b/Packages/Tracking/Core/Runtime/Scripts/Utils/HandTrackingHintManager.cs @@ -147,7 +147,10 @@ static Controller LeapController { if (_leapController == null) // Find any existing controller { -#if UNITY_6000_0_OR_NEWER +#if UNITY_6000_4_OR_NEWER + LeapServiceProvider provider = + UnityEngine.Object.FindAnyObjectByType(FindObjectsInactive.Include); +#elif UNITY_6000_0_OR_NEWER LeapServiceProvider provider = UnityEngine.Object.FindFirstObjectByType(FindObjectsInactive.Include); #else diff --git a/Packages/Tracking/Core/Runtime/Scripts/Utils/HandUtils.cs b/Packages/Tracking/Core/Runtime/Scripts/Utils/HandUtils.cs index 313afe336a..7091927b9d 100644 --- a/Packages/Tracking/Core/Runtime/Scripts/Utils/HandUtils.cs +++ b/Packages/Tracking/Core/Runtime/Scripts/Utils/HandUtils.cs @@ -46,7 +46,11 @@ private static void AssignBestLeapProvider(bool preferLiveLeapProviderOverStatic s_provider = UnityEngine.Object.FindAnyObjectByType(); if (s_provider == null) { +#if UNITY_6000_4_OR_NEWER + var candidates = UnityEngine.Object.FindObjectsByType(); +#else var candidates = UnityEngine.Object.FindObjectsByType(FindObjectsSortMode.None); +#endif if (candidates.Length > 0) { if (preferLiveLeapProviderOverStaticHandPoseProviders) diff --git a/Packages/Tracking/Examples~/XR Examples/Example Assets/Misc and Shared/Scripts/MovePoseExample.cs b/Packages/Tracking/Examples~/XR Examples/Example Assets/Misc and Shared/Scripts/MovePoseExample.cs index 4a09507908..0051ca3312 100644 --- a/Packages/Tracking/Examples~/XR Examples/Example Assets/Misc and Shared/Scripts/MovePoseExample.cs +++ b/Packages/Tracking/Examples~/XR Examples/Example Assets/Misc and Shared/Scripts/MovePoseExample.cs @@ -23,7 +23,9 @@ private void OnEnable() private void Start() { +#pragma warning disable CS0618 if (Physics.autoSyncTransforms) +#pragma warning restore CS0618 { Debug.LogWarning( "Physics.autoSyncTransforms is enabled. This will cause Interaction " diff --git a/Packages/Tracking/Examples~/XR Examples/Example Assets/Physical Hands/Scripts/HandGrabHighlighter.cs b/Packages/Tracking/Examples~/XR Examples/Example Assets/Physical Hands/Scripts/HandGrabHighlighter.cs index a52bceb99d..fd7faa4706 100644 --- a/Packages/Tracking/Examples~/XR Examples/Example Assets/Physical Hands/Scripts/HandGrabHighlighter.cs +++ b/Packages/Tracking/Examples~/XR Examples/Example Assets/Physical Hands/Scripts/HandGrabHighlighter.cs @@ -51,7 +51,9 @@ private void Awake() if (automaticEvents) { -#if UNITY_6000_0_OR_NEWER +#if UNITY_6000_4_OR_NEWER + PhysicalHandsManager physManager = FindAnyObjectByType(); +#elif UNITY_6000_0_OR_NEWER PhysicalHandsManager physManager = FindFirstObjectByType(); #else PhysicalHandsManager physManager = FindObjectOfType(); diff --git a/Packages/Tracking/Hands/Runtime/Scripts/HandModelManager.cs b/Packages/Tracking/Hands/Runtime/Scripts/HandModelManager.cs index c43ca21af4..8896f0c156 100644 --- a/Packages/Tracking/Hands/Runtime/Scripts/HandModelManager.cs +++ b/Packages/Tracking/Hands/Runtime/Scripts/HandModelManager.cs @@ -43,7 +43,11 @@ private void Reset() /// public void RegisterAllUnregisteredHandModels() { +#if UNITY_6000_4_OR_NEWER + HandModelBase[] potentiallyUnpairedHandModels = FindObjectsByType(FindObjectsInactive.Include); +#else HandModelBase[] potentiallyUnpairedHandModels = FindObjectsByType(FindObjectsInactive.Include, FindObjectsSortMode.None); +#endif for (int i = 0; i < potentiallyUnpairedHandModels.Length; i++) { if (!IsRegistered(potentiallyUnpairedHandModels[i])) diff --git a/Packages/Tracking/Physical Hands/Editor/Scripts/PhysicalHandsButtonEditor.cs b/Packages/Tracking/Physical Hands/Editor/Scripts/PhysicalHandsButtonEditor.cs index b9ced2291b..49846d29a7 100644 --- a/Packages/Tracking/Physical Hands/Editor/Scripts/PhysicalHandsButtonEditor.cs +++ b/Packages/Tracking/Physical Hands/Editor/Scripts/PhysicalHandsButtonEditor.cs @@ -93,13 +93,21 @@ public override void OnInspectorGUI() private void WarningsSection() { +#if UNITY_6000_4_OR_NEWER + var physicalHandsManager = GameObject.FindAnyObjectByType(FindObjectsInactive.Include); +#else var physicalHandsManager = GameObject.FindFirstObjectByType(FindObjectsInactive.Include); +#endif if (physicalHandsManager == null) { EditorGUILayout.HelpBox($"There is no Physical Hands Manager in your scene.\nThis button will not work correctly.", MessageType.Warning); EditorGUILayout.Space(5); } +#if UNITY_6000_4_OR_NEWER + else if (GameObject.FindAnyObjectByType(FindObjectsInactive.Include) == null) +#else else if (GameObject.FindFirstObjectByType(FindObjectsInactive.Include) == null) +#endif { EditorGUILayout.HelpBox($"There is no Grab Helper on your Physical Hands Manager.\nThis button will not work correctly.", MessageType.Warning); if (GUILayout.Button("Add Grab Helper")) diff --git a/Packages/Tracking/Physical Hands/Editor/Scripts/PhysicalHandsSettingsPopup.cs b/Packages/Tracking/Physical Hands/Editor/Scripts/PhysicalHandsSettingsPopup.cs index 66a5039fb0..7cf0b21081 100644 --- a/Packages/Tracking/Physical Hands/Editor/Scripts/PhysicalHandsSettingsPopup.cs +++ b/Packages/Tracking/Physical Hands/Editor/Scripts/PhysicalHandsSettingsPopup.cs @@ -39,7 +39,9 @@ private static void OnAfterSceneLoad(Scene scene, OpenSceneMode mode) private static void ShowPopupIfRequired() { -#if UNITY_6000_0_OR_NEWER +#if UNITY_6000_4_OR_NEWER + if (Object.FindAnyObjectByType() != null +#elif UNITY_6000_0_OR_NEWER if (Object.FindFirstObjectByType() != null #else if (Object.FindObjectOfType() != null diff --git a/Packages/Tracking/Physical Hands/Runtime/Scripts/Utils/HandFadeInAtDistanceFromRealData.cs b/Packages/Tracking/Physical Hands/Runtime/Scripts/Utils/HandFadeInAtDistanceFromRealData.cs index 35148a8c13..1b2ea3132a 100644 --- a/Packages/Tracking/Physical Hands/Runtime/Scripts/Utils/HandFadeInAtDistanceFromRealData.cs +++ b/Packages/Tracking/Physical Hands/Runtime/Scripts/Utils/HandFadeInAtDistanceFromRealData.cs @@ -71,7 +71,9 @@ void FindContactHand() if (physManager == null) { -#if UNITY_6000_0_OR_NEWER +#if UNITY_6000_4_OR_NEWER + physManager = FindAnyObjectByType(); +#elif UNITY_6000_0_OR_NEWER physManager = FindFirstObjectByType(); #else physManager = FindObjectOfType();