From 03ec39a454cee827691e2c204c40d956aeb728d3 Mon Sep 17 00:00:00 2001 From: Lars Mitsem Selbekk Date: Thu, 11 Apr 2024 23:50:14 +0200 Subject: [PATCH] fix(TrainingWheels): properly disable Turns out, disabled gameobjects are re-enabled by SceneBuilder. Training Wheels therefore had to be completely removed from TableRepositionParent to be properly disabled. --- Assets/Pool Table/TablePositionParent.prefab | 67 ------------------- .../Components/HoverOnlyInteractable.cs | 1 + Assets/Scripts/Components/SceneBuilder.cs | 2 +- 3 files changed, 2 insertions(+), 68 deletions(-) diff --git a/Assets/Pool Table/TablePositionParent.prefab b/Assets/Pool Table/TablePositionParent.prefab index 4e236df..828d4b3 100644 --- a/Assets/Pool Table/TablePositionParent.prefab +++ b/Assets/Pool Table/TablePositionParent.prefab @@ -50,7 +50,6 @@ Transform: - {fileID: 5036843451127969540} - {fileID: 6445805438696576411} - {fileID: 5378912445494477106} - - {fileID: 3377091745046264099} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &834579995683216585 @@ -529,72 +528,6 @@ Transform: m_CorrespondingSourceObject: {fileID: 1307618864454866643, guid: 2f3ed8817f236bb428354a811b8bc788, type: 3} m_PrefabInstance: {fileID: 3095532059158548824} m_PrefabAsset: {fileID: 0} ---- !u!1001 &3156512007469300655 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 2976510455151270768} - m_Modifications: - - target: {fileID: 365910867471270540, guid: efb710870488ec14a9f0e8a05f5603f7, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 365910867471270540, guid: efb710870488ec14a9f0e8a05f5603f7, type: 3} - propertyPath: m_LocalPosition.y - value: 0.353 - objectReference: {fileID: 0} - - target: {fileID: 365910867471270540, guid: efb710870488ec14a9f0e8a05f5603f7, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 365910867471270540, guid: efb710870488ec14a9f0e8a05f5603f7, type: 3} - propertyPath: m_LocalRotation.w - value: 0.7071068 - objectReference: {fileID: 0} - - target: {fileID: 365910867471270540, guid: efb710870488ec14a9f0e8a05f5603f7, type: 3} - propertyPath: m_LocalRotation.x - value: 0.7071068 - objectReference: {fileID: 0} - - target: {fileID: 365910867471270540, guid: efb710870488ec14a9f0e8a05f5603f7, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 365910867471270540, guid: efb710870488ec14a9f0e8a05f5603f7, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 365910867471270540, guid: efb710870488ec14a9f0e8a05f5603f7, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 90 - objectReference: {fileID: 0} - - target: {fileID: 365910867471270540, guid: efb710870488ec14a9f0e8a05f5603f7, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 365910867471270540, guid: efb710870488ec14a9f0e8a05f5603f7, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5668290336698634722, guid: efb710870488ec14a9f0e8a05f5603f7, type: 3} - propertyPath: m_Name - value: Training Wheels - objectReference: {fileID: 0} - - target: {fileID: 5668290336698634722, guid: efb710870488ec14a9f0e8a05f5603f7, type: 3} - propertyPath: m_IsActive - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: efb710870488ec14a9f0e8a05f5603f7, type: 3} ---- !u!4 &3377091745046264099 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 365910867471270540, guid: efb710870488ec14a9f0e8a05f5603f7, type: 3} - m_PrefabInstance: {fileID: 3156512007469300655} - m_PrefabAsset: {fileID: 0} --- !u!1001 &3173756364010101495 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Components/HoverOnlyInteractable.cs b/Assets/Scripts/Components/HoverOnlyInteractable.cs index 2c55eb1..04b6b45 100644 --- a/Assets/Scripts/Components/HoverOnlyInteractable.cs +++ b/Assets/Scripts/Components/HoverOnlyInteractable.cs @@ -31,6 +31,7 @@ public class HoverOnlyInteractable : MonoBehaviour, IXRHoverInteractable private void Awake() { + // TODO: disable when there's none found/not XR _xrInteractionManager = GameObject.FindWithTag("XRInteractionManager").GetComponent(); } diff --git a/Assets/Scripts/Components/SceneBuilder.cs b/Assets/Scripts/Components/SceneBuilder.cs index 34744ec..4377b57 100644 --- a/Assets/Scripts/Components/SceneBuilder.cs +++ b/Assets/Scripts/Components/SceneBuilder.cs @@ -427,4 +427,4 @@ private void PlaceWallArt() return null; } } -} \ No newline at end of file +}