From 9dc79d3e7e1194c736cd5ce4792ec4d293a90f90 Mon Sep 17 00:00:00 2001 From: Andy Baker Date: Tue, 16 Jan 2024 12:52:49 +0000 Subject: [PATCH] UI for passthrough-related scene locking and resetting (#612) * UI for passthrough-related scene locking and resetting * Oooops --- .../PopUps/PopUpWindow_Lighting.prefab | 397 +++++++++++++++++- Assets/Scripts/GUI/LightingPopUpWindow.cs | 49 ++- Assets/Scripts/GUI/PagingPopUpWindow.cs | 2 +- Assets/Scripts/SketchControlsScript.cs | 9 +- .../Strings/Strings Shared Data.asset | 14 +- .../Localization/Strings/Strings_en.asset | 14 +- 6 files changed, 475 insertions(+), 10 deletions(-) diff --git a/Assets/Prefabs/PopUps/PopUpWindow_Lighting.prefab b/Assets/Prefabs/PopUps/PopUpWindow_Lighting.prefab index 6caadcef2a..0f26e0378b 100644 --- a/Assets/Prefabs/PopUps/PopUpWindow_Lighting.prefab +++ b/Assets/Prefabs/PopUps/PopUpWindow_Lighting.prefab @@ -31,6 +31,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: + - {fileID: 3263320002945426075} - {fileID: 290409114120223357} - {fileID: 408740} - {fileID: 487690} @@ -91,6 +92,8 @@ MonoBehaviour: m_IconGridWidthFullPage: 3 m_IconGridHeightFullPage: 3 m_IconCountNavPage: 6 + m_PassthroughControls: {fileID: 3263320002945426075} + m_WorldLockToggle: {fileID: 49204907451128460} --- !u!114 &114212356968007602 MonoBehaviour: m_ObjectHideFlags: 0 @@ -134,7 +137,7 @@ RectTransform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 453200} - m_RootOrder: 0 + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -308,7 +311,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 453200} - m_RootOrder: 2 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!33 &3367292 MeshFilter: @@ -459,7 +462,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 453200} - m_RootOrder: 1 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!33 &3326834 MeshFilter: @@ -774,5 +777,391 @@ Transform: - {fileID: 4000010903387936} - {fileID: 4000014109249168} m_Father: {fileID: 453200} - m_RootOrder: 3 + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &803001205183919858 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5740461042400327755} + - component: {fileID: 1444685892389508639} + - component: {fileID: 5437002768859787859} + - component: {fileID: 3363142244330561353} + - component: {fileID: 9154409718893019803} + m_Layer: 16 + m_Name: ActionButton_ResetCanvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5740461042400327755 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 803001205183919858} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.15, y: -0.536, z: -0.03999996} + m_LocalScale: {x: 0.2, y: 0.2, z: 0.2} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3263320002945426075} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &1444685892389508639 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 803001205183919858} + m_Mesh: {fileID: 4300000, guid: 5501f437160666942ae970f3648fbeb8, type: 3} +--- !u!23 &5437002768859787859 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 803001205183919858} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 40d29de2bdc11f04dbfa25059165916e, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!65 &3363142244330561353 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 803001205183919858} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 0.1} + m_Center: {x: -0.000000074505806, y: 0.000000022351742, z: 0} +--- !u!114 &9154409718893019803 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 803001205183919858} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 07f172f1096366841bb9362060bb0095, type: 3} + m_Name: + m_EditorClassIdentifier: + m_DescriptionType: 0 + m_DescriptionYOffset: 0 + m_DescriptionText: ENVIRONMENT_PANEL_RESET_CANVAS + m_LocalizedDescription: + m_TableReference: + m_TableCollectionName: GUID:c84355079ab3f3e4f8f3812258805f86 + m_TableEntryReference: + m_KeyId: 188791089062830080 + m_Key: + m_FallbackState: 0 + m_WaitForCompletion: 0 + m_LocalVariables: [] + m_DescriptionTextExtra: + m_LocalizedDescriptionExtra: + m_TableReference: + m_TableCollectionName: + m_TableEntryReference: + m_KeyId: 0 + m_Key: + m_FallbackState: 0 + m_WaitForCompletion: 0 + m_LocalVariables: [] + m_DescriptionActivateSpeed: 12 + m_DescriptionZScale: 1 + m_ButtonTexture: {fileID: 2800000, guid: ceb2cddabb736164abcdad015d0c2f4a, type: 3} + m_AtlasTexture: 1 + m_ToggleButton: 0 + m_LongPressReleaseButton: 0 + m_ButtonHasPressedAudio: 0 + m_ZAdjustHover: -0.02 + m_ZAdjustClick: 0.02 + m_HoverScale: 1.1 + m_HoverBoxColliderGrow: 0.2 + m_AddOverlay: 0 + m_Action: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 11413274} + m_TargetAssemblyTypeName: TiltBrush.LightingPopUpWindow, Assembly-CSharp + m_MethodName: HandleCanvasReset + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 9154409718893019803} + m_ObjectArgumentAssemblyTypeName: TiltBrush.ActionButton, Assembly-CSharp + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + references: + version: 2 + RefIds: [] +--- !u!1 &3726072679493416008 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5834472353060674108} + - component: {fileID: 2370982028641496791} + - component: {fileID: 2689777246598844651} + - component: {fileID: 7008082184896295508} + - component: {fileID: 49204907451128460} + m_Layer: 16 + m_Name: ToggleButton_LockCanvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5834472353060674108 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3726072679493416008} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.15, y: -0.536, z: -0.03999996} + m_LocalScale: {x: 0.2, y: 0.2, z: 0.2} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3263320002945426075} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &2370982028641496791 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3726072679493416008} + m_Mesh: {fileID: 4300000, guid: 5501f437160666942ae970f3648fbeb8, type: 3} +--- !u!23 &2689777246598844651 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3726072679493416008} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 40d29de2bdc11f04dbfa25059165916e, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!65 &7008082184896295508 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3726072679493416008} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 0.1} + m_Center: {x: -0.000000074505806, y: 0.000000022351742, z: 0} +--- !u!114 &49204907451128460 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3726072679493416008} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1d24b89fbd7e49a59e0c07ded4dd0713, type: 3} + m_Name: + m_EditorClassIdentifier: + m_DescriptionType: 0 + m_DescriptionYOffset: 0 + m_DescriptionText: ENVIRONMENT_PANEL_LOCK_CANVAS + m_LocalizedDescription: + m_TableReference: + m_TableCollectionName: GUID:c84355079ab3f3e4f8f3812258805f86 + m_TableEntryReference: + m_KeyId: 188791266398003200 + m_Key: + m_FallbackState: 0 + m_WaitForCompletion: 0 + m_LocalVariables: [] + m_DescriptionTextExtra: + m_LocalizedDescriptionExtra: + m_TableReference: + m_TableCollectionName: + m_TableEntryReference: + m_KeyId: 0 + m_Key: + m_FallbackState: 0 + m_WaitForCompletion: 0 + m_LocalVariables: [] + m_DescriptionActivateSpeed: 12 + m_DescriptionZScale: 1 + m_ButtonTexture: {fileID: 2800000, guid: 5c5ad7d30a5daf049a4d927ddd367487, type: 3} + m_AtlasTexture: 1 + m_ToggleButton: 1 + m_LongPressReleaseButton: 0 + m_ButtonHasPressedAudio: 0 + m_ZAdjustHover: -0.02 + m_ZAdjustClick: 0.02 + m_HoverScale: 1.1 + m_HoverBoxColliderGrow: 0.2 + m_AddOverlay: 0 + m_Command: 0 + m_CommandParam: -1 + m_CommandParam2: -1 + m_RequiresPopup: 0 + m_CenterPopupOnButton: 0 + m_PopupOffset: {x: 0, y: 0, z: 0} + m_PopupText: + m_LocalizedPopup: + m_TableReference: + m_TableCollectionName: + m_TableEntryReference: + m_KeyId: 0 + m_Key: + m_FallbackState: 0 + m_WaitForCompletion: 0 + m_LocalVariables: [] + m_ToggleOnDescription: ENVIRONMENT_PANEL_UNLOCK_CANVAS + m_LocalizedToggleOnDescription: + m_TableReference: + m_TableCollectionName: GUID:c84355079ab3f3e4f8f3812258805f86 + m_TableEntryReference: + m_KeyId: 188792931159203840 + m_Key: + m_FallbackState: 0 + m_WaitForCompletion: 0 + m_LocalVariables: [] + m_ToggleOnTexture: {fileID: 2800000, guid: 47c05a72da0035c41bae4c38a177f40b, type: 3} + m_AllowUnavailable: 0 + m_LinkedUIObject: {fileID: 0} + m_OnToggle: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 11413274} + m_TargetAssemblyTypeName: TiltBrush.LightingPopUpWindow, Assembly-CSharp + m_MethodName: HandleCanvasLockToggle + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + references: + version: 2 + RefIds: [] +--- !u!1 &7521009162040768280 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3263320002945426075} + m_Layer: 16 + m_Name: Passthrough Controls + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3263320002945426075 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7521009162040768280} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5834472353060674108} + - {fileID: 5740461042400327755} + m_Father: {fileID: 453200} + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/Scripts/GUI/LightingPopUpWindow.cs b/Assets/Scripts/GUI/LightingPopUpWindow.cs index 430410b23d..61be8830df 100644 --- a/Assets/Scripts/GUI/LightingPopUpWindow.cs +++ b/Assets/Scripts/GUI/LightingPopUpWindow.cs @@ -19,6 +19,7 @@ #define PASSTHROUGH_SUPPORTED #endif +using System; using UnityEngine; using System.Collections.Generic; using System.Linq; @@ -28,7 +29,12 @@ namespace TiltBrush public class LightingPopUpWindow : PagingPopUpWindow { + private const string PASSTHROUGH_GUID = "e38af599-4575-46ff-a040-459703dbcd36"; + private string m_CurrentPresetGuid; + [SerializeField] private Transform m_PassthroughControls; + [SerializeField] private ToggleButton m_WorldLockToggle; + private List m_Environments; protected override int m_DataCount @@ -50,6 +56,9 @@ protected override void RefreshIcon(PagingPopUpWindow.ImageIcon icon, int iCatal override public void Init(GameObject rParent, string sText) { + m_PassthroughControls.gameObject.SetActive(false); + m_WorldLockToggle.IsToggledOn = SketchControlsScript.m_Instance.m_DisableWorldGrabbing; + //build list of lighting presets we're going to show m_Environments = EnvironmentCatalog.m_Instance.AllEnvironments.ToList(); @@ -58,7 +67,7 @@ override public void Init(GameObject rParent, string sText) foreach (var env in m_Environments) { // Passthrough - if (env.m_Guid.ToString() == "e38af599-4575-46ff-a040-459703dbcd36") + if (env.m_Guid.ToString() == PASSTHROUGH_GUID) { m_Environments.Remove(env); break; @@ -73,6 +82,7 @@ override public void Init(GameObject rParent, string sText) //find the index of our current preset in the preset list int iPresetIndex = -1; m_CurrentPresetGuid = rCurrentPreset.m_Guid.ToString(); + for (int i = 0; i < m_Environments.Count; ++i) { if (m_Environments[i].m_Guid.ToString() == m_CurrentPresetGuid) @@ -96,12 +106,49 @@ override public void Init(GameObject rParent, string sText) base.Init(rParent, sText); } + public void HandleCanvasLockToggle() + { + SketchControlsScript.m_Instance.m_DisableWorldGrabbing = m_WorldLockToggle.IsToggledOn; + } + + public void HandleCanvasReset(ActionButton btn) + { + SketchControlsScript.m_Instance.ResetGrabbedPose(true); + } + + override protected void RefreshPage() + { + base.RefreshPage(); + bool passthroughActive = m_CurrentPresetGuid == PASSTHROUGH_GUID; + if (passthroughActive) + { + m_PassthroughControls.gameObject.SetActive(true); + } + else + { + m_PassthroughControls.gameObject.SetActive(false); + } + } + protected void OnFadingToDesiredEnvironment() { TiltBrush.Environment rCurrentPreset = SceneSettings.m_Instance.GetDesiredPreset(); if (rCurrentPreset != null) { m_CurrentPresetGuid = rCurrentPreset.m_Guid.ToString(); + bool passthroughActive = m_CurrentPresetGuid == PASSTHROUGH_GUID; + if (passthroughActive) + { + m_PassthroughControls.gameObject.SetActive(true); + m_WorldLockToggle.IsToggledOn = true; + SketchControlsScript.m_Instance.m_DisableWorldGrabbing = true; + } + else + { + m_PassthroughControls.gameObject.SetActive(false); + m_WorldLockToggle.IsToggledOn = false; + SketchControlsScript.m_Instance.m_DisableWorldGrabbing = false; + } } RefreshPage(); } diff --git a/Assets/Scripts/GUI/PagingPopUpWindow.cs b/Assets/Scripts/GUI/PagingPopUpWindow.cs index 12ead53c02..86dddc6f27 100644 --- a/Assets/Scripts/GUI/PagingPopUpWindow.cs +++ b/Assets/Scripts/GUI/PagingPopUpWindow.cs @@ -150,7 +150,7 @@ void UpdateIconTransitionScale(float fScale) } } - protected void RefreshPage() + protected virtual void RefreshPage() { //if we can fit all the icons on one page, turn off the nav buttons and do that if (m_DataCount <= m_IconCountFullPage) diff --git a/Assets/Scripts/SketchControlsScript.cs b/Assets/Scripts/SketchControlsScript.cs index 6b828d38cd..ed57d8adf5 100644 --- a/Assets/Scripts/SketchControlsScript.cs +++ b/Assets/Scripts/SketchControlsScript.cs @@ -351,6 +351,8 @@ enum GrabIntersectionState [SerializeField] int m_NumStrokesForSaveIcon = 50; [NonSerialized] public Color m_GrabHighlightActiveColor; + [NonSerialized] public bool m_DisableWorldGrabbing = false; + /// Throwing an object faster than this means it's a "toss". Units are m/s. public float m_TossThresholdMeters = 3f; /// Angular motion contributes more towards the toss velocity the larger the object is; @@ -939,6 +941,8 @@ void Start() m_GrabWidgetState = GrabWidgetState.None; UpdateDraftingVisibility(); + + m_DisableWorldGrabbing = false; } private IEnumerator DelayedHidePanels(int frames) @@ -2457,7 +2461,8 @@ void UpdateGrab_World() bool bAllowWorldTransform = m_SketchSurfacePanel.ActiveTool.AllowWorldTransformation() && (m_GrabWorldState != GrabWorldState.ResetDone) && (!PointerManager.m_Instance.IsMainPointerCreatingStroke() || App.Instance.IsLoading()) && - App.Instance.IsInStateThatAllowsAnyGrabbing(); + App.Instance.IsInStateThatAllowsAnyGrabbing() && + !m_DisableWorldGrabbing; bool bWorldGrabWandPrev = m_GrabWand.grabbingWorld; bool bWorldGrabBrushPrev = m_GrabBrush.grabbingWorld; @@ -3746,7 +3751,7 @@ Quaternion OrientSketchSurfaceToForward() } /// Reset the scene or the canvas, depending on the current mode - void ResetGrabbedPose(bool everything = false) + public void ResetGrabbedPose(bool everything = false) { //update sketch surface position with offset to sweet spot m_SketchSurface.transform.position = m_PanelManager.GetSketchSurfaceResetPos(); diff --git a/Assets/Settings/Localization/Strings/Strings Shared Data.asset b/Assets/Settings/Localization/Strings/Strings Shared Data.asset index c507832f42..1050ad76ad 100644 --- a/Assets/Settings/Localization/Strings/Strings Shared Data.asset +++ b/Assets/Settings/Localization/Strings/Strings Shared Data.asset @@ -11,7 +11,7 @@ MonoBehaviour: m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 5b11a58205ec3474ca216360e9fa74a8, type: 3} m_Name: Strings Shared Data - m_EditorClassIdentifier: + m_EditorClassIdentifier: m_TableCollectionName: Strings m_TableCollectionNameGuidString: c84355079ab3f3e4f8f3812258805f86 m_Entries: @@ -3279,6 +3279,18 @@ MonoBehaviour: m_Key: CONTROLLER_HINT_THUMBPAD_BRUSHSIZE m_Metadata: m_Items: [] + - m_Id: 188791089062830080 + m_Key: ENVIRONMENT_PANEL_RESET_CANVAS + m_Metadata: + m_Items: [] + - m_Id: 188791266398003200 + m_Key: ENVIRONMENT_PANEL_LOCK_CANVAS + m_Metadata: + m_Items: [] + - m_Id: 188792931159203840 + m_Key: ENVIRONMENT_PANEL_UNLOCK_CANVAS + m_Metadata: + m_Items: [] - m_Id: 189087250755706880 m_Key: POPUP_UPLOAD_COMPLETE_MOBILE_DESCRIPTION m_Metadata: diff --git a/Assets/Settings/Localization/Strings/Strings_en.asset b/Assets/Settings/Localization/Strings/Strings_en.asset index cfe541aefd..22810f3509 100644 --- a/Assets/Settings/Localization/Strings/Strings_en.asset +++ b/Assets/Settings/Localization/Strings/Strings_en.asset @@ -11,7 +11,7 @@ MonoBehaviour: m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: e9620f8c34305754d8cc9a7e49e852d9, type: 3} m_Name: Strings_en - m_EditorClassIdentifier: + m_EditorClassIdentifier: m_LocaleId: m_Code: en m_SharedData: {fileID: 11400000, guid: c84355079ab3f3e4f8f3812258805f86, type: 2} @@ -3477,6 +3477,18 @@ MonoBehaviour: to public (free Sketchfab accounts can't publish private models) m_Metadata: m_Items: [] + - m_Id: 188791089062830080 + m_Localized: Reset Canvas Position + m_Metadata: + m_Items: [] + - m_Id: 188791266398003200 + m_Localized: Lock Canvas Position + m_Metadata: + m_Items: [] + - m_Id: 188792931159203840 + m_Localized: Unlock Canvas Position + m_Metadata: + m_Items: [] references: version: 2 RefIds: []