Initialer Upload neues Unity-Projekt
This commit is contained in:
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/LocalizedHapticsSample.unity
(Stored with Git LFS)
Normal file
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/LocalizedHapticsSample.unity
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 11d7e44745b2f574db3a261b31ca4fd9
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d671a11430ff83149aefd72e07029752
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,78 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: GroundMat
|
||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords: _EMISSION
|
||||
m_LightmapFlags: 1
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 2039e650dd82139458fe32536e3bb9f7, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.2
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 0.3584906, g: 0.3567996, b: 0.3567996, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dc32b8fb317b6d5488f28b92e6f61860
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,78 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: TableMat
|
||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords: _EMISSION
|
||||
m_LightmapFlags: 1
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 2039e650dd82139458fe32536e3bb9f7, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 0.5377358, g: 0.5377358, b: 0.5377358, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e7b3963e7b64bd5428c8ca22fc5443a3
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2be5fa39704a11048affca21c014fbb1
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Prefabs/SceneSettingsPf.prefab
(Stored with Git LFS)
Normal file
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Prefabs/SceneSettingsPf.prefab
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 91d1086af687a1b4ba6b24b879290d7d
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 913230a5f71620b4a8b69ecae8a823ef
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Prefabs/StylusTip/StylusTipBreadCrumbPf.prefab
(Stored with Git LFS)
Normal file
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Prefabs/StylusTip/StylusTipBreadCrumbPf.prefab
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 737cbb352eac8f04d8242de1c303e9fa
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Prefabs/StylusTip/StylusTipPf.prefab
(Stored with Git LFS)
Normal file
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Prefabs/StylusTip/StylusTipPf.prefab
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8851c2fd403d17444a83e2f3fbdb4044
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2f21aa3d7a8faf44a9b05d6746b745a8
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Prefabs/Ui/UiAxis1dInspectorPf.prefab
(Stored with Git LFS)
Normal file
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Prefabs/Ui/UiAxis1dInspectorPf.prefab
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f68c9906e47541d4788727341a012a42
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Prefabs/Ui/UiAxis2dInspectorPf.prefab
(Stored with Git LFS)
Normal file
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Prefabs/Ui/UiAxis2dInspectorPf.prefab
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b739f40605e17c4418d9bf88647bc9a7
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Prefabs/Ui/UiBoolInspectorPf.prefab
(Stored with Git LFS)
Normal file
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Prefabs/Ui/UiBoolInspectorPf.prefab
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ab85a3cdfda1cca40bc90ea89675820b
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Prefabs/Ui/UiLabelPf.prefab
(Stored with Git LFS)
Normal file
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Prefabs/Ui/UiLabelPf.prefab
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d7b2f16bb17bd7e45b1b5759b2bcfbc5
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Prefabs/Ui/UiPanelGroupPf.prefab
(Stored with Git LFS)
Normal file
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Prefabs/Ui/UiPanelGroupPf.prefab
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 50fdc7791c1824048b0ba560f3bf7e1c
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Prefabs/Ui/UiPanelPf (Controls - LocalizedHaptics).prefab
(Stored with Git LFS)
Normal file
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Prefabs/Ui/UiPanelPf (Controls - LocalizedHaptics).prefab
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6f4845ad3efc4e343bb7dc7de09c0b54
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Prefabs/Ui/UiPanelPf (Controls - SelfTracking).prefab
(Stored with Git LFS)
Normal file
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Prefabs/Ui/UiPanelPf (Controls - SelfTracking).prefab
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e42a6f3d5305d4c41aa7cb12ed1addf4
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Prefabs/Ui/UiPanelPf (Controls - StylusTip).prefab
(Stored with Git LFS)
Normal file
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Prefabs/Ui/UiPanelPf (Controls - StylusTip).prefab
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ba6d5acb8f8b6b54a9255cac79e99ae5
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Prefabs/Ui/UiPanelPf (ControlsBase).prefab
(Stored with Git LFS)
Normal file
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Prefabs/Ui/UiPanelPf (ControlsBase).prefab
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3ab42a0dcf16df14781a4e7589e4689f
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Prefabs/Ui/UiPanelPf (DeviceInspector).prefab
(Stored with Git LFS)
Normal file
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Prefabs/Ui/UiPanelPf (DeviceInspector).prefab
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9386533b59176fe4a99971e3de83d8dc
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Prefabs/Ui/UiPanelPf (SceneMenu).prefab
(Stored with Git LFS)
Normal file
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Prefabs/Ui/UiPanelPf (SceneMenu).prefab
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4c87b8ba85296774fa0da11db5282f2d
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Prefabs/Ui/UiPanelPf.prefab
(Stored with Git LFS)
Normal file
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Prefabs/Ui/UiPanelPf.prefab
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 15968ea8ca93ff345bc914f1f3e78225
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 479fc3136aaf97c44b3bd96fe24ed1c5
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b71f6a8330eca3849a8ab895f86704f3
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,31 @@
|
||||
// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
public class LocalizedHaptics : MonoBehaviour
|
||||
{
|
||||
[Header("Settings")]
|
||||
[SerializeField] private OVRInput.Handedness m_handedness = OVRInput.Handedness.LeftHanded;
|
||||
|
||||
private OVRInput.Controller m_controller;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
m_controller = m_handedness == OVRInput.Handedness.LeftHanded
|
||||
? OVRInput.Controller.LTouch
|
||||
: OVRInput.Controller.RTouch;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
// Build vibration for the frame based on device inputs
|
||||
float thumbAmp = OVRInput.Get(OVRInput.Axis1D.PrimaryThumbRestForce, m_controller) > 0.5f ? 1f : 0f;
|
||||
OVRInput.SetControllerLocalizedVibration(OVRInput.HapticsLocation.Thumb, 0f, thumbAmp, m_controller);
|
||||
|
||||
float indexAmp = OVRInput.Get(OVRInput.Axis1D.PrimaryIndexTrigger, m_controller) > 0.5f ? 1f : 0f;
|
||||
OVRInput.SetControllerLocalizedVibration(OVRInput.HapticsLocation.Index, 0f, indexAmp, m_controller);
|
||||
|
||||
float handAmp = OVRInput.Get(OVRInput.Axis1D.PrimaryHandTrigger, m_controller) > 0.5f ? 1f : 0f;
|
||||
OVRInput.SetControllerLocalizedVibration(OVRInput.HapticsLocation.Hand, 0f, handAmp, m_controller);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a9934e1fe91ce6246bc5d27934aa09f8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,41 @@
|
||||
// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
public class SceneSettings : MonoBehaviour
|
||||
{
|
||||
[Header("Time")]
|
||||
[SerializeField] private float m_fixedTimeStep = 0.01f;
|
||||
|
||||
[Header("Physics")]
|
||||
[SerializeField] private float m_gravityScalar = 0.75f;
|
||||
|
||||
[SerializeField] private float m_defaultContactOffset = 0.001f;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
// Time
|
||||
Time.fixedDeltaTime = m_fixedTimeStep;
|
||||
|
||||
// Physics
|
||||
Physics.gravity = Vector3.down * 9.81f * m_gravityScalar;
|
||||
Physics.defaultContactOffset = m_defaultContactOffset;
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
// Update the contact offset for all existing colliders since setting
|
||||
// Physics.defaultContactOffset only applies to newly created colliders.
|
||||
CollidersSetContactOffset(m_defaultContactOffset);
|
||||
}
|
||||
|
||||
private static void CollidersSetContactOffset(float contactOffset)
|
||||
{
|
||||
// @Note: This does not find inactive objects.
|
||||
Collider[] allColliders = GameObject.FindObjectsOfType<Collider>();
|
||||
foreach (Collider collider in allColliders)
|
||||
{
|
||||
collider.contactOffset = contactOffset;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 029a39db456d2904caf61d65c65512ff
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 94854e6b5488b6f4989456027cd743b7
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,115 @@
|
||||
// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
public class StylusTip : MonoBehaviour
|
||||
{
|
||||
private const int MaxBreadCrumbs = 60;
|
||||
private const float BreadCrumbMinSize = 0.005f;
|
||||
private const float BreadCrumbMaxSize = 0.02f;
|
||||
|
||||
[Header("External")]
|
||||
[SerializeField] private Transform m_trackingSpace;
|
||||
|
||||
[Header("Settings")]
|
||||
[SerializeField] private OVRInput.Handedness m_handedness = OVRInput.Handedness.LeftHanded;
|
||||
|
||||
[SerializeField] private GameObject m_breadCrumbPf;
|
||||
|
||||
private GameObject m_breadCrumbContainer;
|
||||
private GameObject[] m_breadCrumbs;
|
||||
|
||||
private int m_breadCrumbIndexPrev = -1;
|
||||
private int m_breadCrumbIndexCurr = 0;
|
||||
|
||||
private OVRInput.Controller m_controller;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
m_controller = m_handedness == OVRInput.Handedness.LeftHanded
|
||||
? OVRInput.Controller.LTouch
|
||||
: OVRInput.Controller.RTouch;
|
||||
|
||||
// Create the bread crumbs
|
||||
m_breadCrumbContainer = new GameObject($"BreadCrumbContainer ({m_handedness})");
|
||||
m_breadCrumbs = new GameObject[MaxBreadCrumbs];
|
||||
for (int i = 0; i < m_breadCrumbs.Length; ++i)
|
||||
{
|
||||
// Create bread crumb
|
||||
GameObject breadCrumb = GameObject.Instantiate(m_breadCrumbPf, m_breadCrumbContainer.transform);
|
||||
breadCrumb.name = $"BreadCrumb ({i})";
|
||||
breadCrumb.SetActive(false);
|
||||
|
||||
// Store bread crumb
|
||||
m_breadCrumbs[i] = breadCrumb;
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
// Update stylus tip position
|
||||
Pose T_device = new Pose(OVRInput.GetLocalControllerPosition(m_controller),
|
||||
OVRInput.GetLocalControllerRotation(m_controller));
|
||||
Pose T_world_device = T_device.GetTransformedBy(m_trackingSpace);
|
||||
Pose T_world_stylusTip = GetT_Device_StylusTip(m_controller).GetTransformedBy(T_world_device);
|
||||
this.transform.SetPositionAndRotation(T_world_stylusTip.position, T_world_stylusTip.rotation);
|
||||
|
||||
// Get stylus tip data
|
||||
float stylusTipForce = OVRInput.Get(OVRInput.Axis1D.PrimaryStylusForce, m_controller);
|
||||
bool isStylusTipTouching = stylusTipForce > 0;
|
||||
|
||||
// Set the next crumb position
|
||||
GameObject nextCrumb = m_breadCrumbs[m_breadCrumbIndexCurr];
|
||||
nextCrumb.transform.position = this.transform.position;
|
||||
|
||||
// Set next crumb visuals based on stylus tip force
|
||||
float nextCrumbSize = Mathf.Lerp(BreadCrumbMinSize, BreadCrumbMaxSize, stylusTipForce);
|
||||
nextCrumb.transform.localScale = new Vector3(nextCrumbSize, nextCrumbSize, nextCrumbSize);
|
||||
nextCrumb.GetComponent<MeshRenderer>().material.color = Color.Lerp(Color.white, Color.red, stylusTipForce);
|
||||
nextCrumb.SetActive(isStylusTipTouching);
|
||||
|
||||
float crumbSeparation = 0;
|
||||
float distanceToPrevCrumb = Mathf.Infinity;
|
||||
if (m_breadCrumbIndexPrev >= 0)
|
||||
{
|
||||
// Compute next crumb distance to stylus tip
|
||||
distanceToPrevCrumb = (this.transform.position - m_breadCrumbs[m_breadCrumbIndexPrev].transform.position)
|
||||
.magnitude;
|
||||
|
||||
// Compute next crumb separation by averaging the previous and next crumb sizes
|
||||
crumbSeparation = (nextCrumbSize + m_breadCrumbs[m_breadCrumbIndexPrev].transform.localScale.x) * 0.5f;
|
||||
}
|
||||
|
||||
// Determine if a new crumb should drop
|
||||
if (isStylusTipTouching && (distanceToPrevCrumb >= crumbSeparation))
|
||||
{
|
||||
// Drop the crumb
|
||||
m_breadCrumbIndexPrev = m_breadCrumbIndexCurr;
|
||||
m_breadCrumbIndexCurr = (m_breadCrumbIndexCurr + 1) % m_breadCrumbs.Length;
|
||||
}
|
||||
}
|
||||
|
||||
private static Pose GetT_Device_StylusTip(OVRInput.Controller controller)
|
||||
{
|
||||
// @Note: Only the next controller supports the stylus tip, but we compute the
|
||||
// transforms for all controllers so we can draw the tip at the correct location.
|
||||
Pose T_device_stylusTip = Pose.identity;
|
||||
|
||||
if (controller == OVRInput.Controller.LTouch || controller == OVRInput.Controller.RTouch)
|
||||
{
|
||||
T_device_stylusTip = new Pose(
|
||||
new Vector3(0.0094f, -0.07145f, -0.07565f),
|
||||
Quaternion.Euler(35.305f, 50.988f, 37.901f)
|
||||
);
|
||||
}
|
||||
|
||||
if (controller == OVRInput.Controller.LTouch)
|
||||
{
|
||||
T_device_stylusTip.position.x *= -1;
|
||||
T_device_stylusTip.rotation.y *= -1;
|
||||
T_device_stylusTip.rotation.z *= -1;
|
||||
}
|
||||
|
||||
return T_device_stylusTip;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7403a7cb4696f3043903f5a10961ee1a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5622c3221cbe1b546acfb55d9d5a6467
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,40 @@
|
||||
// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using TMPro;
|
||||
|
||||
public class UiAxis1dInspector : MonoBehaviour
|
||||
{
|
||||
[Header("Settings")]
|
||||
[SerializeField] private float m_minExtent = 0;
|
||||
|
||||
[SerializeField] private float m_maxExtent = 1;
|
||||
|
||||
[Header("Components")]
|
||||
[SerializeField] private TextMeshProUGUI m_nameLabel = null;
|
||||
|
||||
[SerializeField] private TextMeshProUGUI m_valueLabel = null;
|
||||
[SerializeField] private Slider m_slider = null;
|
||||
|
||||
public void SetExtents(float minExtent, float maxExtent)
|
||||
{
|
||||
m_minExtent = minExtent;
|
||||
m_maxExtent = maxExtent;
|
||||
}
|
||||
|
||||
public void SetName(string name)
|
||||
{
|
||||
m_nameLabel.text = name;
|
||||
}
|
||||
|
||||
public void SetValue(float value)
|
||||
{
|
||||
m_valueLabel.text = string.Format("[{0}]", value.ToString("f2"));
|
||||
|
||||
m_slider.minValue = Mathf.Min(value, m_minExtent);
|
||||
m_slider.maxValue = Mathf.Max(value, m_maxExtent);
|
||||
|
||||
m_slider.value = value;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dcf3246473f1a024e8f952f2a56a10c2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,53 @@
|
||||
// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using TMPro;
|
||||
|
||||
public class UiAxis2dInspector : MonoBehaviour
|
||||
{
|
||||
[Header("Settings")]
|
||||
[SerializeField] private Vector2 m_xExtent = new Vector2(-1, +1);
|
||||
|
||||
[SerializeField] private Vector2 m_yExtent = new Vector2(-1, +1);
|
||||
|
||||
[Header("Components")]
|
||||
[SerializeField] private TextMeshProUGUI m_nameLabel = null;
|
||||
|
||||
[SerializeField] private TextMeshProUGUI m_valueLabel = null;
|
||||
[SerializeField] private Image m_handle = null;
|
||||
|
||||
public void SetExtents(Vector2 xExtent, Vector2 yExtent)
|
||||
{
|
||||
m_xExtent = xExtent;
|
||||
m_yExtent = yExtent;
|
||||
}
|
||||
|
||||
public void SetName(string name)
|
||||
{
|
||||
m_nameLabel.text = name;
|
||||
}
|
||||
|
||||
public void SetValue(bool isTouching, Vector2 value)
|
||||
{
|
||||
m_handle.color = isTouching ? Color.white : new Color(0.2f, 0.2f, 0.2f);
|
||||
|
||||
Vector2 clampedValue = new Vector2(
|
||||
Mathf.Clamp(value.x, m_xExtent.x, m_xExtent.y),
|
||||
Mathf.Clamp(value.y, m_yExtent.x, m_yExtent.y)
|
||||
);
|
||||
|
||||
m_valueLabel.text = $"[{clampedValue.x.ToString("f2")}, {clampedValue.y.ToString("f2")}]";
|
||||
|
||||
RectTransform parentRect = m_handle.transform.parent.GetComponent<RectTransform>();
|
||||
Vector2 parentSize = (parentRect != null)
|
||||
? new Vector2(Mathf.Abs(parentRect.sizeDelta.x), Mathf.Abs(parentRect.sizeDelta.y))
|
||||
: new Vector2(Mathf.Abs(m_xExtent.y - m_xExtent.x), Mathf.Abs(m_yExtent.y - m_yExtent.x));
|
||||
|
||||
m_handle.transform.localPosition = new Vector3(
|
||||
clampedValue.x * parentSize.x * 0.5f,
|
||||
clampedValue.y * parentSize.y * 0.5f,
|
||||
0
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1c0717b533f75054d93d184c48b4b8d8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,23 @@
|
||||
// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
|
||||
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class UiBoolInspector : MonoBehaviour
|
||||
{
|
||||
[Header("Components")]
|
||||
[SerializeField] private TextMeshProUGUI m_nameLabel = null;
|
||||
|
||||
[SerializeField] private Toggle m_toggle = null;
|
||||
|
||||
public void SetName(string name)
|
||||
{
|
||||
m_nameLabel.text = name;
|
||||
}
|
||||
|
||||
public void SetValue(bool value)
|
||||
{
|
||||
m_toggle.isOn = value;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c25d8f20d93560f47bf604ec2dfc098c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,106 @@
|
||||
// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
|
||||
|
||||
using UnityEngine;
|
||||
using TMPro;
|
||||
|
||||
public class UiDeviceInspector : MonoBehaviour
|
||||
{
|
||||
[Header("Settings")]
|
||||
[SerializeField] private OVRInput.Handedness m_handedness = OVRInput.Handedness.LeftHanded;
|
||||
|
||||
[Header("Left Column Components")]
|
||||
[SerializeField] private TextMeshProUGUI m_title;
|
||||
|
||||
[SerializeField] private TextMeshProUGUI m_status;
|
||||
|
||||
[SerializeField] private UiBoolInspector m_thumbRestTouch;
|
||||
[SerializeField] private UiAxis1dInspector m_thumbRestForce;
|
||||
[SerializeField] private UiAxis1dInspector m_indexTrigger;
|
||||
[SerializeField] private UiAxis1dInspector m_gripTrigger;
|
||||
[SerializeField] private UiAxis1dInspector m_stylusTipForce;
|
||||
|
||||
[SerializeField] private UiAxis1dInspector m_indexCurl1d;
|
||||
[SerializeField] private UiAxis1dInspector m_indexSlider1d;
|
||||
|
||||
[Header("Right Column Components")]
|
||||
[SerializeField] private UiBoolInspector m_ax;
|
||||
|
||||
[SerializeField] private UiBoolInspector m_axTouch;
|
||||
[SerializeField] private UiBoolInspector m_by;
|
||||
[SerializeField] private UiBoolInspector m_byTouch;
|
||||
[SerializeField] private UiBoolInspector m_indexTouch;
|
||||
|
||||
[SerializeField] private UiAxis2dInspector m_thumbstick;
|
||||
|
||||
private OVRInput.Controller m_controller;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
m_controller = m_handedness == OVRInput.Handedness.LeftHanded
|
||||
? OVRInput.Controller.LTouch
|
||||
: OVRInput.Controller.RTouch;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
// Set device title
|
||||
string deviceTitle = $"{ToDeviceModel()} [{ToHandednessString(m_handedness)}]";
|
||||
m_title.SetText(deviceTitle);
|
||||
|
||||
// Set status flags
|
||||
string connectionState = OVRInput.IsControllerConnected(m_controller)
|
||||
? "<color=#66ff87>o</color>"
|
||||
: "<color=#ff8991>x</color>";
|
||||
bool isTracked = OVRInput.GetControllerOrientationTracked(m_controller) &&
|
||||
OVRInput.GetControllerPositionTracked(m_controller);
|
||||
string trackingState = isTracked ? "<color=#66ff87>o</color>" : "<color=#ff8991>x</color>";
|
||||
m_status.SetText($"Connected [{connectionState}] Tracked [{trackingState}]");
|
||||
|
||||
// ThumbRest force and triggers
|
||||
m_thumbRestTouch.SetValue(OVRInput.Get(OVRInput.Touch.PrimaryThumbRest, m_controller));
|
||||
m_indexTrigger.SetValue(OVRInput.Get(OVRInput.Axis1D.PrimaryIndexTrigger, m_controller));
|
||||
m_gripTrigger.SetValue(OVRInput.Get(OVRInput.Axis1D.PrimaryHandTrigger, m_controller));
|
||||
|
||||
m_thumbRestForce.SetValue(OVRInput.Get(OVRInput.Axis1D.PrimaryThumbRestForce, m_controller));
|
||||
|
||||
// Stylus tip
|
||||
m_stylusTipForce.SetValue(OVRInput.Get(OVRInput.Axis1D.PrimaryStylusForce, m_controller));
|
||||
|
||||
// Index capsense
|
||||
m_indexCurl1d.SetValue(OVRInput.Get(OVRInput.Axis1D.PrimaryIndexTriggerCurl, m_controller));
|
||||
m_indexSlider1d.SetValue(OVRInput.Get(OVRInput.Axis1D.PrimaryIndexTriggerSlide, m_controller));
|
||||
|
||||
// Face buttons
|
||||
m_ax.SetValue(OVRInput.Get(OVRInput.Button.One, m_controller));
|
||||
m_axTouch.SetValue(OVRInput.Get(OVRInput.Touch.One, m_controller));
|
||||
m_by.SetValue(OVRInput.Get(OVRInput.Button.Two, m_controller));
|
||||
m_byTouch.SetValue(OVRInput.Get(OVRInput.Touch.Two, m_controller));
|
||||
;
|
||||
|
||||
// Index touch
|
||||
m_indexTouch.SetValue(OVRInput.Get(OVRInput.Touch.PrimaryIndexTrigger, m_controller));
|
||||
|
||||
// Thumbstick position & touch
|
||||
m_thumbstick.SetValue(OVRInput.Get(OVRInput.Touch.PrimaryThumbstick, m_controller),
|
||||
OVRInput.Get(OVRInput.Axis2D.PrimaryThumbstick, m_controller));
|
||||
}
|
||||
|
||||
private static string ToDeviceModel()
|
||||
{
|
||||
return "Touch";
|
||||
}
|
||||
|
||||
private static string ToHandednessString(OVRInput.Handedness handedness)
|
||||
{
|
||||
switch (handedness)
|
||||
{
|
||||
case OVRInput.Handedness.LeftHanded:
|
||||
return "L";
|
||||
|
||||
case OVRInput.Handedness.RightHanded:
|
||||
return "R";
|
||||
}
|
||||
|
||||
return "-";
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e6c7e66b7c8ee684ab35e741ee622a32
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,113 @@
|
||||
// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
|
||||
|
||||
using System.Text.RegularExpressions;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
using TMPro;
|
||||
|
||||
public class UiSceneMenu : MonoBehaviour
|
||||
{
|
||||
[Header("Settings")]
|
||||
[SerializeField] private VerticalLayoutGroup m_layoutGroup = null;
|
||||
|
||||
[SerializeField] private TextMeshProUGUI m_labelPf = null;
|
||||
|
||||
private static Vector2 s_lastThumbstickL;
|
||||
private static Vector2 s_lastThumbstickR;
|
||||
|
||||
private Scene m_activeScene;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
m_activeScene = SceneManager.GetActiveScene();
|
||||
|
||||
// Build labels
|
||||
for (int i = 0; i < SceneManager.sceneCountInBuildSettings; ++i)
|
||||
{
|
||||
string scenePath = SceneUtility.GetScenePathByBuildIndex(i);
|
||||
CreateLabel(i, scenePath);
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
int sceneCount = SceneManager.sceneCountInBuildSettings;
|
||||
if (InputPrevScene())
|
||||
{
|
||||
ChangeScene((m_activeScene.buildIndex - 1 + sceneCount) % sceneCount);
|
||||
}
|
||||
else if (InputNextScene())
|
||||
{
|
||||
ChangeScene((m_activeScene.buildIndex + 1) % sceneCount);
|
||||
}
|
||||
|
||||
s_lastThumbstickL = OVRInput.Get(OVRInput.Axis2D.PrimaryThumbstick, OVRInput.Controller.LTouch);
|
||||
s_lastThumbstickR = OVRInput.Get(OVRInput.Axis2D.PrimaryThumbstick, OVRInput.Controller.RTouch);
|
||||
}
|
||||
|
||||
private bool InputPrevScene()
|
||||
{
|
||||
return KeyboardPrevScene() || ThumbstickPrevScene(OVRInput.Controller.LTouch) ||
|
||||
ThumbstickPrevScene(OVRInput.Controller.RTouch);
|
||||
}
|
||||
|
||||
private bool InputNextScene()
|
||||
{
|
||||
return KeyboardNextScene() || ThumbstickNextScene(OVRInput.Controller.LTouch) ||
|
||||
ThumbstickNextScene(OVRInput.Controller.RTouch);
|
||||
}
|
||||
|
||||
private bool KeyboardPrevScene()
|
||||
{
|
||||
return Input.GetKeyDown(KeyCode.UpArrow);
|
||||
}
|
||||
|
||||
private bool KeyboardNextScene()
|
||||
{
|
||||
return Input.GetKeyDown(KeyCode.DownArrow);
|
||||
}
|
||||
|
||||
private bool ThumbstickPrevScene(OVRInput.Controller controller)
|
||||
{
|
||||
return (OVRInput.Get(OVRInput.Axis2D.PrimaryThumbstick, controller).y >= 0.9f) &&
|
||||
(GetLastThumbstickValue(controller).y < 0.9f);
|
||||
}
|
||||
|
||||
private bool ThumbstickNextScene(OVRInput.Controller controller)
|
||||
{
|
||||
return (OVRInput.Get(OVRInput.Axis2D.PrimaryThumbstick, controller).y <= -0.9f) &&
|
||||
(GetLastThumbstickValue(controller).y > -0.9f);
|
||||
}
|
||||
|
||||
private Vector2 GetLastThumbstickValue(OVRInput.Controller controller)
|
||||
{
|
||||
return controller == OVRInput.Controller.LTouch ? s_lastThumbstickL : s_lastThumbstickR;
|
||||
}
|
||||
|
||||
private void ChangeScene(int nextScene)
|
||||
{
|
||||
SceneManager.LoadScene(nextScene);
|
||||
}
|
||||
|
||||
private void CreateLabel(int sceneIndex, string scenePath)
|
||||
{
|
||||
// Get the scene name
|
||||
string sceneName = System.IO.Path.GetFileNameWithoutExtension(scenePath);
|
||||
|
||||
// Add spaces after capital letters
|
||||
sceneName = Regex.Replace(sceneName, "[A-Z]", " $0").Trim();
|
||||
|
||||
// Call attention to the active scene
|
||||
bool isActiveScene = m_activeScene.buildIndex == sceneIndex;
|
||||
if (isActiveScene)
|
||||
{
|
||||
sceneName = $"Open: {sceneName}";
|
||||
}
|
||||
|
||||
// Create and set the label
|
||||
TextMeshProUGUI label = GameObject.Instantiate(m_labelPf);
|
||||
label.SetText($"{sceneIndex + 1}. {sceneName}");
|
||||
label.transform.SetParent(m_layoutGroup.transform, false);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 04938183eea4b0f458db0fd0a977d53a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,22 @@
|
||||
// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
|
||||
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
public class UiVectorInspector : MonoBehaviour
|
||||
{
|
||||
[Header("Components")]
|
||||
[SerializeField] private TextMeshProUGUI m_nameLabel = null;
|
||||
|
||||
[SerializeField] private TextMeshProUGUI m_valueLabel = null;
|
||||
|
||||
public void SetName(string name)
|
||||
{
|
||||
m_nameLabel.text = name;
|
||||
}
|
||||
|
||||
public void SetValue(bool value)
|
||||
{
|
||||
m_valueLabel.text = string.Format("[{0}]", value);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b5b953c396f406b44bfcbce884437b85
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/SelfTrackingSample.unity
(Stored with Git LFS)
Normal file
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/SelfTrackingSample.unity
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: df3f47e89f918004a83d2bea9b059da3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/StylusTipSample.unity
(Stored with Git LFS)
Normal file
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/StylusTipSample.unity
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 68233fffc84bb0648add52aa07154c8c
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 74c2aeda16f6b9042b68a4bd32099209
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Textures/BoxTex.png
(Stored with Git LFS)
Normal file
BIN
Assets/Oculus/SampleFramework/Usage/TouchPro/Textures/BoxTex.png
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,96 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2039e650dd82139458fe32536e3bb9f7
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 11
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user