deltavr multiplayer 2.0
This commit is contained in:
8
Assets/XRI_Examples/Global/Audio.meta
Normal file
8
Assets/XRI_Examples/Global/Audio.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 71a837b47f3069c4582a87e6a15555aa
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/XRI_Examples/Global/Audio/HoverSound.wav
LFS
Normal file
BIN
Assets/XRI_Examples/Global/Audio/HoverSound.wav
LFS
Normal file
Binary file not shown.
22
Assets/XRI_Examples/Global/Audio/HoverSound.wav.meta
Normal file
22
Assets/XRI_Examples/Global/Audio/HoverSound.wav.meta
Normal file
@@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e5e88e22a2e4bc946bcecb9cb1737035
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/XRI_Examples/Global/Materials.meta
Normal file
8
Assets/XRI_Examples/Global/Materials.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ff7f6e50e84168d4abf12bf5ac106820
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
135
Assets/XRI_Examples/Global/Materials/Controller.mat
Normal file
135
Assets/XRI_Examples/Global/Materials/Controller.mat
Normal file
@@ -0,0 +1,135 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-554730584521667214
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 7
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Controller
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: 2000
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _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: 0}
|
||||
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}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.17924526, g: 0.17924526, b: 0.17924526, a: 1}
|
||||
- _Color: {r: 0.17924523, g: 0.17924523, b: 0.17924523, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
8
Assets/XRI_Examples/Global/Materials/Controller.mat.meta
Normal file
8
Assets/XRI_Examples/Global/Materials/Controller.mat.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3d2e36aacd7dc084b96e0755f1af4137
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
137
Assets/XRI_Examples/Global/Materials/Teleport_Highlight.mat
Normal file
137
Assets/XRI_Examples/Global/Materials/Teleport_Highlight.mat
Normal file
@@ -0,0 +1,137 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-1314292421800207264
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 7
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Teleport_Highlight
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _SPECULAR_SETUP
|
||||
- _SURFACE_TYPE_TRANSPARENT
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 1
|
||||
m_CustomRenderQueue: 3000
|
||||
stringTagMap:
|
||||
RenderType: Transparent
|
||||
disabledShaderPasses:
|
||||
- SHADOWCASTER
|
||||
- DepthOnly
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 2800000, guid: e33ab2b5f1dc9e34981a87b5e6196682, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _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: e33ab2b5f1dc9e34981a87b5e6196682, 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}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 0
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 0
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 10
|
||||
- _DstBlendAlpha: 10
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 0
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 0
|
||||
- _Metallic: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.005
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 5
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 1
|
||||
- _WorkflowMode: 0
|
||||
- _ZWrite: 0
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 65407a8b3e97f2f41b48e05ceda8d0e3
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
136
Assets/XRI_Examples/Global/Materials/Teleport_Reticle.mat
Normal file
136
Assets/XRI_Examples/Global/Materials/Teleport_Reticle.mat
Normal file
@@ -0,0 +1,136 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Teleport_Reticle
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _EMISSION
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 2
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: 2000
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _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: 0}
|
||||
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}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.29411766, g: 0.29411766, b: 0.5471698, a: 1}
|
||||
- _Color: {r: 0.29411763, g: 0.29411763, b: 0.5471698, a: 1}
|
||||
- _EmissionColor: {r: 0.37626222, g: 0.3662527, b: 0.5149178, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
--- !u!114 &5487457564210952807
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 7
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ef84914a2e9f67144ac3d6fcaccb20bf
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/XRI_Examples/Global/Models.meta
Normal file
8
Assets/XRI_Examples/Global/Models.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c5cdb69a1e6d64b4298f4036242bb1b9
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/XRI_Examples/Global/Models/TeleportReticle.fbx
LFS
Normal file
BIN
Assets/XRI_Examples/Global/Models/TeleportReticle.fbx
LFS
Normal file
Binary file not shown.
112
Assets/XRI_Examples/Global/Models/TeleportReticle.fbx.meta
Normal file
112
Assets/XRI_Examples/Global/Models/TeleportReticle.fbx.meta
Normal file
@@ -0,0 +1,112 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4ab9a3d003f58ce42b2def68a05c7b92
|
||||
ModelImporter:
|
||||
serializedVersion: 20200
|
||||
internalIDToNameTable: []
|
||||
externalObjects:
|
||||
- first:
|
||||
type: UnityEngine:Material
|
||||
assembly: UnityEngine.CoreModule
|
||||
name: TeleportationReticle
|
||||
second: {fileID: 2100000, guid: ef84914a2e9f67144ac3d6fcaccb20bf, type: 2}
|
||||
- first:
|
||||
type: UnityEngine:Material
|
||||
assembly: UnityEngine.CoreModule
|
||||
name: aiAmbientOcclusion1
|
||||
second: {fileID: 2100000, guid: 55852f63712f87b42bac30b742cf8761, type: 2}
|
||||
materials:
|
||||
materialImportMode: 2
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
motionNodeName:
|
||||
rigImportErrors:
|
||||
rigImportWarnings:
|
||||
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:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
sortHierarchyByName: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
fileIdsGeneration: 2
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
bakeAxisConversion: 0
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVMarginMethod: 1
|
||||
secondaryUVMinLightmapResolution: 40
|
||||
secondaryUVMinObjectScale: 1
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
normalCalculationMode: 4
|
||||
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
|
||||
blendShapeNormalImportMode: 1
|
||||
normalSmoothingSource: 0
|
||||
referencedClips: []
|
||||
importAnimation: 1
|
||||
humanDescription:
|
||||
serializedVersion: 3
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
globalScale: 1
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 0
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
autoGenerateAvatarMappingIfUnspecified: 1
|
||||
animationType: 2
|
||||
humanoidOversampling: 1
|
||||
avatarSetup: 0
|
||||
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/XRI_Examples/Global/Prefabs.meta
Normal file
8
Assets/XRI_Examples/Global/Prefabs.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 947e7b3e0554cd64988c616c0a14b98d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,840 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1001 &366349417952975812
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 554927651851528398, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 820443319933481338, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 1761869943190619490, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 2117448398065649442, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 2854706454091405616, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 3092857079685326485, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 3327657640790614076, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_RenderPostProcessing
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3385890772825029785, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_TargetPriorityMode
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3586319045490374857, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 4134505312059479865, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4134505312059479865, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4134505312059479865, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4134505312059479865, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4134505312059479865, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4134505312059479865, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4134505312059479865, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4134505312059479865, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4134505312059479865, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4134505312059479865, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4134505312059479865, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4146705899892629883, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 4235889591997315621, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 4506088512224615626, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 4517272240597664776, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 4642965318773188930, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 5557122111417292519, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 6212713577974253755, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 6431781376869250170, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 6447469794451057848, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 6599448038409827630, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 6688015753839463788, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_TargetPriorityMode
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6694496370488184914, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_Reticle
|
||||
value:
|
||||
objectReference: {fileID: 7280661573691868961, guid: 793b2aadc75f59f4aa96f7218341cde7,
|
||||
type: 3}
|
||||
- target: {fileID: 6694496370488184914, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_BlockedReticle
|
||||
value:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6717737983640537687, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 6936014003628660924, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 7313654230448209575, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Complete XR Origin Set Up Variant
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7696548424635294048, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 30
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7696548424635294051, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.7071068
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7696548424635294051, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0.7071068
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7696548424635294051, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 90
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7822779923582877960, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 8821029318128668983, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 8831668991884883792, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 9014170783705847993, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_ModelPrefab
|
||||
value:
|
||||
objectReference: {fileID: 6555419221710393435, guid: 25523c402d9f0384b8989981757bdb5a,
|
||||
type: 3}
|
||||
- target: {fileID: 9014170783809206330, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: far clip plane
|
||||
value: 3000
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9014170784424948811, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_Reticle
|
||||
value:
|
||||
objectReference: {fileID: 7280661573691868961, guid: 793b2aadc75f59f4aa96f7218341cde7,
|
||||
type: 3}
|
||||
- target: {fileID: 9014170784424948811, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_BlockedReticle
|
||||
value:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9014170785475729497, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
propertyPath: m_ModelPrefab
|
||||
value:
|
||||
objectReference: {fileID: 5178874541663582274, guid: dbc5ffd3fd8daad4abb3c5418005ac32,
|
||||
type: 3}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 895f6f3c2d334633b5800312285058d2, type: 3}
|
||||
--- !u!1 &8059801596075752100 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 7696548424635294048, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 366349417952975812}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &3346848182839670812 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 3127728407712097240, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 366349417952975812}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8059801596075752100}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2213c36610e3b1c4bbf886810ed9db12, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &3346848182839670800 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 3127728407712097236, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 366349417952975812}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8059801596075752100}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 919e39492806b334982b6b84c90dd927, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &3346848182839670802 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 3127728407712097238, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 366349417952975812}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8059801596075752100}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 9b1e8c997df241c1a67045eeac79b41b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &1774503987787968800 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 2140833953817275108, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 366349417952975812}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8059801596075752100}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 760ff70c1c91bdd45907d0ff0cdcaf7f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!4 &8650654345620415483 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 9014170783809206335, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 366349417952975812}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!4 &8650654345131328409 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 9014170785475729501, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 366349417952975812}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &4198149198123110376 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 4564216430282282028, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 366349417952975812}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f9ac216f0eb04754b1d938aac6380b31, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &3059984805222015681 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 3414492871629994245, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 366349417952975812}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8b94c4c83dec6a94fbaebf543478259e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!4 &8650654345794143096 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 9014170783705847996, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 366349417952975812}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &3933750242923480003 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 3711799367079663623, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 366349417952975812}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f9ac216f0eb04754b1d938aac6380b31, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &4832846438232265518 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 5045211221932542186, guid: 895f6f3c2d334633b5800312285058d2,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 366349417952975812}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8b94c4c83dec6a94fbaebf543478259e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &29304935546587040
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8059801596075752100}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fa74d384629b02340bc59709603b0771, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_DynamicMoveProvider: {fileID: 3346848182839670802}
|
||||
m_SmoothTurnProvider: {fileID: 3346848182839670800}
|
||||
m_SnapTurnProvider: {fileID: 3346848182839670812}
|
||||
m_TwoHandedGrabMoveProvider: {fileID: 1774503987787968800}
|
||||
m_LeftHandManager: {fileID: 4198149198123110376}
|
||||
m_RightHandManager: {fileID: 3933750242923480003}
|
||||
m_LeftHandLocomotionType: 0
|
||||
m_RightHandLocomotionType: 1
|
||||
m_LeftHandTurnStyle: 0
|
||||
m_RightHandTurnStyle: 0
|
||||
m_EnableComfortMode: 1
|
||||
m_ComfortMode: {fileID: 6529179263779930053}
|
||||
m_UseGravity: 1
|
||||
m_EnableFly: 0
|
||||
m_EnableGrabMovement: 0
|
||||
--- !u!1001 &3341954954797134340
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 8650654345620415483}
|
||||
m_Modifications:
|
||||
- target: {fileID: 8429981633443581377, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: TunnelingVignette
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581382, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581382, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581382, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581382, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581382, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581382, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581382, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581382, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581382, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581382, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581382, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.size
|
||||
value: 5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[0].m_Enabled
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[1].m_Enabled
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[2].m_Enabled
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[3].m_Enabled
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[4].m_Enabled
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[0].m_LocomotionProvider
|
||||
value:
|
||||
objectReference: {fileID: 3346848182839670802}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[1].m_LocomotionProvider
|
||||
value:
|
||||
objectReference: {fileID: 3346848182839670800}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[2].m_LocomotionProvider
|
||||
value:
|
||||
objectReference: {fileID: 3059984805222015681}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[3].m_LocomotionProvider
|
||||
value:
|
||||
objectReference: {fileID: 4832846438232265518}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[4].m_LocomotionProvider
|
||||
value:
|
||||
objectReference: {fileID: 1774503987787968800}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[1].m_OverrideDefaultParameters
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[0].m_OverrideParameters.m_EaseInTime
|
||||
value: 0.3
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[1].m_OverrideParameters.m_EaseInTime
|
||||
value: 0.4
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[2].m_OverrideParameters.m_EaseInTime
|
||||
value: 0.3
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[3].m_OverrideParameters.m_EaseInTime
|
||||
value: 0.3
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[4].m_OverrideParameters.m_EaseInTime
|
||||
value: 0.3
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[0].m_OverrideParameters.m_EaseOutTime
|
||||
value: 0.3
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[1].m_OverrideParameters.m_EaseOutTime
|
||||
value: 0.4
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[2].m_OverrideParameters.m_EaseOutTime
|
||||
value: 0.3
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[3].m_OverrideParameters.m_EaseOutTime
|
||||
value: 0.3
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[4].m_OverrideParameters.m_EaseOutTime
|
||||
value: 0.3
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[0].m_OverrideParameters.m_ApertureSize
|
||||
value: 0.7
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[1].m_OverrideParameters.m_ApertureSize
|
||||
value: 0.6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[2].m_OverrideParameters.m_ApertureSize
|
||||
value: 0.7
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[3].m_OverrideParameters.m_ApertureSize
|
||||
value: 0.7
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[4].m_OverrideParameters.m_ApertureSize
|
||||
value: 0.7
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[0].m_OverrideParameters.m_VignetteColor.a
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[1].m_OverrideParameters.m_VignetteColor.a
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[2].m_OverrideParameters.m_VignetteColor.a
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[3].m_OverrideParameters.m_VignetteColor.a
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[4].m_OverrideParameters.m_VignetteColor.a
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[0].m_OverrideParameters.m_FeatheringEffect
|
||||
value: 0.2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[1].m_OverrideParameters.m_EaseOutDelayTime
|
||||
value: 0.2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[1].m_OverrideParameters.m_FeatheringEffect
|
||||
value: 0.2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[2].m_OverrideParameters.m_FeatheringEffect
|
||||
value: 0.2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[3].m_OverrideParameters.m_FeatheringEffect
|
||||
value: 0.2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[4].m_OverrideParameters.m_FeatheringEffect
|
||||
value: 0.2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[0].m_OverrideParameters.m_VignetteColorBlend.a
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[1].m_OverrideParameters.m_VignetteColorBlend.a
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[2].m_OverrideParameters.m_VignetteColorBlend.a
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[3].m_OverrideParameters.m_VignetteColorBlend.a
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8429981633443581383, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
propertyPath: m_LocomotionVignetteProviders.Array.data[4].m_OverrideParameters.m_VignetteColorBlend.a
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 1670dca8ee98f864eb412b51a24c08e1, type: 3}
|
||||
--- !u!1 &6529179263779930053 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 8429981633443581377, guid: 1670dca8ee98f864eb412b51a24c08e1,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 3341954954797134340}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &8918540694051997511
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 8650654345131328409}
|
||||
m_Modifications:
|
||||
- target: {fileID: 2174382247395410696, guid: e06d6c5aaf8de694289ccfd05968ee05,
|
||||
type: 3}
|
||||
propertyPath: m_ConnectedBody
|
||||
value:
|
||||
objectReference: {fileID: 8650654345131328409}
|
||||
- target: {fileID: 2180953754384619602, guid: e06d6c5aaf8de694289ccfd05968ee05,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 4
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2180953754384619602, guid: e06d6c5aaf8de694289ccfd05968ee05,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2180953754384619602, guid: e06d6c5aaf8de694289ccfd05968ee05,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2180953754384619602, guid: e06d6c5aaf8de694289ccfd05968ee05,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2180953754384619602, guid: e06d6c5aaf8de694289ccfd05968ee05,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2180953754384619602, guid: e06d6c5aaf8de694289ccfd05968ee05,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2180953754384619602, guid: e06d6c5aaf8de694289ccfd05968ee05,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2180953754384619602, guid: e06d6c5aaf8de694289ccfd05968ee05,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2180953754384619602, guid: e06d6c5aaf8de694289ccfd05968ee05,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2180953754384619602, guid: e06d6c5aaf8de694289ccfd05968ee05,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2180953754384619602, guid: e06d6c5aaf8de694289ccfd05968ee05,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3825285382522897268, guid: e06d6c5aaf8de694289ccfd05968ee05,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Pusher
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: e06d6c5aaf8de694289ccfd05968ee05, type: 3}
|
||||
--- !u!1001 &9090256842625124237
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 8650654345794143096}
|
||||
m_Modifications:
|
||||
- target: {fileID: 2174382247395410696, guid: e06d6c5aaf8de694289ccfd05968ee05,
|
||||
type: 3}
|
||||
propertyPath: m_ConnectedBody
|
||||
value:
|
||||
objectReference: {fileID: 8650654345794143096}
|
||||
- target: {fileID: 2180953754384619602, guid: e06d6c5aaf8de694289ccfd05968ee05,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 4
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2180953754384619602, guid: e06d6c5aaf8de694289ccfd05968ee05,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2180953754384619602, guid: e06d6c5aaf8de694289ccfd05968ee05,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2180953754384619602, guid: e06d6c5aaf8de694289ccfd05968ee05,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2180953754384619602, guid: e06d6c5aaf8de694289ccfd05968ee05,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2180953754384619602, guid: e06d6c5aaf8de694289ccfd05968ee05,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2180953754384619602, guid: e06d6c5aaf8de694289ccfd05968ee05,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2180953754384619602, guid: e06d6c5aaf8de694289ccfd05968ee05,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2180953754384619602, guid: e06d6c5aaf8de694289ccfd05968ee05,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2180953754384619602, guid: e06d6c5aaf8de694289ccfd05968ee05,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2180953754384619602, guid: e06d6c5aaf8de694289ccfd05968ee05,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3825285382522897268, guid: e06d6c5aaf8de694289ccfd05968ee05,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Pusher
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: e06d6c5aaf8de694289ccfd05968ee05, type: 3}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4e660da2419d1614198b2c073ddf863d
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
50
Assets/XRI_Examples/Global/Prefabs/PostprocessVolume.prefab
Normal file
50
Assets/XRI_Examples/Global/Prefabs/PostprocessVolume.prefab
Normal file
@@ -0,0 +1,50 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &6969162463871494920
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1961357302541379663}
|
||||
- component: {fileID: 7448147033327491013}
|
||||
m_Layer: 0
|
||||
m_Name: PostprocessVolume
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1961357302541379663
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6969162463871494920}
|
||||
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_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &7448147033327491013
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6969162463871494920}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
isGlobal: 1
|
||||
priority: 0
|
||||
blendDistance: 0
|
||||
weight: 1
|
||||
sharedProfile: {fileID: 11400000, guid: f82af6daf01e2d34683ea703ec757819, type: 2}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ad7927123279f3049b38329cd8836f7c
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
89
Assets/XRI_Examples/Global/Prefabs/Pusher.prefab
Normal file
89
Assets/XRI_Examples/Global/Prefabs/Pusher.prefab
Normal file
@@ -0,0 +1,89 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &3825285382522897268
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2180953754384619602}
|
||||
- component: {fileID: 7895383832082643238}
|
||||
- component: {fileID: 4049473894804698257}
|
||||
- component: {fileID: 2174382247395410696}
|
||||
m_Layer: 28
|
||||
m_Name: Pusher
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &2180953754384619602
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3825285382522897268}
|
||||
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_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!135 &7895383832082643238
|
||||
SphereCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3825285382522897268}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Radius: 0.075
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!54 &4049473894804698257
|
||||
Rigidbody:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3825285382522897268}
|
||||
serializedVersion: 2
|
||||
m_Mass: 1
|
||||
m_Drag: 0
|
||||
m_AngularDrag: 0.05
|
||||
m_UseGravity: 0
|
||||
m_IsKinematic: 0
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 0
|
||||
m_CollisionDetection: 2
|
||||
--- !u!114 &2174382247395410696
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3825285382522897268}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e690dfc0dda5a514bad7aa8d349a97a7, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_ConnectedBody: {fileID: 0}
|
||||
m_Anchor: {x: 0, y: 0, z: 0}
|
||||
m_AnchorAngle: {x: 0, y: 0, z: 0}
|
||||
m_AutoConfigureConnectedAnchor: 0
|
||||
m_ConnectedAnchor: {x: 0, y: 0, z: 0}
|
||||
m_ConnectedAnchorAngle: {x: 0, y: 0, z: 0}
|
||||
m_EnableCollision: 0
|
||||
m_BaseForce: 0.25
|
||||
m_SpringForce: 1
|
||||
m_BreakDistance: 1.5
|
||||
m_BreakAngle: 120
|
||||
m_MatchRotation: 1
|
||||
m_AdjustMass: 1
|
||||
7
Assets/XRI_Examples/Global/Prefabs/Pusher.prefab.meta
Normal file
7
Assets/XRI_Examples/Global/Prefabs/Pusher.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e06d6c5aaf8de694289ccfd05968ee05
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
198
Assets/XRI_Examples/Global/Prefabs/TeleportAnchor.prefab
Normal file
198
Assets/XRI_Examples/Global/Prefabs/TeleportAnchor.prefab
Normal file
@@ -0,0 +1,198 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &3449784919008568370
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8164705571879959090}
|
||||
- component: {fileID: 9079946413650635260}
|
||||
- component: {fileID: 620260781526629938}
|
||||
- component: {fileID: 2818971628382573792}
|
||||
- component: {fileID: 6382560641716693759}
|
||||
m_Layer: 31
|
||||
m_Name: TeleportAnchor
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &8164705571879959090
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3449784919008568370}
|
||||
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_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &9079946413650635260
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3449784919008568370}
|
||||
m_Mesh: {fileID: 8321685774571456786, guid: bd6b121ab36aeff4cb6690ff9a345aa5, type: 3}
|
||||
--- !u!23 &620260781526629938
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3449784919008568370}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
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: 65407a8b3e97f2f41b48e05ceda8d0e3, 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: 1
|
||||
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!114 &2818971628382573792
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3449784919008568370}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 7e2f4617667341945b5a7756e14b62d0, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_InteractionManager: {fileID: 0}
|
||||
m_Colliders: []
|
||||
m_InteractionLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 2147483648
|
||||
m_InteractionLayers:
|
||||
m_Bits: 2147483648
|
||||
m_DistanceCalculationMode: 1
|
||||
m_SelectMode: 1
|
||||
m_CustomReticle: {fileID: 0}
|
||||
m_AllowGazeInteraction: 0
|
||||
m_AllowGazeSelect: 0
|
||||
m_OverrideGazeTimeToSelect: 0
|
||||
m_GazeTimeToSelect: 0.5
|
||||
m_OverrideTimeToAutoDeselectGaze: 0
|
||||
m_TimeToAutoDeselectGaze: 3
|
||||
m_AllowGazeAssistance: 0
|
||||
m_FirstHoverEntered:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_LastHoverExited:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_HoverEntered:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_HoverExited:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FirstSelectEntered:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_LastSelectExited:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_SelectEntered:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_SelectExited:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Activated:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Deactivated:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_StartingHoverFilters: []
|
||||
m_StartingSelectFilters: []
|
||||
m_StartingInteractionStrengthFilters: []
|
||||
m_OnFirstHoverEntered:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnLastHoverExited:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnHoverEntered:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnHoverExited:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnSelectEntered:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnSelectExited:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnSelectCanceled:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnActivate:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnDeactivate:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TeleportationProvider: {fileID: 0}
|
||||
m_MatchOrientation: 2
|
||||
m_MatchDirectionalInput: 0
|
||||
m_TeleportTrigger: 0
|
||||
m_FilterSelectionByHitNormal: 0
|
||||
m_UpNormalToleranceDegrees: 30
|
||||
m_Teleporting:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TeleportAnchorTransform: {fileID: 8164705571879959090}
|
||||
--- !u!64 &6382560641716693759
|
||||
MeshCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3449784919008568370}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
m_Convex: 1
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: 8321685774571456786, guid: bd6b121ab36aeff4cb6690ff9a345aa5, type: 3}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 69bcbe8a3c723a8459bad61946074109
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
123
Assets/XRI_Examples/Global/Prefabs/TeleportReticle.prefab
Normal file
123
Assets/XRI_Examples/Global/Prefabs/TeleportReticle.prefab
Normal file
@@ -0,0 +1,123 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &7280661573691868961
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7280661573691868960}
|
||||
m_Layer: 0
|
||||
m_Name: TeleportReticle
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &7280661573691868960
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7280661573691868961}
|
||||
m_LocalRotation: {x: 0.000000081460335, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 7097851534026229860}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &7280661573002407823
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 7280661573691868960}
|
||||
m_Modifications:
|
||||
- target: {fileID: -8679921383154817045, guid: 4ab9a3d003f58ce42b2def68a05c7b92,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 4ab9a3d003f58ce42b2def68a05c7b92,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 4ab9a3d003f58ce42b2def68a05c7b92,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0.05
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 4ab9a3d003f58ce42b2def68a05c7b92,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 4ab9a3d003f58ce42b2def68a05c7b92,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 4ab9a3d003f58ce42b2def68a05c7b92,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 4ab9a3d003f58ce42b2def68a05c7b92,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 4ab9a3d003f58ce42b2def68a05c7b92,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 4ab9a3d003f58ce42b2def68a05c7b92,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 4ab9a3d003f58ce42b2def68a05c7b92,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 4ab9a3d003f58ce42b2def68a05c7b92,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -7511558181221131132, guid: 4ab9a3d003f58ce42b2def68a05c7b92,
|
||||
type: 3}
|
||||
propertyPath: m_CastShadows
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -7511558181221131132, guid: 4ab9a3d003f58ce42b2def68a05c7b92,
|
||||
type: 3}
|
||||
propertyPath: m_LightProbeUsage
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -7511558181221131132, guid: 4ab9a3d003f58ce42b2def68a05c7b92,
|
||||
type: 3}
|
||||
propertyPath: m_ReflectionProbeUsage
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 919132149155446097, guid: 4ab9a3d003f58ce42b2def68a05c7b92,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Visual
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 4ab9a3d003f58ce42b2def68a05c7b92, type: 3}
|
||||
--- !u!4 &7097851534026229860 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 4ab9a3d003f58ce42b2def68a05c7b92,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 7280661573002407823}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 793b2aadc75f59f4aa96f7218341cde7
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,116 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1001 &3826077896517162925
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 804292978268976271, guid: 1392f805216c47742996d4742c80721c,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 2101229328401842903, guid: 1392f805216c47742996d4742c80721c,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 2850486098467457892, guid: 1392f805216c47742996d4742c80721c,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 2937204069651033959, guid: 1392f805216c47742996d4742c80721c,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 2953040850335233957, guid: 1392f805216c47742996d4742c80721c,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 3591102075257121437, guid: 1392f805216c47742996d4742c80721c,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 5436389215136348666, guid: 1392f805216c47742996d4742c80721c,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 6581167756232844618, guid: 1392f805216c47742996d4742c80721c,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 8270855663187062767, guid: 1392f805216c47742996d4742c80721c,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8270855663187062767, guid: 1392f805216c47742996d4742c80721c,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8270855663187062767, guid: 1392f805216c47742996d4742c80721c,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8270855663187062767, guid: 1392f805216c47742996d4742c80721c,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: -0.05
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8270855663187062767, guid: 1392f805216c47742996d4742c80721c,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8270855663187062767, guid: 1392f805216c47742996d4742c80721c,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8270855663187062767, guid: 1392f805216c47742996d4742c80721c,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8270855663187062767, guid: 1392f805216c47742996d4742c80721c,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8270855663187062767, guid: 1392f805216c47742996d4742c80721c,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8270855663187062767, guid: 1392f805216c47742996d4742c80721c,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8270855663187062767, guid: 1392f805216c47742996d4742c80721c,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8505742608970525457, guid: 1392f805216c47742996d4742c80721c,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 8758423527188247893, guid: 1392f805216c47742996d4742c80721c,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: XR Controller Left
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 1392f805216c47742996d4742c80721c, type: 3}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dbc5ffd3fd8daad4abb3c5418005ac32
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,116 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1001 &7693167038654626376
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 687940176838523910, guid: 9f3369e30fbd31f4bb596b1a99babe83,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 1848978295326630070, guid: 9f3369e30fbd31f4bb596b1a99babe83,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 3475118261464492563, guid: 9f3369e30fbd31f4bb596b1a99babe83,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3475118261464492563, guid: 9f3369e30fbd31f4bb596b1a99babe83,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3475118261464492563, guid: 9f3369e30fbd31f4bb596b1a99babe83,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3475118261464492563, guid: 9f3369e30fbd31f4bb596b1a99babe83,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: -0.05
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3475118261464492563, guid: 9f3369e30fbd31f4bb596b1a99babe83,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3475118261464492563, guid: 9f3369e30fbd31f4bb596b1a99babe83,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3475118261464492563, guid: 9f3369e30fbd31f4bb596b1a99babe83,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3475118261464492563, guid: 9f3369e30fbd31f4bb596b1a99babe83,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3475118261464492563, guid: 9f3369e30fbd31f4bb596b1a99babe83,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3475118261464492563, guid: 9f3369e30fbd31f4bb596b1a99babe83,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3475118261464492563, guid: 9f3369e30fbd31f4bb596b1a99babe83,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3816683123715682029, guid: 9f3369e30fbd31f4bb596b1a99babe83,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 4283425761326543017, guid: 9f3369e30fbd31f4bb596b1a99babe83,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: XR Controller Right
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5320034229441704307, guid: 9f3369e30fbd31f4bb596b1a99babe83,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 6905410428598011691, guid: 9f3369e30fbd31f4bb596b1a99babe83,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 7310209448969834136, guid: 9f3369e30fbd31f4bb596b1a99babe83,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 7639984874612879961, guid: 9f3369e30fbd31f4bb596b1a99babe83,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 7655812912622807707, guid: 9f3369e30fbd31f4bb596b1a99babe83,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
- target: {fileID: 8298949448185474913, guid: 9f3369e30fbd31f4bb596b1a99babe83,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 3d2e36aacd7dc084b96e0755f1af4137, type: 2}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 9f3369e30fbd31f4bb596b1a99babe83, type: 3}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 25523c402d9f0384b8989981757bdb5a
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/XRI_Examples/Global/RendererData.meta
Normal file
8
Assets/XRI_Examples/Global/RendererData.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c8e8188b5bbb3ce44872eeb153713a17
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,59 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3}
|
||||
m_Name: ForwardRenderer
|
||||
m_EditorClassIdentifier:
|
||||
debugShaders:
|
||||
debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7,
|
||||
type: 3}
|
||||
m_RendererFeatures: []
|
||||
m_RendererFeatureMap:
|
||||
m_UseNativeRenderPass: 0
|
||||
postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2}
|
||||
xrSystemData: {fileID: 11400000, guid: 60e1133243b97e347b653163a8c01b64, type: 2}
|
||||
shaders:
|
||||
blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3}
|
||||
copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3}
|
||||
screenSpaceShadowPS: {fileID: 4800000, guid: 0f854b35a0cf61a429bd5dcfea30eddd,
|
||||
type: 3}
|
||||
samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3}
|
||||
stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3}
|
||||
fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3}
|
||||
fallbackLoadingPS: {fileID: 4800000, guid: 7f888aff2ac86494babad1c2c5daeee2, type: 3}
|
||||
materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3}
|
||||
coreBlitPS: {fileID: 4800000, guid: 93446b5c5339d4f00b85c159e1159b7c, type: 3}
|
||||
coreBlitColorAndDepthPS: {fileID: 4800000, guid: d104b2fc1ca6445babb8e90b0758136b,
|
||||
type: 3}
|
||||
cameraMotionVector: {fileID: 4800000, guid: c56b7e0d4c7cb484e959caeeedae9bbf,
|
||||
type: 3}
|
||||
objectMotionVector: {fileID: 4800000, guid: 7b3ede40266cd49a395def176e1bc486,
|
||||
type: 3}
|
||||
m_AssetVersion: 2
|
||||
m_OpaqueLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_TransparentLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_DefaultStencilState:
|
||||
overrideStencilState: 0
|
||||
stencilReference: 0
|
||||
stencilCompareFunction: 8
|
||||
passOperation: 0
|
||||
failOperation: 0
|
||||
zFailOperation: 0
|
||||
m_ShadowTransparentReceive: 1
|
||||
m_RenderingMode: 0
|
||||
m_DepthPrimingMode: 0
|
||||
m_CopyDepthMode: 0
|
||||
m_AccurateGbufferNormals: 0
|
||||
m_IntermediateTextureMode: 1
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4a8e21d5c33334b11b34a596161b9360
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,123 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-6127294627751612495
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0b2db86121404754db890f4c8dfe81b2, type: 3}
|
||||
m_Name: Bloom
|
||||
m_EditorClassIdentifier:
|
||||
active: 1
|
||||
m_AdvancedMode: 0
|
||||
threshold:
|
||||
m_OverrideState: 1
|
||||
m_Value: 1.23
|
||||
min: 0
|
||||
intensity:
|
||||
m_OverrideState: 1
|
||||
m_Value: 2.53
|
||||
min: 0
|
||||
scatter:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0.7
|
||||
min: 0
|
||||
max: 1
|
||||
clamp:
|
||||
m_OverrideState: 0
|
||||
m_Value: 65472
|
||||
min: 0
|
||||
tint:
|
||||
m_OverrideState: 0
|
||||
m_Value: {r: 1, g: 1, b: 1, a: 1}
|
||||
hdr: 0
|
||||
showAlpha: 0
|
||||
showEyeDropper: 1
|
||||
highQualityFiltering:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
skipIterations:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
min: 0
|
||||
max: 16
|
||||
dirtTexture:
|
||||
m_OverrideState: 0
|
||||
m_Value: {fileID: 0}
|
||||
dirtIntensity:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
min: 0
|
||||
--- !u!114 &-3347637876434767955
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 899c54efeace73346a0a16faa3afe726, type: 3}
|
||||
m_Name: Vignette
|
||||
m_EditorClassIdentifier:
|
||||
active: 0
|
||||
m_AdvancedMode: 0
|
||||
color:
|
||||
m_OverrideState: 0
|
||||
m_Value: {r: 0, g: 0, b: 0, a: 1}
|
||||
hdr: 0
|
||||
showAlpha: 0
|
||||
showEyeDropper: 1
|
||||
center:
|
||||
m_OverrideState: 0
|
||||
m_Value: {x: 0.5, y: 0.5}
|
||||
intensity:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0.25
|
||||
min: 0
|
||||
max: 1
|
||||
smoothness:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0.4
|
||||
min: 0.01
|
||||
max: 1
|
||||
rounded:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3}
|
||||
m_Name: PostProcessingProfile
|
||||
m_EditorClassIdentifier:
|
||||
components:
|
||||
- {fileID: -6127294627751612495}
|
||||
- {fileID: 6303182522568095507}
|
||||
- {fileID: -3347637876434767955}
|
||||
--- !u!114 &6303182522568095507
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 97c23e3b12dc18c42a140437e53d3951, type: 3}
|
||||
m_Name: Tonemapping
|
||||
m_EditorClassIdentifier:
|
||||
active: 1
|
||||
m_AdvancedMode: 0
|
||||
mode:
|
||||
m_OverrideState: 1
|
||||
m_Value: 2
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f82af6daf01e2d34683ea703ec757819
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,84 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3}
|
||||
m_Name: UniversalRP-HighQuality
|
||||
m_EditorClassIdentifier:
|
||||
k_AssetVersion: 11
|
||||
k_AssetPreviousVersion: 11
|
||||
m_RendererType: 1
|
||||
m_RendererData: {fileID: 0}
|
||||
m_RendererDataList:
|
||||
- {fileID: 11400000, guid: 4a8e21d5c33334b11b34a596161b9360, type: 2}
|
||||
m_DefaultRendererIndex: 0
|
||||
m_RequireDepthTexture: 0
|
||||
m_RequireOpaqueTexture: 0
|
||||
m_OpaqueDownsampling: 1
|
||||
m_SupportsTerrainHoles: 1
|
||||
m_SupportsHDR: 1
|
||||
m_HDRColorBufferPrecision: 0
|
||||
m_MSAA: 2
|
||||
m_RenderScale: 1
|
||||
m_UpscalingFilter: 0
|
||||
m_FsrOverrideSharpness: 0
|
||||
m_FsrSharpness: 0.92
|
||||
m_EnableLODCrossFade: 1
|
||||
m_LODCrossFadeDitheringType: 1
|
||||
m_MainLightRenderingMode: 1
|
||||
m_MainLightShadowsSupported: 1
|
||||
m_MainLightShadowmapResolution: 2048
|
||||
m_AdditionalLightsRenderingMode: 1
|
||||
m_AdditionalLightsPerObjectLimit: 4
|
||||
m_AdditionalLightShadowsSupported: 1
|
||||
m_AdditionalLightsShadowmapResolution: 2048
|
||||
m_AdditionalLightsShadowResolutionTierLow: 128
|
||||
m_AdditionalLightsShadowResolutionTierMedium: 256
|
||||
m_AdditionalLightsShadowResolutionTierHigh: 512
|
||||
m_ReflectionProbeBlending: 0
|
||||
m_ReflectionProbeBoxProjection: 0
|
||||
m_ShadowDistance: 50
|
||||
m_ShadowCascadeCount: 4
|
||||
m_Cascade2Split: 0.25
|
||||
m_Cascade3Split: {x: 0.1, y: 0.3}
|
||||
m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467}
|
||||
m_CascadeBorder: 0.1
|
||||
m_ShadowDepthBias: 1
|
||||
m_ShadowNormalBias: 1
|
||||
m_AnyShadowsSupported: 1
|
||||
m_SoftShadowsSupported: 1
|
||||
m_ConservativeEnclosingSphere: 0
|
||||
m_NumIterationsEnclosingSphere: 64
|
||||
m_SoftShadowQuality: 2
|
||||
m_AdditionalLightsCookieResolution: 2048
|
||||
m_AdditionalLightsCookieFormat: 3
|
||||
m_UseSRPBatcher: 1
|
||||
m_SupportsDynamicBatching: 0
|
||||
m_MixedLightingSupported: 1
|
||||
m_SupportsLightCookies: 1
|
||||
m_SupportsLightLayers: 0
|
||||
m_DebugLevel: 0
|
||||
m_StoreActionsOptimization: 0
|
||||
m_EnableRenderGraph: 0
|
||||
m_UseAdaptivePerformance: 0
|
||||
m_ColorGradingMode: 0
|
||||
m_ColorGradingLutSize: 32
|
||||
m_UseFastSRGBLinearConversion: 0
|
||||
m_ShadowType: 1
|
||||
m_LocalShadowsSupported: 0
|
||||
m_LocalShadowsAtlasResolution: 256
|
||||
m_MaxPixelLights: 0
|
||||
m_ShadowAtlasResolution: 256
|
||||
m_VolumeFrameworkUpdateMode: 0
|
||||
m_Textures:
|
||||
blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3}
|
||||
bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3}
|
||||
m_ShaderVariantLogLevel: 0
|
||||
m_ShadowCascades: 1
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 19ba41d7c0026c3459d37c2fe90c55a0
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,84 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3}
|
||||
m_Name: UniversalRP-LowQuality
|
||||
m_EditorClassIdentifier:
|
||||
k_AssetVersion: 11
|
||||
k_AssetPreviousVersion: 11
|
||||
m_RendererType: 1
|
||||
m_RendererData: {fileID: 0}
|
||||
m_RendererDataList:
|
||||
- {fileID: 11400000, guid: 4a8e21d5c33334b11b34a596161b9360, type: 2}
|
||||
m_DefaultRendererIndex: 0
|
||||
m_RequireDepthTexture: 0
|
||||
m_RequireOpaqueTexture: 0
|
||||
m_OpaqueDownsampling: 1
|
||||
m_SupportsTerrainHoles: 1
|
||||
m_SupportsHDR: 0
|
||||
m_HDRColorBufferPrecision: 0
|
||||
m_MSAA: 1
|
||||
m_RenderScale: 1
|
||||
m_UpscalingFilter: 0
|
||||
m_FsrOverrideSharpness: 0
|
||||
m_FsrSharpness: 0.92
|
||||
m_EnableLODCrossFade: 1
|
||||
m_LODCrossFadeDitheringType: 1
|
||||
m_MainLightRenderingMode: 1
|
||||
m_MainLightShadowsSupported: 0
|
||||
m_MainLightShadowmapResolution: 2048
|
||||
m_AdditionalLightsRenderingMode: 0
|
||||
m_AdditionalLightsPerObjectLimit: 4
|
||||
m_AdditionalLightShadowsSupported: 0
|
||||
m_AdditionalLightsShadowmapResolution: 2048
|
||||
m_AdditionalLightsShadowResolutionTierLow: 128
|
||||
m_AdditionalLightsShadowResolutionTierMedium: 256
|
||||
m_AdditionalLightsShadowResolutionTierHigh: 512
|
||||
m_ReflectionProbeBlending: 0
|
||||
m_ReflectionProbeBoxProjection: 0
|
||||
m_ShadowDistance: 50
|
||||
m_ShadowCascadeCount: 1
|
||||
m_Cascade2Split: 0.25
|
||||
m_Cascade3Split: {x: 0.1, y: 0.3}
|
||||
m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467}
|
||||
m_CascadeBorder: 0.1
|
||||
m_ShadowDepthBias: 1
|
||||
m_ShadowNormalBias: 1
|
||||
m_AnyShadowsSupported: 1
|
||||
m_SoftShadowsSupported: 0
|
||||
m_ConservativeEnclosingSphere: 0
|
||||
m_NumIterationsEnclosingSphere: 64
|
||||
m_SoftShadowQuality: 2
|
||||
m_AdditionalLightsCookieResolution: 2048
|
||||
m_AdditionalLightsCookieFormat: 3
|
||||
m_UseSRPBatcher: 1
|
||||
m_SupportsDynamicBatching: 0
|
||||
m_MixedLightingSupported: 1
|
||||
m_SupportsLightCookies: 1
|
||||
m_SupportsLightLayers: 0
|
||||
m_DebugLevel: 0
|
||||
m_StoreActionsOptimization: 0
|
||||
m_EnableRenderGraph: 0
|
||||
m_UseAdaptivePerformance: 0
|
||||
m_ColorGradingMode: 0
|
||||
m_ColorGradingLutSize: 16
|
||||
m_UseFastSRGBLinearConversion: 0
|
||||
m_ShadowType: 1
|
||||
m_LocalShadowsSupported: 0
|
||||
m_LocalShadowsAtlasResolution: 256
|
||||
m_MaxPixelLights: 0
|
||||
m_ShadowAtlasResolution: 256
|
||||
m_VolumeFrameworkUpdateMode: 0
|
||||
m_Textures:
|
||||
blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3}
|
||||
bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3}
|
||||
m_ShaderVariantLogLevel: 0
|
||||
m_ShadowCascades: 0
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a31e9f9f9c9d4b9429ed0d1234e22103
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,84 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3}
|
||||
m_Name: UniversalRP-MediumQuality
|
||||
m_EditorClassIdentifier:
|
||||
k_AssetVersion: 11
|
||||
k_AssetPreviousVersion: 11
|
||||
m_RendererType: 1
|
||||
m_RendererData: {fileID: 0}
|
||||
m_RendererDataList:
|
||||
- {fileID: 11400000, guid: 4a8e21d5c33334b11b34a596161b9360, type: 2}
|
||||
m_DefaultRendererIndex: 0
|
||||
m_RequireDepthTexture: 0
|
||||
m_RequireOpaqueTexture: 0
|
||||
m_OpaqueDownsampling: 1
|
||||
m_SupportsTerrainHoles: 1
|
||||
m_SupportsHDR: 1
|
||||
m_HDRColorBufferPrecision: 0
|
||||
m_MSAA: 2
|
||||
m_RenderScale: 1
|
||||
m_UpscalingFilter: 0
|
||||
m_FsrOverrideSharpness: 0
|
||||
m_FsrSharpness: 0.92
|
||||
m_EnableLODCrossFade: 1
|
||||
m_LODCrossFadeDitheringType: 1
|
||||
m_MainLightRenderingMode: 1
|
||||
m_MainLightShadowsSupported: 1
|
||||
m_MainLightShadowmapResolution: 2048
|
||||
m_AdditionalLightsRenderingMode: 1
|
||||
m_AdditionalLightsPerObjectLimit: 4
|
||||
m_AdditionalLightShadowsSupported: 0
|
||||
m_AdditionalLightsShadowmapResolution: 2048
|
||||
m_AdditionalLightsShadowResolutionTierLow: 128
|
||||
m_AdditionalLightsShadowResolutionTierMedium: 256
|
||||
m_AdditionalLightsShadowResolutionTierHigh: 512
|
||||
m_ReflectionProbeBlending: 0
|
||||
m_ReflectionProbeBoxProjection: 0
|
||||
m_ShadowDistance: 30
|
||||
m_ShadowCascadeCount: 3
|
||||
m_Cascade2Split: 0.25
|
||||
m_Cascade3Split: {x: 0.1, y: 0.3}
|
||||
m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467}
|
||||
m_CascadeBorder: 0.1
|
||||
m_ShadowDepthBias: 1
|
||||
m_ShadowNormalBias: 1
|
||||
m_AnyShadowsSupported: 1
|
||||
m_SoftShadowsSupported: 1
|
||||
m_ConservativeEnclosingSphere: 0
|
||||
m_NumIterationsEnclosingSphere: 64
|
||||
m_SoftShadowQuality: 2
|
||||
m_AdditionalLightsCookieResolution: 2048
|
||||
m_AdditionalLightsCookieFormat: 3
|
||||
m_UseSRPBatcher: 1
|
||||
m_SupportsDynamicBatching: 0
|
||||
m_MixedLightingSupported: 1
|
||||
m_SupportsLightCookies: 1
|
||||
m_SupportsLightLayers: 0
|
||||
m_DebugLevel: 0
|
||||
m_StoreActionsOptimization: 0
|
||||
m_EnableRenderGraph: 0
|
||||
m_UseAdaptivePerformance: 0
|
||||
m_ColorGradingMode: 0
|
||||
m_ColorGradingLutSize: 32
|
||||
m_UseFastSRGBLinearConversion: 0
|
||||
m_ShadowType: 1
|
||||
m_LocalShadowsSupported: 0
|
||||
m_LocalShadowsAtlasResolution: 256
|
||||
m_MaxPixelLights: 0
|
||||
m_ShadowAtlasResolution: 256
|
||||
m_VolumeFrameworkUpdateMode: 0
|
||||
m_Textures:
|
||||
blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3}
|
||||
bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3}
|
||||
m_ShaderVariantLogLevel: 0
|
||||
m_ShadowCascades: 1
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d847b876476d3d6468f5dfcd34266f96
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/XRI_Examples/Global/Scripts.meta
Normal file
8
Assets/XRI_Examples/Global/Scripts.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 86bdfbb513165af4f9f0a84d6f17bc02
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/XRI_Examples/Global/Scripts/Analytics.meta
Normal file
8
Assets/XRI_Examples/Global/Scripts/Analytics.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e5bd8ad0287c0f6409b134bb397bed24
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cc72213c6872fba4b84b5f24188cb5d9
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,63 @@
|
||||
using UnityEngine.XR.Interaction.Toolkit;
|
||||
|
||||
namespace UnityEngine.XR.Content.Interaction.Analytics
|
||||
{
|
||||
/// <summary>
|
||||
/// Class that connects the 3DUI Interaction station scene objects with their respective analytics events.
|
||||
/// </summary>
|
||||
[AddComponentMenu("")]
|
||||
[DisallowMultipleComponent]
|
||||
class Xrc3DUIInteractionStationAnalytics : MonoBehaviour
|
||||
{
|
||||
[Header("3DUI Simple Controls Substation")]
|
||||
[SerializeField]
|
||||
XRLever m_Lever;
|
||||
|
||||
[SerializeField]
|
||||
XRJoystick m_Joystick;
|
||||
|
||||
[SerializeField]
|
||||
XRKnob m_Dial;
|
||||
|
||||
[SerializeField]
|
||||
XRKnob m_Wheel;
|
||||
|
||||
[SerializeField]
|
||||
XRSlider m_Slider;
|
||||
|
||||
[SerializeField]
|
||||
XRGripButton m_GripButton;
|
||||
|
||||
[SerializeField]
|
||||
XRPushButton m_PushButton;
|
||||
|
||||
[Header("Claw Machine Substation")]
|
||||
[SerializeField]
|
||||
XRJoystick m_ClawMachineJoystick;
|
||||
|
||||
[SerializeField]
|
||||
XRPushButton m_ClawMachinePushButton;
|
||||
|
||||
[SerializeField]
|
||||
XRSocketInteractor m_UfoGrabberSocket;
|
||||
|
||||
[SerializeField]
|
||||
XRBaseInteractable[] m_PrizeInteractables;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
XrcAnalyticsUtils.Register(m_Lever, new LeverInteraction());
|
||||
XrcAnalyticsUtils.Register(m_Joystick, new JoystickInteraction());
|
||||
XrcAnalyticsUtils.Register(m_Dial, new DialInteraction());
|
||||
XrcAnalyticsUtils.Register(m_Wheel, new WheelInteraction());
|
||||
XrcAnalyticsUtils.Register(m_Slider, new SliderInteraction());
|
||||
XrcAnalyticsUtils.Register(m_GripButton, new GripButtonPressed());
|
||||
XrcAnalyticsUtils.Register(m_PushButton, new PushButtonPressed());
|
||||
|
||||
XrcAnalyticsUtils.Register(m_ClawMachineJoystick, new ClawMachineJoystickInteraction());
|
||||
XrcAnalyticsUtils.Register(m_ClawMachinePushButton, new ClawMachinePushButtonPressed());
|
||||
XrcAnalyticsUtils.Register(m_UfoGrabberSocket, new ConnectClawMachineToPrize());
|
||||
XrcAnalyticsUtils.Register(m_PrizeInteractables, new GrabClawMachinePrize());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b5d488e69bc9d004dbebfd7cfe3f3103
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,59 @@
|
||||
using UnityEngine.XR.Interaction.Toolkit;
|
||||
|
||||
namespace UnityEngine.XR.Content.Interaction.Analytics
|
||||
{
|
||||
/// <summary>
|
||||
/// Class that connects the Active Interactable station scene objects with their respective analytics events.
|
||||
/// </summary>
|
||||
[AddComponentMenu("")]
|
||||
[DisallowMultipleComponent]
|
||||
class XrcActiveInteractableStationAnalytics : MonoBehaviour
|
||||
{
|
||||
[Header("Active SimpleObject Substation")]
|
||||
[SerializeField]
|
||||
XRBaseInteractable[] m_SimpleActiveInteractables;
|
||||
|
||||
[Header("Candle Substation")]
|
||||
[SerializeField]
|
||||
XRBaseInteractable m_LighterInteractable;
|
||||
|
||||
[SerializeField]
|
||||
XRBaseInteractable[] m_CandleInteractables;
|
||||
|
||||
[SerializeField]
|
||||
OnTrigger[] m_CandleTriggers;
|
||||
|
||||
[Header("Launcher Substation")]
|
||||
[SerializeField]
|
||||
XRBaseInteractable m_LauncherInteractable;
|
||||
|
||||
[SerializeField]
|
||||
OnTrigger m_EasyRingTrigger;
|
||||
|
||||
[SerializeField]
|
||||
OnTrigger m_MediumRingTrigger;
|
||||
|
||||
[SerializeField]
|
||||
OnTrigger m_HardRingTrigger;
|
||||
|
||||
[Header("Megaphone Substation")]
|
||||
[SerializeField]
|
||||
XRBaseInteractable m_MegaphoneInteractable;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
XrcAnalyticsUtils.Register(m_SimpleActiveInteractables, new GrabActiveSimpleObject(), new SimpleObjectActivated());
|
||||
|
||||
XrcAnalyticsUtils.Register(m_LighterInteractable, new GrabLighter(), new LighterActivated());
|
||||
XrcAnalyticsUtils.Register(m_CandleInteractables, new GrabCandle());
|
||||
XrcAnalyticsUtils.Register(m_CandleTriggers, new LightCandle());
|
||||
|
||||
XrcAnalyticsUtils.Register(m_LauncherInteractable, new GrabLauncher(), new LauncherActivated());
|
||||
XrcAnalyticsUtils.Register(m_EasyRingTrigger, new LauncherEasyTargetHit());
|
||||
XrcAnalyticsUtils.Register(m_MediumRingTrigger, new LauncherMediumTargetHit());
|
||||
XrcAnalyticsUtils.Register(m_HardRingTrigger, new LauncherHardTargetHit());
|
||||
|
||||
XrcAnalyticsUtils.Register(m_MegaphoneInteractable, new GrabMegaphone(), new MegaphoneActivated());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d919f1db183c42d4cac3edda16164e63
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,94 @@
|
||||
using UnityEngine.XR.Interaction.Toolkit;
|
||||
|
||||
namespace UnityEngine.XR.Content.Interaction.Analytics
|
||||
{
|
||||
/// <summary>
|
||||
/// Class that connects the Grab Interactable station scene objects with their respective analytics events.
|
||||
/// </summary>
|
||||
[AddComponentMenu("")]
|
||||
[DisallowMultipleComponent]
|
||||
class XrcGrabInteractableStationAnalytics : MonoBehaviour
|
||||
{
|
||||
const float k_FrequencyToSendWateringPlant = 4f;
|
||||
|
||||
static readonly WateringPlant k_WateringPlantParameter = new WateringPlant();
|
||||
static readonly BreakPiggyBank k_BreakPiggyBankParameter = new BreakPiggyBank();
|
||||
|
||||
[Header("Simple Object Substation")]
|
||||
[SerializeField]
|
||||
XRBaseInteractable[] m_InstantInteractables;
|
||||
|
||||
[SerializeField]
|
||||
XRBaseInteractable[] m_KinematicInteractables;
|
||||
|
||||
[SerializeField]
|
||||
XRBaseInteractable[] m_VelocityInteractables;
|
||||
|
||||
[Header("Watering Can Substation")]
|
||||
[SerializeField]
|
||||
XRBaseInteractable m_WateringCanInteractable;
|
||||
|
||||
[SerializeField]
|
||||
OnTrigger m_OnPlantGrowsTrigger;
|
||||
|
||||
[Header("Piggy Bank Substation")]
|
||||
[SerializeField]
|
||||
XRBaseInteractable m_MalletInteractable;
|
||||
|
||||
[SerializeField]
|
||||
GameObject m_PigBank;
|
||||
|
||||
[Header("Ribbon Stick Substation")]
|
||||
[SerializeField]
|
||||
XRBaseInteractable m_RibbonStickInteractable;
|
||||
|
||||
float m_TimeToSendWateringPlant;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
XrcAnalyticsUtils.Register(m_InstantInteractables, new GrabSimpleObjectInstant());
|
||||
XrcAnalyticsUtils.Register(m_KinematicInteractables, new GrabSimpleObjectKinematic());
|
||||
XrcAnalyticsUtils.Register(m_VelocityInteractables, new GrabSimpleObjectVelocity());
|
||||
|
||||
XrcAnalyticsUtils.Register(m_WateringCanInteractable, new GrabWateringCan());
|
||||
if (m_OnPlantGrowsTrigger != null)
|
||||
m_OnPlantGrowsTrigger.onEnter.AddListener(OnWateringPlant);
|
||||
|
||||
XrcAnalyticsUtils.Register(m_MalletInteractable, new GrabMallet());
|
||||
OnRestorePiggyBank(m_PigBank);
|
||||
|
||||
XrcAnalyticsUtils.Register(m_RibbonStickInteractable, new GrabRibbonStick());
|
||||
}
|
||||
|
||||
void OnWateringPlant(GameObject otherGameObject)
|
||||
{
|
||||
if (Time.unscaledTime < m_TimeToSendWateringPlant)
|
||||
return;
|
||||
|
||||
m_TimeToSendWateringPlant = Time.unscaledTime + k_FrequencyToSendWateringPlant;
|
||||
XrcAnalytics.interactionEvent.Send(k_WateringPlantParameter);
|
||||
}
|
||||
|
||||
void OnRestorePiggyBank(GameObject piggyBank)
|
||||
{
|
||||
if (piggyBank == null)
|
||||
return;
|
||||
|
||||
var breakable = piggyBank.GetComponent<Breakable>();
|
||||
if (breakable != null)
|
||||
breakable.onBreak.AddListener(OnBreakPiggyBank);
|
||||
}
|
||||
|
||||
void OnBreakPiggyBank(GameObject otherGameObject, GameObject brokenGameObject)
|
||||
{
|
||||
XrcAnalytics.interactionEvent.Send(k_BreakPiggyBankParameter);
|
||||
|
||||
if (brokenGameObject == null)
|
||||
return;
|
||||
|
||||
var unbreakable = brokenGameObject.GetComponent<Unbreakable>();
|
||||
if (unbreakable != null)
|
||||
unbreakable.onRestore.AddListener(OnRestorePiggyBank);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 64441dc1ef91cb442884a1d08fffdc1c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,72 @@
|
||||
using UnityEngine.XR.Interaction.Toolkit;
|
||||
|
||||
namespace UnityEngine.XR.Content.Interaction.Analytics
|
||||
{
|
||||
/// <summary>
|
||||
/// Class that connects the Physics Interaction station scene objects with their respective analytics events.
|
||||
/// </summary>
|
||||
[AddComponentMenu("")]
|
||||
[DisallowMultipleComponent]
|
||||
class XrcPhysicsInteractionStationAnalytics : MonoBehaviour
|
||||
{
|
||||
const float k_FrequencyToSendPushFlopDoor = 4f;
|
||||
|
||||
static readonly PushFlipDoor k_PushFlipDoorParameter = new PushFlipDoor();
|
||||
|
||||
[Header("Physics Simple Controls Substation")]
|
||||
[SerializeField]
|
||||
XRBaseInteractable[] m_SpringInteractables;
|
||||
|
||||
[SerializeField]
|
||||
XRBaseInteractable[] m_HingeInteractables;
|
||||
|
||||
[Header("Cabinet Example Substation")]
|
||||
[SerializeField]
|
||||
XRBaseInteractable m_Cabinet1Interactable;
|
||||
|
||||
[SerializeField]
|
||||
XRBaseInteractable m_Cabinet2Interactable;
|
||||
|
||||
[Header("Doors Example Substation")]
|
||||
[SerializeField]
|
||||
Rigidbody m_FlipDoorRigidbody;
|
||||
|
||||
[SerializeField]
|
||||
XRBaseInteractable m_DoorKeyInteractable;
|
||||
|
||||
[SerializeField]
|
||||
Door m_DoorLocked;
|
||||
|
||||
[SerializeField]
|
||||
XRBaseInteractable m_DoorHandleInteractable;
|
||||
|
||||
float m_TimeToSendPushFlopDoor;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
XrcAnalyticsUtils.Register(m_SpringInteractables, new GrabSpringJoint());
|
||||
XrcAnalyticsUtils.Register(m_HingeInteractables, new GrabHingeJoint());
|
||||
|
||||
XrcAnalyticsUtils.Register(m_Cabinet1Interactable, new GrabCabinet1());
|
||||
XrcAnalyticsUtils.Register(m_Cabinet2Interactable, new GrabCabinet2());
|
||||
|
||||
if (m_FlipDoorRigidbody != null)
|
||||
{
|
||||
var onCollision = m_FlipDoorRigidbody.gameObject.AddComponent<OnCollision>();
|
||||
onCollision.onEnter.AddListener(OnFlipDoorCollision);
|
||||
}
|
||||
XrcAnalyticsUtils.Register(m_DoorKeyInteractable, new GrabDoorKey());
|
||||
XrcAnalyticsUtils.Register(m_DoorLocked, new DoorLocked(), new DoorUnlocked());
|
||||
XrcAnalyticsUtils.Register(m_DoorHandleInteractable, new GrabDoorHandle());
|
||||
}
|
||||
|
||||
void OnFlipDoorCollision(Collision collision)
|
||||
{
|
||||
if (Time.unscaledTime < m_TimeToSendPushFlopDoor)
|
||||
return;
|
||||
|
||||
m_TimeToSendPushFlopDoor = Time.unscaledTime + k_FrequencyToSendPushFlopDoor;
|
||||
XrcAnalytics.interactionEvent.Send(k_PushFlipDoorParameter);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1af61162fa5f63a439f65912f4410ee5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,23 @@
|
||||
namespace UnityEngine.XR.Content.Interaction.Analytics
|
||||
{
|
||||
/// <summary>
|
||||
/// Class that manages scene analytics events for <c>XRContent</c>.
|
||||
/// </summary>
|
||||
[AddComponentMenu("")]
|
||||
[DisallowMultipleComponent]
|
||||
class XrcSceneAnalytics : MonoBehaviour
|
||||
{
|
||||
void Awake()
|
||||
{
|
||||
XrcAnalytics.interactionEvent.Send(new SceneStarted());
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
void OnValidate()
|
||||
{
|
||||
gameObject.hideFlags = UnityEditor.Unsupported.IsDeveloperMode() ? HideFlags.None : HideFlags.HideInHierarchy | HideFlags.NotEditable;
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1ff0aed9f9ef7084ca7f59a711befd28
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,48 @@
|
||||
using UnityEngine.XR.Interaction.Toolkit;
|
||||
|
||||
namespace UnityEngine.XR.Content.Interaction.Analytics
|
||||
{
|
||||
/// <summary>
|
||||
/// Class that connects the Socket Interactors station scene objects with their respective analytics events.
|
||||
/// </summary>
|
||||
[AddComponentMenu("")]
|
||||
[DisallowMultipleComponent]
|
||||
class XrcSocketInteractorsStationAnalytics : MonoBehaviour
|
||||
{
|
||||
[Header("Socket Simple Object Substation")]
|
||||
[SerializeField]
|
||||
XRSocketInteractor m_SimpleSocket;
|
||||
|
||||
[Header("Perler Machine")]
|
||||
[SerializeField]
|
||||
XRSocketInteractor m_BatterySlotSocket;
|
||||
|
||||
[SerializeField]
|
||||
XRSocketInteractor[] m_InfinityPegSockets;
|
||||
|
||||
[SerializeField]
|
||||
Transform m_GridCenter;
|
||||
|
||||
void Start()
|
||||
{
|
||||
XrcAnalyticsUtils.Register(m_SimpleSocket, new ConnectSocketSimpleObject(), new DisconnectSocketSimpleObject());
|
||||
|
||||
XrcAnalyticsUtils.Register(m_BatterySlotSocket, new ConnectPerlerMachineBattery());
|
||||
|
||||
var grabPerlerBeadParameter = new GrabPerlerBead();
|
||||
foreach (var socket in m_InfinityPegSockets)
|
||||
{
|
||||
foreach (var interactable in socket.interactablesSelected)
|
||||
{
|
||||
XrcAnalyticsUtils.Register(interactable as XRBaseInteractable, grabPerlerBeadParameter);
|
||||
}
|
||||
|
||||
socket.selectEntered.AddListener(args => XrcAnalyticsUtils.Register(args.interactableObject as XRBaseInteractable, grabPerlerBeadParameter));
|
||||
}
|
||||
|
||||
var connectPerlerBeadParameter = new ConnectPerlerBead();
|
||||
foreach (var gridSocket in m_GridCenter.GetComponentsInChildren<XRSocketInteractor>())
|
||||
XrcAnalyticsUtils.Register(gridSocket, connectPerlerBeadParameter);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 51e2b2d7ea5934243ad1542b8dc5f501
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/XRI_Examples/Global/Scripts/Analytics/Editor.meta
Normal file
8
Assets/XRI_Examples/Global/Scripts/Analytics/Editor.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8df8bc9cd77e5e7448cec848f8f57f9e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,41 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.XR.Content.Interaction.Analytics;
|
||||
using UnityObject = UnityEngine.Object;
|
||||
|
||||
namespace UnityEditor.XR.Content.Interaction.Analytics
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor for <see cref="XrcSceneAnalytics"/> that makes it easy to spot missing analytics objects by validating
|
||||
/// object reference properties in all components in the same GameObject.
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(XrcSceneAnalytics))]
|
||||
class XrcSceneAnalyticsEditor : Editor
|
||||
{
|
||||
const string k_WarningMessage = "Missing analytics object reference in property \'{0}.{1}\'";
|
||||
|
||||
static void ValidateObjectReferences(UnityObject target)
|
||||
{
|
||||
var serializedObject = new SerializedObject(target);
|
||||
var property = serializedObject.GetIterator();
|
||||
while (property.NextVisible(true))
|
||||
{
|
||||
if (property.propertyType == SerializedPropertyType.ObjectReference && property.objectReferenceValue == null)
|
||||
Debug.LogWarningFormat(target, k_WarningMessage, target.GetType().Name, property.propertyPath);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
if (GUILayout.Button("Validate References"))
|
||||
{
|
||||
var sceneAnalytics = target as XrcSceneAnalytics;
|
||||
if (sceneAnalytics == null)
|
||||
return;
|
||||
|
||||
var monoBehaviours = sceneAnalytics.GetComponentsInChildren<MonoBehaviour>();
|
||||
foreach (var monoBehaviour in monoBehaviours)
|
||||
ValidateObjectReferences(monoBehaviour);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cac85eae435a0fe4a9c4f0e6a8bfd8bb
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/XRI_Examples/Global/Scripts/Analytics/Events.meta
Normal file
8
Assets/XRI_Examples/Global/Scripts/Analytics/Events.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 87a2345705c099943ae2e878d24a3bbe
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,72 @@
|
||||
using UnityEngine.Analytics;
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
#endif
|
||||
#if DEBUG_XRC_EDITOR_ANALYTICS
|
||||
using UnityEngine;
|
||||
#endif
|
||||
|
||||
namespace UnityEngine.XR.Content.Interaction.Analytics
|
||||
{
|
||||
/// <summary>
|
||||
/// Base class for <c>XRContent</c> editor events.
|
||||
/// </summary>
|
||||
abstract class EditorEvent
|
||||
{
|
||||
protected const int k_DefaultMaxEventsPerHour = 1000;
|
||||
protected const int k_DefaultMaxElementCount = 1000;
|
||||
|
||||
/// <summary>
|
||||
/// The event name determines which database table it goes into in the CDP backend.
|
||||
/// All events which we want grouped into a table must share the same event name.
|
||||
/// </summary>
|
||||
readonly string m_EventName;
|
||||
|
||||
readonly int m_MaxEventsPerHour;
|
||||
readonly int m_MaxElementCount;
|
||||
|
||||
internal EditorEvent(string eventName, int maxPerHour = k_DefaultMaxEventsPerHour, int maxElementCount = k_DefaultMaxElementCount)
|
||||
{
|
||||
m_EventName = eventName;
|
||||
m_MaxEventsPerHour = maxPerHour;
|
||||
m_MaxElementCount = maxElementCount;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Call this method in the child classes to send an event.
|
||||
/// </summary>
|
||||
/// <param name="parameter">The parameter object within the event.</param>
|
||||
/// <returns>Returns whenever the event was successfully sent.</returns>
|
||||
protected bool Send(object parameter)
|
||||
{
|
||||
#if ENABLE_CLOUD_SERVICES_ANALYTICS
|
||||
// Analytics events will always refuse to send if analytics are disabled or the editor is for sure quitting
|
||||
if (XrcAnalytics.disabled || XrcAnalytics.quitting)
|
||||
return false;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
var result = EditorAnalytics.SendEventWithLimit(m_EventName, parameter);
|
||||
#else
|
||||
var result = AnalyticsResult.AnalyticsDisabled;
|
||||
#endif
|
||||
|
||||
#if DEBUG_XRC_EDITOR_ANALYTICS
|
||||
Debug.Log($"Event {m_EventName} : {parameter} sent with status {result}");
|
||||
#endif
|
||||
|
||||
return result == AnalyticsResult.Ok;
|
||||
#else // ENABLE_CLOUD_SERVICES_ANALYTICS
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
internal bool Register()
|
||||
{
|
||||
#if UNITY_EDITOR && ENABLE_CLOUD_SERVICES_ANALYTICS
|
||||
return EditorAnalytics.RegisterEventWithLimit(m_EventName, m_MaxEventsPerHour, m_MaxElementCount, XrcAnalytics.k_VendorKey) == AnalyticsResult.Ok;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 361f96375872bab42b1254af3fbc27e5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,453 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngine.XR.Content.Interaction.Analytics
|
||||
{
|
||||
/// <summary>
|
||||
/// Base class for interaction parameters.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
abstract class InteractionEventParameter
|
||||
{
|
||||
/// <summary>
|
||||
/// The parameter unique name.
|
||||
/// </summary>
|
||||
[SerializeField]
|
||||
protected string Name;
|
||||
|
||||
internal InteractionEventParameter()
|
||||
{
|
||||
Name = GetType().Name;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonUtility.ToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
// Scene Started Parameter
|
||||
[Serializable]
|
||||
sealed class SceneStarted : InteractionEventParameter
|
||||
{ }
|
||||
|
||||
/// <summary>
|
||||
/// Base class for station parameters. A station parameter has a <c>Station</c> and <c>Substaion</c> name.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
abstract class StationParameter : InteractionEventParameter
|
||||
{
|
||||
protected static class GrabInteractableStation
|
||||
{
|
||||
internal const string k_StationName = "GrabInteractable";
|
||||
|
||||
internal const string k_SimpleObjectSubstationName = "SimpleObject";
|
||||
internal const string k_WateringCanSubstationName = "WateringCan";
|
||||
internal const string k_PiggyBankSubstationName = "PiggyBank";
|
||||
internal const string k_RibbonStickSubstationName = "RibbonSitck";
|
||||
}
|
||||
|
||||
protected static class ActiveInteractableStation
|
||||
{
|
||||
internal const string k_StationName = "ActiveInteractable";
|
||||
|
||||
internal const string k_ActiveSimpleObjectSubstationName = "ActiveSimpleObject";
|
||||
internal const string k_CandleSubstationName = "Candle";
|
||||
internal const string k_LauncherSubstationName = "Launcher";
|
||||
internal const string k_MegaphoneSubstationName = "Megaphone";
|
||||
}
|
||||
|
||||
protected static class SocketInteractorStation
|
||||
{
|
||||
internal const string k_StationName = "SocketInteractors";
|
||||
|
||||
internal const string k_SimpleSocketSubstationName = "SocketSimpleObject";
|
||||
internal const string k_PerlerMachineSubstationName = "PerlerMachine";
|
||||
}
|
||||
|
||||
protected static class Interaction3DUIStation
|
||||
{
|
||||
internal const string k_StationName = "3DUIInteraction";
|
||||
|
||||
internal const string k_3DUISimpleControlsSubstationName = "3DUISimpleControls";
|
||||
internal const string k_ClawMachineSubstationName = "ClawMachine";
|
||||
}
|
||||
|
||||
protected static class PhysicsInteractableStation
|
||||
{
|
||||
internal const string k_StationName = "PhysicsInteraction";
|
||||
|
||||
internal const string k_PhysicsSimpleControlsSubstationName = "PhysicsSimpleControls";
|
||||
internal const string k_CabinetExampleSubstationName = "CabinetExample";
|
||||
internal const string k_DoorsExampleSubstationName = "DoorsExample";
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
protected string Station;
|
||||
|
||||
[SerializeField]
|
||||
protected string Substation;
|
||||
}
|
||||
|
||||
// Grab Simple Object Parameters
|
||||
[Serializable]
|
||||
abstract class SimpleObjectSubstation : StationParameter
|
||||
{
|
||||
internal SimpleObjectSubstation()
|
||||
{
|
||||
Station = GrabInteractableStation.k_StationName;
|
||||
Substation = GrabInteractableStation.k_SimpleObjectSubstationName;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
sealed class GrabSimpleObjectInstant : SimpleObjectSubstation
|
||||
{ }
|
||||
|
||||
[Serializable]
|
||||
sealed class GrabSimpleObjectKinematic : SimpleObjectSubstation
|
||||
{ }
|
||||
|
||||
[Serializable]
|
||||
sealed class GrabSimpleObjectVelocity : SimpleObjectSubstation
|
||||
{ }
|
||||
|
||||
// Watering Can Parameters
|
||||
[Serializable]
|
||||
abstract class WateringCanSubstation : StationParameter
|
||||
{
|
||||
internal WateringCanSubstation()
|
||||
{
|
||||
Station = GrabInteractableStation.k_StationName;
|
||||
Substation = GrabInteractableStation.k_WateringCanSubstationName;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
sealed class GrabWateringCan : WateringCanSubstation
|
||||
{ }
|
||||
|
||||
[Serializable]
|
||||
sealed class WateringPlant : WateringCanSubstation
|
||||
{ }
|
||||
|
||||
// Piggy Bank Parameters
|
||||
[Serializable]
|
||||
abstract class PiggyBankSubstation : StationParameter
|
||||
{
|
||||
internal PiggyBankSubstation()
|
||||
{
|
||||
Station = GrabInteractableStation.k_StationName;
|
||||
Substation = GrabInteractableStation.k_PiggyBankSubstationName;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
sealed class GrabMallet : PiggyBankSubstation
|
||||
{ }
|
||||
|
||||
[Serializable]
|
||||
sealed class BreakPiggyBank : PiggyBankSubstation
|
||||
{ }
|
||||
|
||||
// Grab Ribbon Stick Parameters
|
||||
[Serializable]
|
||||
sealed class GrabRibbonStick : StationParameter
|
||||
{
|
||||
internal GrabRibbonStick()
|
||||
{
|
||||
Station = GrabInteractableStation.k_StationName;
|
||||
Substation = GrabInteractableStation.k_RibbonStickSubstationName;
|
||||
}
|
||||
}
|
||||
|
||||
// Active Simple Object Parameters
|
||||
[Serializable]
|
||||
abstract class ActiveSimpleObjectSubstation : StationParameter
|
||||
{
|
||||
internal ActiveSimpleObjectSubstation()
|
||||
{
|
||||
Station = ActiveInteractableStation.k_StationName;
|
||||
Substation = ActiveInteractableStation.k_ActiveSimpleObjectSubstationName;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
sealed class GrabActiveSimpleObject : ActiveSimpleObjectSubstation
|
||||
{ }
|
||||
|
||||
[Serializable]
|
||||
sealed class SimpleObjectActivated : ActiveSimpleObjectSubstation
|
||||
{ }
|
||||
|
||||
// Candle Parameters
|
||||
[Serializable]
|
||||
abstract class CandleSubstation : StationParameter
|
||||
{
|
||||
internal CandleSubstation()
|
||||
{
|
||||
Station = ActiveInteractableStation.k_StationName;
|
||||
Substation = ActiveInteractableStation.k_CandleSubstationName;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
sealed class GrabLighter : CandleSubstation
|
||||
{ }
|
||||
|
||||
[Serializable]
|
||||
sealed class LighterActivated : CandleSubstation
|
||||
{ }
|
||||
|
||||
[Serializable]
|
||||
sealed class GrabCandle : CandleSubstation
|
||||
{ }
|
||||
|
||||
[Serializable]
|
||||
sealed class LightCandle : CandleSubstation
|
||||
{ }
|
||||
|
||||
// Launcher Parameters
|
||||
[Serializable]
|
||||
abstract class LauncherSubstation : StationParameter
|
||||
{
|
||||
internal LauncherSubstation()
|
||||
{
|
||||
Station = ActiveInteractableStation.k_StationName;
|
||||
Substation = ActiveInteractableStation.k_LauncherSubstationName;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
sealed class GrabLauncher : LauncherSubstation
|
||||
{ }
|
||||
|
||||
[Serializable]
|
||||
sealed class LauncherActivated : LauncherSubstation
|
||||
{ }
|
||||
|
||||
[Serializable]
|
||||
sealed class LauncherEasyTargetHit : LauncherSubstation
|
||||
{ }
|
||||
|
||||
[Serializable]
|
||||
sealed class LauncherMediumTargetHit : LauncherSubstation
|
||||
{ }
|
||||
|
||||
[Serializable]
|
||||
sealed class LauncherHardTargetHit : LauncherSubstation
|
||||
{ }
|
||||
|
||||
// Megaphone Parameters
|
||||
[Serializable]
|
||||
abstract class MegaphoneSubstation : StationParameter
|
||||
{
|
||||
internal MegaphoneSubstation()
|
||||
{
|
||||
Station = ActiveInteractableStation.k_StationName;
|
||||
Substation = ActiveInteractableStation.k_MegaphoneSubstationName;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
sealed class GrabMegaphone : MegaphoneSubstation
|
||||
{ }
|
||||
|
||||
[Serializable]
|
||||
sealed class MegaphoneActivated : MegaphoneSubstation
|
||||
{ }
|
||||
|
||||
// Socket Simple Object
|
||||
[Serializable]
|
||||
abstract class SimpleSocketSubstation : StationParameter
|
||||
{
|
||||
internal SimpleSocketSubstation()
|
||||
{
|
||||
Station = SocketInteractorStation.k_StationName;
|
||||
Substation = SocketInteractorStation.k_SimpleSocketSubstationName;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
sealed class ConnectSocketSimpleObject : SimpleSocketSubstation
|
||||
{ }
|
||||
|
||||
[Serializable]
|
||||
sealed class DisconnectSocketSimpleObject : SimpleSocketSubstation
|
||||
{ }
|
||||
|
||||
// Perler Machine
|
||||
[Serializable]
|
||||
abstract class PerlerMachineSubstation : StationParameter
|
||||
{
|
||||
internal PerlerMachineSubstation()
|
||||
{
|
||||
Station = SocketInteractorStation.k_StationName;
|
||||
Substation = SocketInteractorStation.k_PerlerMachineSubstationName;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
sealed class ConnectPerlerMachineBattery : PerlerMachineSubstation
|
||||
{ }
|
||||
|
||||
[Serializable]
|
||||
sealed class GrabPerlerBead : PerlerMachineSubstation
|
||||
{ }
|
||||
|
||||
[Serializable]
|
||||
sealed class ConnectPerlerBead : PerlerMachineSubstation
|
||||
{ }
|
||||
|
||||
// 3DUI Simple Controls
|
||||
[Serializable]
|
||||
abstract class SimpleControlsParameter : StationParameter
|
||||
{
|
||||
internal SimpleControlsParameter()
|
||||
{
|
||||
Station = Interaction3DUIStation.k_StationName;
|
||||
Substation = Interaction3DUIStation.k_3DUISimpleControlsSubstationName;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
sealed class LeverInteraction : SimpleControlsParameter
|
||||
{ }
|
||||
|
||||
[Serializable]
|
||||
sealed class JoystickInteraction : SimpleControlsParameter
|
||||
{ }
|
||||
|
||||
[Serializable]
|
||||
sealed class DialInteraction : SimpleControlsParameter
|
||||
{ }
|
||||
|
||||
[Serializable]
|
||||
sealed class WheelInteraction : SimpleControlsParameter
|
||||
{ }
|
||||
|
||||
[Serializable]
|
||||
sealed class SliderInteraction : SimpleControlsParameter
|
||||
{ }
|
||||
|
||||
[Serializable]
|
||||
sealed class GripButtonPressed : SimpleControlsParameter
|
||||
{ }
|
||||
|
||||
[Serializable]
|
||||
sealed class PushButtonPressed : SimpleControlsParameter
|
||||
{ }
|
||||
|
||||
// Claw Machine Parameters
|
||||
[Serializable]
|
||||
abstract class ClawMachineParameter : StationParameter
|
||||
{
|
||||
internal ClawMachineParameter()
|
||||
{
|
||||
Station = Interaction3DUIStation.k_StationName;
|
||||
Substation = Interaction3DUIStation.k_ClawMachineSubstationName;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
sealed class ClawMachineJoystickInteraction : ClawMachineParameter
|
||||
{ }
|
||||
|
||||
[Serializable]
|
||||
sealed class ClawMachinePushButtonPressed : ClawMachineParameter
|
||||
{ }
|
||||
|
||||
[Serializable]
|
||||
sealed class ConnectClawMachineToPrize : ClawMachineParameter
|
||||
{ }
|
||||
|
||||
[Serializable]
|
||||
sealed class GrabClawMachinePrize : ClawMachineParameter
|
||||
{ }
|
||||
|
||||
// Physics Simple Controls
|
||||
[Serializable]
|
||||
abstract class PhysicsSimpleControlsParameter : StationParameter
|
||||
{
|
||||
internal PhysicsSimpleControlsParameter()
|
||||
{
|
||||
Station = PhysicsInteractableStation.k_StationName;
|
||||
Substation = PhysicsInteractableStation.k_PhysicsSimpleControlsSubstationName;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
sealed class GrabSpringJoint : PhysicsSimpleControlsParameter
|
||||
{ }
|
||||
|
||||
[Serializable]
|
||||
sealed class GrabHingeJoint : PhysicsSimpleControlsParameter
|
||||
{ }
|
||||
|
||||
// Cabinet Example
|
||||
[Serializable]
|
||||
abstract class CabinetExampleParameter : StationParameter
|
||||
{
|
||||
internal CabinetExampleParameter()
|
||||
{
|
||||
Station = PhysicsInteractableStation.k_StationName;
|
||||
Substation = PhysicsInteractableStation.k_CabinetExampleSubstationName;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
sealed class GrabCabinet1 : CabinetExampleParameter
|
||||
{ }
|
||||
|
||||
[Serializable]
|
||||
sealed class GrabCabinet2 : CabinetExampleParameter
|
||||
{ }
|
||||
|
||||
// Doors Example
|
||||
[Serializable]
|
||||
abstract class DoorsExampleParameter : StationParameter
|
||||
{
|
||||
internal DoorsExampleParameter()
|
||||
{
|
||||
Station = PhysicsInteractableStation.k_StationName;
|
||||
Substation = PhysicsInteractableStation.k_DoorsExampleSubstationName;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
sealed class PushFlipDoor : DoorsExampleParameter
|
||||
{ }
|
||||
|
||||
[Serializable]
|
||||
sealed class GrabDoorKey : DoorsExampleParameter
|
||||
{ }
|
||||
|
||||
[Serializable]
|
||||
sealed class DoorUnlocked : DoorsExampleParameter
|
||||
{ }
|
||||
|
||||
[Serializable]
|
||||
sealed class DoorLocked : DoorsExampleParameter
|
||||
{ }
|
||||
|
||||
[Serializable]
|
||||
sealed class GrabDoorHandle : DoorsExampleParameter
|
||||
{ }
|
||||
|
||||
/// <summary>
|
||||
/// Editor event used to send <c>XRContent</c> interaction analytics data.
|
||||
/// Only accepts <c>InteractionEventParameter</c> objects as parameter.
|
||||
/// </summary>
|
||||
class InteractionEvent : EditorEvent
|
||||
{
|
||||
const string k_EventName = "xrcInteraction";
|
||||
|
||||
internal InteractionEvent(int maxPerHour = k_DefaultMaxEventsPerHour, int maxElementCount = k_DefaultMaxElementCount)
|
||||
: base(k_EventName, maxPerHour, maxElementCount)
|
||||
{ }
|
||||
|
||||
internal bool Send(InteractionEventParameter parameter)
|
||||
{
|
||||
return parameter != null && base.Send(parameter);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 14586b01c3c01004ba72418f6b2ed6c8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,3 @@
|
||||
// This file is generated. Do not modify by hand.
|
||||
// XML documentation file not found. To check if public methods have XML comments,
|
||||
// make sure the XML doc file is present and located next to the scraped dll
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6bd048109c94d014f8909979db78c6dd
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "Unity.XR.Content.Interaction.Analytics",
|
||||
"references": [
|
||||
"Unity.XR.Interaction.Toolkit",
|
||||
"Unity.XR.Content.Interaction"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [
|
||||
"Android",
|
||||
"CloudRendering",
|
||||
"GameCoreScarlett",
|
||||
"GameCoreXboxOne",
|
||||
"iOS",
|
||||
"LinuxStandalone64",
|
||||
"Lumin",
|
||||
"macOSStandalone",
|
||||
"PS4",
|
||||
"PS5",
|
||||
"Stadia",
|
||||
"Switch",
|
||||
"tvOS",
|
||||
"WSA",
|
||||
"WebGL",
|
||||
"WindowsStandalone32",
|
||||
"WindowsStandalone64",
|
||||
"XboxOne"
|
||||
],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": false,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9f85ef23860d39c4b844ae8331a7af94
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/XRI_Examples/Global/Scripts/Analytics/Utils.meta
Normal file
8
Assets/XRI_Examples/Global/Scripts/Analytics/Utils.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7067b90e80f2cd345855f8362f2abc5b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,95 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine.XR.Interaction.Toolkit;
|
||||
|
||||
namespace UnityEngine.XR.Content.Interaction.Analytics
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains utility methods to easily send XRContent analytics data.
|
||||
/// </summary>
|
||||
class XrcAnalyticsUtils
|
||||
{
|
||||
internal static void Register(Door door, StationParameter lockedParameter, StationParameter unlockedParameter)
|
||||
{
|
||||
if (door == null)
|
||||
return;
|
||||
|
||||
door.onLock.AddListener(() => Send(lockedParameter));
|
||||
door.onUnlock.AddListener(() => Send(unlockedParameter));
|
||||
}
|
||||
|
||||
internal static void Register(XRPushButton pushButton, StationParameter parameter)
|
||||
{
|
||||
if (pushButton == null)
|
||||
return;
|
||||
|
||||
pushButton.onPress.AddListener(() => XrcAnalytics.interactionEvent.Send(parameter));
|
||||
}
|
||||
|
||||
internal static void Register(XRGripButton gripButton, StationParameter parameter)
|
||||
{
|
||||
if (gripButton == null)
|
||||
return;
|
||||
|
||||
gripButton.onPress.AddListener(() => XrcAnalytics.interactionEvent.Send(parameter));
|
||||
}
|
||||
|
||||
internal static void Register(XRSocketInteractor socket, StationParameter connectParameter, StationParameter disconnectParameter = null)
|
||||
{
|
||||
if (socket == null)
|
||||
return;
|
||||
|
||||
socket.selectEntered.AddListener(_ => Send(connectParameter));
|
||||
if (disconnectParameter != null)
|
||||
socket.selectExited.AddListener(args => OnSocketDisconnected(args, disconnectParameter));
|
||||
}
|
||||
|
||||
internal static void Register(IEnumerable<OnTrigger> onTriggers, StationParameter onEnterParameter)
|
||||
{
|
||||
foreach (var onTrigger in onTriggers)
|
||||
Register(onTrigger, onEnterParameter);
|
||||
}
|
||||
|
||||
internal static void Register(OnTrigger onTrigger, StationParameter onEnterParameter)
|
||||
{
|
||||
if (onTrigger == null)
|
||||
return;
|
||||
|
||||
onTrigger.onEnter.AddListener(otherGameObject => Send(onEnterParameter));
|
||||
}
|
||||
|
||||
internal static void Register(IEnumerable<XRBaseInteractable> interactables, StationParameter grabParameter, StationParameter activateParameter = null)
|
||||
{
|
||||
foreach (var interactable in interactables)
|
||||
Register(interactable, grabParameter, activateParameter);
|
||||
}
|
||||
|
||||
internal static void Register(XRBaseInteractable interactable, StationParameter grabParameter, StationParameter activateParameter = null)
|
||||
{
|
||||
if (interactable == null)
|
||||
return;
|
||||
|
||||
interactable.selectEntered.AddListener(args => OnGrabInteractable(args, grabParameter));
|
||||
if (activateParameter != null)
|
||||
interactable.activated.AddListener(_ => Send(activateParameter));
|
||||
}
|
||||
|
||||
static void OnSocketDisconnected(SelectExitEventArgs args, StationParameter parameter)
|
||||
{
|
||||
if (!args.isCanceled)
|
||||
XrcAnalytics.interactionEvent.Send(parameter);
|
||||
}
|
||||
|
||||
static void OnGrabInteractable(SelectEnterEventArgs args, StationParameter parameter)
|
||||
{
|
||||
if (!(args.interactorObject is XRBaseControllerInteractor))
|
||||
return;
|
||||
|
||||
XrcAnalytics.interactionEvent.Send(parameter);
|
||||
}
|
||||
|
||||
static void Send(StationParameter parameter)
|
||||
{
|
||||
XrcAnalytics.interactionEvent.Send(parameter);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fbfe64736ab97cd45b41f6c2052a799b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
43
Assets/XRI_Examples/Global/Scripts/Analytics/XrcAnalytics.cs
Normal file
43
Assets/XRI_Examples/Global/Scripts/Analytics/XrcAnalytics.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
#endif
|
||||
|
||||
namespace UnityEngine.XR.Content.Interaction.Analytics
|
||||
{
|
||||
/// <summary>
|
||||
/// The entry point class to send XRContent analytics data.
|
||||
/// Stores all events usd by XRContent.
|
||||
/// </summary>
|
||||
#if UNITY_EDITOR
|
||||
[InitializeOnLoad]
|
||||
#endif
|
||||
static class XrcAnalytics
|
||||
{
|
||||
internal const string k_VendorKey = "unity.xrcontent.interaction";
|
||||
|
||||
internal static bool quitting { get; private set; }
|
||||
internal static bool disabled { get; }
|
||||
|
||||
internal static InteractionEvent interactionEvent { get; } = new InteractionEvent();
|
||||
|
||||
static XrcAnalytics()
|
||||
{
|
||||
// if the user has analytics disabled, respect that and make sure that no code actually tries to send events
|
||||
if (!interactionEvent.Register())
|
||||
{
|
||||
disabled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
EditorApplication.quitting += SetQuitting;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void SetQuitting()
|
||||
{
|
||||
// we set the Quitting variable so that we don't record window close events when the editor quits
|
||||
quitting = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f22e79d2138983e46bc000032bbb598d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,29 @@
|
||||
namespace UnityEngine.XR.Content.Animation
|
||||
{
|
||||
/// <summary>
|
||||
/// Enables a component to react to the 'ActionBegin' animation event.
|
||||
/// </summary>
|
||||
/// <seealso cref="IAnimationEventActionFinished"/>
|
||||
public interface IAnimationEventActionBegin
|
||||
{
|
||||
void ActionBegin(string label);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calls the 'ActionBegin' function on any supported component when the target animation begins.
|
||||
/// </summary>
|
||||
/// <seealso cref="AnimationEventActionFinished"/>
|
||||
public class AnimationEventActionBegin : StateMachineBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
[Tooltip("A label identifying the animation that has started.")]
|
||||
string m_Label;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
|
||||
{
|
||||
var eventReceiver = animator.GetComponentInParent<IAnimationEventActionBegin>();
|
||||
eventReceiver?.ActionBegin(m_Label);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5d468d0443a045844aecfdcb26294078
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,29 @@
|
||||
namespace UnityEngine.XR.Content.Animation
|
||||
{
|
||||
/// <summary>
|
||||
/// Enables a component to react to the 'ActionFinished' animation event.
|
||||
/// </summary>
|
||||
/// <seealso cref="IAnimationEventActionBegin"/>
|
||||
public interface IAnimationEventActionFinished
|
||||
{
|
||||
void ActionFinished(string label);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calls the 'ActionFinished' function on any supported component when the target animation exits.
|
||||
/// </summary>
|
||||
/// <seealso cref="AnimationEventActionBegin"/>
|
||||
public class AnimationEventActionFinished : StateMachineBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
[Tooltip("A label identifying the animation that has finished.")]
|
||||
string m_Label;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
|
||||
{
|
||||
var eventReceiver = animator.GetComponentInParent<IAnimationEventActionFinished>();
|
||||
eventReceiver?.ActionFinished(m_Label);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f0a02bc85c6eec44099da45f41b649bf
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
36
Assets/XRI_Examples/Global/Scripts/AutoSocketAttach.cs
Normal file
36
Assets/XRI_Examples/Global/Scripts/AutoSocketAttach.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using UnityEngine.XR.Interaction.Toolkit;
|
||||
|
||||
namespace UnityEngine.XR.Content.Interaction
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes an <see cref="XRSocketInteractor"/> attach point to match the initial scene position of the object it is containing.
|
||||
/// </summary>
|
||||
public class AutoSocketAttach : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
[Tooltip("The Socket Interactor that controls this socket attach point.")]
|
||||
XRSocketInteractor m_ControllingInteractor;
|
||||
|
||||
void Start()
|
||||
{
|
||||
// If there is an existing interactable, we match its position so the object does not move
|
||||
if (m_ControllingInteractor == null)
|
||||
m_ControllingInteractor = GetComponentInParent<XRSocketInteractor>();
|
||||
|
||||
if (m_ControllingInteractor == null)
|
||||
{
|
||||
Debug.LogWarning("Script is not associated with an XRSocketInteractor and will have no effect.", this);
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_ControllingInteractor.startingSelectedInteractable == null)
|
||||
{
|
||||
Debug.Log("AutoSocketAttach does not have a starting selected interactable to match its position.", this);
|
||||
return;
|
||||
}
|
||||
|
||||
var targetTransform = m_ControllingInteractor.startingSelectedInteractable.GetAttachTransform(m_ControllingInteractor);
|
||||
transform.SetPositionAndRotation(targetTransform.position, targetTransform.rotation);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/XRI_Examples/Global/Scripts/AutoSocketAttach.cs.meta
Normal file
11
Assets/XRI_Examples/Global/Scripts/AutoSocketAttach.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 130246251d17c034db762f6d1a49150e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
17
Assets/XRI_Examples/Global/Scripts/DestroyObject.cs
Normal file
17
Assets/XRI_Examples/Global/Scripts/DestroyObject.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace UnityEngine.XR.Content.Interaction
|
||||
{
|
||||
/// <summary>
|
||||
/// Destroys GameObject after a few seconds.
|
||||
/// </summary>
|
||||
public class DestroyObject : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
[Tooltip("Time before destroying in seconds.")]
|
||||
float m_Lifetime = 5f;
|
||||
|
||||
void Start()
|
||||
{
|
||||
Destroy(gameObject, m_Lifetime);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/XRI_Examples/Global/Scripts/DestroyObject.cs.meta
Normal file
11
Assets/XRI_Examples/Global/Scripts/DestroyObject.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b56b982c85b468f45a3260808d7ea637
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
414
Assets/XRI_Examples/Global/Scripts/InputMediator.cs
Normal file
414
Assets/XRI_Examples/Global/Scripts/InputMediator.cs
Normal file
@@ -0,0 +1,414 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.InputSystem.Controls;
|
||||
|
||||
namespace UnityEngine.XR.Content.Interaction
|
||||
{
|
||||
/// <summary>
|
||||
/// Allows for actions to 'lock' the input controls they use so that others actions using the same controls will not receive input at the same time.
|
||||
/// InputMediator works by injecting input processors on every binding in active action maps.
|
||||
/// Usage is via <see cref="ConsumeControl"/> and <see cref="ReleaseControl"/>.
|
||||
/// </summary>
|
||||
public static class InputMediator
|
||||
{
|
||||
/// <summary>
|
||||
/// Substring of the names that all of the input processors that are injected have.
|
||||
/// </summary>
|
||||
/// <seealso cref="Initialize"/>
|
||||
const string k_ConsumeKey = "Consume";
|
||||
static bool s_Updating;
|
||||
|
||||
// Data associated with each control, storing if an action has locked it,
|
||||
// and other actions that are allowed to make use of this control at the same time
|
||||
class ConsumptionState
|
||||
{
|
||||
public int m_LockedAction = -1;
|
||||
public int m_AllowedAction1 = -1;
|
||||
public int m_AllowedAction2 = -1;
|
||||
|
||||
public bool m_Automatic;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generic Consumption processor - handles all the aspects of looking up actions that have locked a control
|
||||
/// Implementations merely need to implement the methods to determine if a control has returned to rest (and thus should reset)
|
||||
/// And the 'identity' value of a control, which is the value it should have when the control is locked
|
||||
/// </summary>
|
||||
/// <typeparam name="TValue"></typeparam>
|
||||
abstract class ConsumeProcessor<TValue> : InputProcessor<TValue> where TValue : struct
|
||||
{
|
||||
public int m_ActionIndex = -1;
|
||||
|
||||
public override TValue Process(TValue value, InputControl control)
|
||||
{
|
||||
// Check the dictionary for this control
|
||||
// If it does not exist, proceed unhindered
|
||||
if (control == null || !s_ConsumedControls.TryGetValue(control, out var currentState))
|
||||
return value;
|
||||
|
||||
// If there is no locked action, also proceed unhindered
|
||||
if (currentState.m_LockedAction == -1)
|
||||
return value;
|
||||
|
||||
// Check for an action match
|
||||
var actionMatched = (currentState.m_LockedAction == m_ActionIndex) || (currentState.m_AllowedAction1 == m_ActionIndex) || (currentState.m_AllowedAction2 == m_ActionIndex);
|
||||
|
||||
// Check if we should automatically release
|
||||
if (actionMatched)
|
||||
{
|
||||
if (currentState.m_Automatic && ValueNearZero(value))
|
||||
currentState.m_LockedAction = -1;
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
return IdentityValue();
|
||||
}
|
||||
|
||||
public abstract bool ValueNearZero(TValue value);
|
||||
|
||||
public abstract TValue IdentityValue();
|
||||
}
|
||||
|
||||
class ConsumeFloat : ConsumeProcessor<float>
|
||||
{
|
||||
public override bool ValueNearZero(float value)
|
||||
{
|
||||
return value < float.Epsilon;
|
||||
}
|
||||
|
||||
public override float IdentityValue()
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
class ConsumeVector2 : ConsumeProcessor<Vector2>
|
||||
{
|
||||
public override bool ValueNearZero(Vector2 value)
|
||||
{
|
||||
return value.sqrMagnitude < float.Epsilon;
|
||||
}
|
||||
|
||||
public override Vector2 IdentityValue()
|
||||
{
|
||||
return Vector2.zero;
|
||||
}
|
||||
}
|
||||
|
||||
class ConsumeVector3 : ConsumeProcessor<Vector3>
|
||||
{
|
||||
public override bool ValueNearZero(Vector3 value)
|
||||
{
|
||||
return value.sqrMagnitude < float.Epsilon;
|
||||
}
|
||||
|
||||
public override Vector3 IdentityValue()
|
||||
{
|
||||
return Vector3.zero;
|
||||
}
|
||||
}
|
||||
|
||||
class ConsumeQuaternion : ConsumeProcessor<Quaternion>
|
||||
{
|
||||
public override bool ValueNearZero(Quaternion value)
|
||||
{
|
||||
return Quaternion.Angle(value, Quaternion.identity) < float.Epsilon;
|
||||
}
|
||||
|
||||
public override Quaternion IdentityValue()
|
||||
{
|
||||
return Quaternion.identity;
|
||||
}
|
||||
}
|
||||
|
||||
static Dictionary<InputControl, ConsumptionState> s_ConsumedControls = new Dictionary<InputControl, ConsumptionState>();
|
||||
static Dictionary<InputAction, int> s_ActionIndices = new Dictionary<InputAction, int>();
|
||||
static HashSet<InputAction> s_InitializedActions = new HashSet<InputAction>();
|
||||
|
||||
[RuntimeInitializeOnLoadMethod]
|
||||
static void Initialize()
|
||||
{
|
||||
InputSystem.InputSystem.RegisterProcessor<ConsumeFloat>(nameof(ConsumeFloat));
|
||||
InputSystem.InputSystem.RegisterProcessor<ConsumeVector2>(nameof(ConsumeVector2));
|
||||
InputSystem.InputSystem.RegisterProcessor<ConsumeVector3>(nameof(ConsumeVector3));
|
||||
InputSystem.InputSystem.RegisterProcessor<ConsumeQuaternion>(nameof(ConsumeQuaternion));
|
||||
Application.quitting += OnApplicationQuitting;
|
||||
InputSystem.InputSystem.onActionChange += OnActionChange;
|
||||
InitializeConsumeProcessors();
|
||||
}
|
||||
|
||||
static void OnApplicationQuitting()
|
||||
{
|
||||
InputSystem.InputSystem.onActionChange -= OnActionChange;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Attempts to 'lock' the controls belonging to an action - which means other actions using the same control will only get zero/identity values during this time
|
||||
/// </summary>
|
||||
/// <param name="source">The action that should lock their controls</param>
|
||||
/// <param name="automaticRelease">If the control lock should release automatically when the controls go to a resting state</param>
|
||||
/// <param name="force">If the action should forcefully take a lock from another consuming action</param>
|
||||
/// <param name="friendAction1">An additional action that can access these controls at this time</param>
|
||||
/// <param name="friendAction2">An additional action that can access these controls at this time</param>
|
||||
/// <returns>False if _any_ of the associated controls were unable to be locked </returns>
|
||||
public static bool ConsumeControl(InputAction source, bool automaticRelease, bool force = false, InputAction friendAction1 = null, InputAction friendAction2 = null)
|
||||
{
|
||||
if (source == null)
|
||||
return false;
|
||||
|
||||
var actionIndex1 = GetActionIndex(source);
|
||||
var actionIndex2 = GetActionIndex(friendAction1);
|
||||
var actionIndex3 = GetActionIndex(friendAction2);
|
||||
var lockCount = 0;
|
||||
|
||||
var sourceControls = source.controls;
|
||||
foreach (var currentControl in sourceControls)
|
||||
{
|
||||
// Check to see if it is in the list already
|
||||
// If not, make an entry for it
|
||||
if (!s_ConsumedControls.TryGetValue(currentControl, out var controlState))
|
||||
{
|
||||
var parent = currentControl.parent;
|
||||
if (currentControl is AxisControl && parent is Vector2Control)
|
||||
{
|
||||
if (!s_ConsumedControls.TryGetValue(parent, out controlState))
|
||||
{
|
||||
controlState = new ConsumptionState { m_Automatic = automaticRelease };
|
||||
s_ConsumedControls.Add(parent, controlState);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
controlState = new ConsumptionState { m_Automatic = automaticRelease };
|
||||
}
|
||||
|
||||
s_ConsumedControls.Add(currentControl, controlState);
|
||||
}
|
||||
|
||||
if (force || controlState.m_LockedAction == -1)
|
||||
{
|
||||
controlState.m_LockedAction = actionIndex1;
|
||||
controlState.m_AllowedAction1 = actionIndex2;
|
||||
controlState.m_AllowedAction2 = actionIndex3;
|
||||
lockCount++;
|
||||
}
|
||||
}
|
||||
return (lockCount == sourceControls.Count);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Releases an action's lock over its associated controls. Other actions using the same controls will begin receiving input again
|
||||
/// </summary>
|
||||
/// <param name="source">The action that is attempting to release its lock</param>
|
||||
/// <param name="force">If this input lock should be released regardless of requesting action</param>
|
||||
/// <returns>False if _any_ of the associated controls were unable to be released </returns>
|
||||
public static bool ReleaseControl(InputAction source, bool force = false)
|
||||
{
|
||||
if (source == null)
|
||||
return false;
|
||||
|
||||
var actionIndex = GetActionIndex(source);
|
||||
var lockCount = 0;
|
||||
|
||||
var sourceControls = source.controls;
|
||||
foreach (var currentControl in sourceControls)
|
||||
{
|
||||
// Check to see if it is in the list already
|
||||
// If not, nothing to release
|
||||
if (!s_ConsumedControls.TryGetValue(currentControl, out var controlState))
|
||||
{
|
||||
lockCount++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (force || controlState.m_LockedAction == actionIndex)
|
||||
{
|
||||
controlState.m_LockedAction = -1;
|
||||
lockCount++;
|
||||
}
|
||||
}
|
||||
|
||||
return (lockCount == sourceControls.Count);
|
||||
}
|
||||
|
||||
static void InitializeConsumeProcessors()
|
||||
{
|
||||
s_Updating = true;
|
||||
var actionList = InputSystem.InputSystem.ListEnabledActions();
|
||||
foreach (var action in actionList)
|
||||
{
|
||||
EnsureConsumeProcessorAdded(action);
|
||||
|
||||
// Since this list only contains currently enabled actions,
|
||||
// any actions that are enabled later will need to
|
||||
// have the consume processor added. Since those actions may not
|
||||
// trigger a BoundControlsChanged change, the OnActionChange event handler
|
||||
// will check against this list and append to it as actions are enabled.
|
||||
// This set is checked against for performance reasons
|
||||
// to avoid the more costly EnsureConsumeProcessorAdded(InputAction) method.
|
||||
s_InitializedActions.Add(action);
|
||||
}
|
||||
s_Updating = false;
|
||||
}
|
||||
|
||||
static void OnActionChange(object actionSource, InputActionChange change)
|
||||
{
|
||||
if (s_Updating)
|
||||
return;
|
||||
|
||||
s_Updating = true;
|
||||
|
||||
if (change == InputActionChange.ActionEnabled)
|
||||
{
|
||||
var action = (InputAction)actionSource;
|
||||
if (s_InitializedActions.Add(action))
|
||||
EnsureConsumeProcessorAdded(action);
|
||||
}
|
||||
else if (change == InputActionChange.ActionMapEnabled)
|
||||
{
|
||||
var actionMap = (InputActionMap)actionSource;
|
||||
foreach (var action in actionMap.actions)
|
||||
{
|
||||
if (s_InitializedActions.Add(action))
|
||||
EnsureConsumeProcessorAdded(action);
|
||||
}
|
||||
}
|
||||
else if (change == InputActionChange.BoundControlsChanged)
|
||||
{
|
||||
// We skip pure actions here as they can get into an invalid state if bindings were changed
|
||||
if (actionSource is InputActionMap actionMap)
|
||||
{
|
||||
EnsureConsumeProcessorAdded(actionMap);
|
||||
}
|
||||
else if (actionSource is InputActionAsset actionAsset)
|
||||
{
|
||||
EnsureConsumeProcessorAdded(actionAsset);
|
||||
}
|
||||
}
|
||||
|
||||
s_Updating = false;
|
||||
}
|
||||
|
||||
static string ControlTypeToConsumeType(string controlType)
|
||||
{
|
||||
switch (controlType)
|
||||
{
|
||||
case "Single":
|
||||
case "Button":
|
||||
case "float":
|
||||
return nameof(ConsumeFloat);
|
||||
case "Vector2":
|
||||
return nameof(ConsumeVector2);
|
||||
case "Vector3":
|
||||
return nameof(ConsumeVector3);
|
||||
case "Quaternion":
|
||||
return nameof(ConsumeQuaternion);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
static string ProcessBindingControl(string bindingPath)
|
||||
{
|
||||
var control = InputSystem.InputSystem.FindControl(bindingPath);
|
||||
var consumeType = "";
|
||||
|
||||
if (control != null)
|
||||
consumeType = ControlTypeToConsumeType(control.valueType.Name);
|
||||
else
|
||||
{
|
||||
// Try to fall back based on path keywords
|
||||
var bindingLower = bindingPath.ToLower();
|
||||
if (bindingLower.EndsWith("position"))
|
||||
consumeType = ControlTypeToConsumeType("Vector3");
|
||||
|
||||
if (bindingLower.EndsWith("rotation"))
|
||||
consumeType = ControlTypeToConsumeType("Quaternion");
|
||||
|
||||
if (bindingLower.EndsWith("x"))
|
||||
consumeType = ControlTypeToConsumeType("float");
|
||||
|
||||
if (bindingLower.EndsWith("y"))
|
||||
consumeType = ControlTypeToConsumeType("float");
|
||||
|
||||
if (bindingLower.EndsWith("axis"))
|
||||
consumeType = ControlTypeToConsumeType("Vector2");
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(consumeType))
|
||||
return "";
|
||||
|
||||
return consumeType;
|
||||
}
|
||||
|
||||
static void EnsureConsumeProcessorAdded(InputAction action)
|
||||
{
|
||||
var bindingCount = action.bindings.Count;
|
||||
for (var i = 0; i < bindingCount; i++)
|
||||
{
|
||||
var currentBinding = action.bindings[i];
|
||||
|
||||
// Ignore composites, but not parts of composites
|
||||
if (currentBinding.isComposite)
|
||||
continue;
|
||||
|
||||
// Ignore bindings that aren't ready yet
|
||||
if (currentBinding.effectiveProcessors == null)
|
||||
continue;
|
||||
|
||||
var actionIndex = GetActionIndex(action);
|
||||
if (!currentBinding.effectiveProcessors.Contains(k_ConsumeKey))
|
||||
{
|
||||
// Ignore unused bindings
|
||||
if (string.IsNullOrEmpty(currentBinding.path))
|
||||
continue;
|
||||
|
||||
// Get the binding's control type and cache it in the control lookup
|
||||
var bindingType = ProcessBindingControl(currentBinding.path);
|
||||
|
||||
// If the composite can't figure out its type, then skip it
|
||||
if (string.IsNullOrEmpty(bindingType))
|
||||
{
|
||||
//Debug.LogWarning($"Could not add consume processor for binding { currentBinding.path }, in {action.name}");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (currentBinding.processors.Length > 0)
|
||||
action.ApplyBindingOverride(i, new InputBinding { overrideProcessors = $"{bindingType}(m_ActionIndex={actionIndex}), {currentBinding.processors}" });
|
||||
else
|
||||
action.ApplyBindingOverride(i, new InputBinding { overrideProcessors = $"{bindingType}(m_ActionIndex={actionIndex})" });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void EnsureConsumeProcessorAdded(InputActionMap actionMap)
|
||||
{
|
||||
foreach (var action in actionMap.actions)
|
||||
{
|
||||
EnsureConsumeProcessorAdded(action);
|
||||
}
|
||||
}
|
||||
|
||||
static void EnsureConsumeProcessorAdded(InputActionAsset actionAsset)
|
||||
{
|
||||
foreach (var map in actionAsset.actionMaps)
|
||||
{
|
||||
EnsureConsumeProcessorAdded(map);
|
||||
}
|
||||
}
|
||||
|
||||
static int GetActionIndex(InputAction source)
|
||||
{
|
||||
if (source == null)
|
||||
return -1;
|
||||
|
||||
if (!s_ActionIndices.TryGetValue(source, out var actionIndex))
|
||||
{
|
||||
actionIndex = s_ActionIndices.Count;
|
||||
s_ActionIndices.Add(source, actionIndex);
|
||||
}
|
||||
|
||||
return actionIndex;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/XRI_Examples/Global/Scripts/InputMediator.cs.meta
Normal file
11
Assets/XRI_Examples/Global/Scripts/InputMediator.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3e05b88149759dd47aa37ca6dfe979cc
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
79
Assets/XRI_Examples/Global/Scripts/InteractionAnimator.cs
Normal file
79
Assets/XRI_Examples/Global/Scripts/InteractionAnimator.cs
Normal file
@@ -0,0 +1,79 @@
|
||||
using UnityEngine.Playables;
|
||||
using UnityEngine.XR.Interaction.Toolkit;
|
||||
|
||||
namespace UnityEngine.XR.Content.Interaction
|
||||
{
|
||||
/// <summary>
|
||||
/// Component that when paired with an interactable will drive an associated timeline with the activate button
|
||||
/// Must be used with an action-based controller
|
||||
/// </summary>
|
||||
public class InteractionAnimator : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
[Tooltip("The timeline to drive with the activation button.")]
|
||||
PlayableDirector m_ToAnimate;
|
||||
|
||||
bool m_Animating;
|
||||
XRBaseController m_Controller;
|
||||
|
||||
void Start()
|
||||
{
|
||||
// We want to hook up to the Select events so we can read data about the interacting controller
|
||||
var interactable = GetComponent<IXRSelectInteractable>();
|
||||
if (interactable == null || interactable as Object == null)
|
||||
{
|
||||
Debug.LogWarning($"No interactable on {name} - no animation will be played.", this);
|
||||
enabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_ToAnimate == null)
|
||||
{
|
||||
Debug.LogWarning($"No timeline configured on {name} - no animation will be played.", this);
|
||||
enabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
interactable.selectEntered.AddListener(OnSelect);
|
||||
interactable.selectExited.AddListener(OnDeselect);
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (m_Animating && m_Controller != null)
|
||||
{
|
||||
var floatValue = m_Controller.activateInteractionState.value;
|
||||
m_ToAnimate.time = floatValue;
|
||||
}
|
||||
}
|
||||
|
||||
void OnSelect(SelectEnterEventArgs args)
|
||||
{
|
||||
// Get the controller from the interactor, and then the activation control from there
|
||||
var controllerInteractor = args.interactorObject as XRBaseControllerInteractor;
|
||||
if (controllerInteractor == null)
|
||||
{
|
||||
Debug.LogWarning($"Selected by {args.interactorObject.transform.name}, which is not an XRBaseControllerInteractor", this);
|
||||
return;
|
||||
}
|
||||
|
||||
m_Controller = controllerInteractor.xrController;
|
||||
if (m_Controller == null)
|
||||
{
|
||||
Debug.LogWarning($"Selected by {controllerInteractor.name}, which does not have a valid XRBaseController", this);
|
||||
return;
|
||||
}
|
||||
|
||||
// Ready to animate
|
||||
m_ToAnimate.Play();
|
||||
m_Animating = true;
|
||||
}
|
||||
|
||||
void OnDeselect(SelectExitEventArgs args)
|
||||
{
|
||||
m_Animating = false;
|
||||
m_ToAnimate.Stop();
|
||||
m_Controller = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b160c11b363003842a85c3f90316faca
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
317
Assets/XRI_Examples/Global/Scripts/LocomotionManager.cs
Normal file
317
Assets/XRI_Examples/Global/Scripts/LocomotionManager.cs
Normal file
@@ -0,0 +1,317 @@
|
||||
using UnityEngine.XR.Interaction.Toolkit;
|
||||
using UnityEngine.XR.Interaction.Toolkit.Samples.StarterAssets;
|
||||
|
||||
namespace UnityEngine.XR.Content.Interaction
|
||||
{
|
||||
/// <summary>
|
||||
/// Use this class as a central manager to configure locomotion control schemes and configuration preferences.
|
||||
/// </summary>
|
||||
public class LocomotionManager : MonoBehaviour
|
||||
{
|
||||
const ContinuousMoveProviderBase.GravityApplicationMode k_DefaultGravityApplicationMode =
|
||||
ContinuousMoveProviderBase.GravityApplicationMode.AttemptingMove;
|
||||
const ConstrainedMoveProvider.GravityApplicationMode k_DefaultGravityMode =
|
||||
ConstrainedMoveProvider.GravityApplicationMode.AttemptingMove;
|
||||
|
||||
/// <summary>
|
||||
/// Sets which movement control scheme to use.
|
||||
/// </summary>
|
||||
/// <seealso cref="leftHandLocomotionType"/>
|
||||
/// <seealso cref="rightHandLocomotionType"/>
|
||||
public enum LocomotionType
|
||||
{
|
||||
/// <summary>
|
||||
/// Use smooth (continuous) movement control scheme.
|
||||
/// </summary>
|
||||
MoveAndStrafe,
|
||||
|
||||
/// <summary>
|
||||
/// Use teleport movement control scheme.
|
||||
/// </summary>
|
||||
TeleportAndTurn,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets which turn style of locomotion to use.
|
||||
/// </summary>
|
||||
/// <seealso cref="leftHandTurnStyle"/>
|
||||
/// <seealso cref="rightHandTurnStyle"/>
|
||||
public enum TurnStyle
|
||||
{
|
||||
/// <summary>
|
||||
/// Use snap turning to rotate the direction you are facing by snapping by a specified angle.
|
||||
/// </summary>
|
||||
Snap,
|
||||
|
||||
/// <summary>
|
||||
/// Use continuous turning to smoothly rotate the direction you are facing by a specified speed.
|
||||
/// </summary>
|
||||
Smooth,
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Stores the locomotion provider for smooth (continuous) movement.")]
|
||||
DynamicMoveProvider m_DynamicMoveProvider;
|
||||
|
||||
/// <summary>
|
||||
/// Stores the locomotion provider for smooth (continuous) movement.
|
||||
/// </summary>
|
||||
/// <seealso cref="DynamicMoveProvider"/>
|
||||
public DynamicMoveProvider dynamicMoveProvider
|
||||
{
|
||||
get => m_DynamicMoveProvider;
|
||||
set => m_DynamicMoveProvider = value;
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Stores the locomotion provider for smooth (continuous) turning.")]
|
||||
ContinuousTurnProviderBase m_SmoothTurnProvider;
|
||||
|
||||
/// <summary>
|
||||
/// Stores the locomotion provider for smooth (continuous) turning.
|
||||
/// </summary>
|
||||
/// <seealso cref="ContinuousTurnProviderBase"/>
|
||||
public ContinuousTurnProviderBase smoothTurnProvider
|
||||
{
|
||||
get => m_SmoothTurnProvider;
|
||||
set => m_SmoothTurnProvider = value;
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Stores the locomotion provider for snap turning.")]
|
||||
SnapTurnProviderBase m_SnapTurnProvider;
|
||||
|
||||
/// <summary>
|
||||
/// Stores the locomotion provider for snap turning.
|
||||
/// </summary>
|
||||
/// <seealso cref="SnapTurnProviderBase"/>
|
||||
public SnapTurnProviderBase snapTurnProvider
|
||||
{
|
||||
get => m_SnapTurnProvider;
|
||||
set => m_SnapTurnProvider = value;
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Stores the locomotion provider for two-handed grab movement.")]
|
||||
TwoHandedGrabMoveProvider m_TwoHandedGrabMoveProvider;
|
||||
|
||||
/// <summary>
|
||||
/// Stores the locomotion provider for two-handed grab movement.
|
||||
/// </summary>
|
||||
/// <seealso cref="TwoHandedGrabMoveProvider"/>
|
||||
public TwoHandedGrabMoveProvider twoHandedGrabMoveProvider
|
||||
{
|
||||
get => m_TwoHandedGrabMoveProvider;
|
||||
set => m_TwoHandedGrabMoveProvider = value;
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Reference to the manager that mediates the left-hand controllers.")]
|
||||
ActionBasedControllerManager m_LeftHandManager;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Reference to the manager that mediates the right-hand controllers.")]
|
||||
ActionBasedControllerManager m_RightHandManager;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Controls which movement control scheme to use for the left hand.")]
|
||||
LocomotionType m_LeftHandLocomotionType;
|
||||
|
||||
/// <summary>
|
||||
/// Controls which movement control scheme to use for the left hand.
|
||||
/// </summary>
|
||||
/// <seealso cref="LocomotionType"/>
|
||||
public LocomotionType leftHandLocomotionType
|
||||
{
|
||||
get => m_LeftHandLocomotionType;
|
||||
set
|
||||
{
|
||||
SetMoveScheme(value, true);
|
||||
m_LeftHandLocomotionType = value;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Controls which movement control scheme to use for the right hand.")]
|
||||
LocomotionType m_RightHandLocomotionType;
|
||||
|
||||
/// <summary>
|
||||
/// Controls which movement control scheme to use for the left hand.
|
||||
/// </summary>
|
||||
/// <seealso cref="LocomotionType"/>
|
||||
public LocomotionType rightHandLocomotionType
|
||||
{
|
||||
get => m_RightHandLocomotionType;
|
||||
set
|
||||
{
|
||||
SetMoveScheme(value, false);
|
||||
m_RightHandLocomotionType = value;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Controls which turn style of locomotion to use for the left hand.")]
|
||||
TurnStyle m_LeftHandTurnStyle;
|
||||
|
||||
/// <summary>
|
||||
/// Controls which turn style of locomotion to use for the left hand.
|
||||
/// </summary>
|
||||
/// <seealso cref="TurnStyle"/>
|
||||
public TurnStyle leftHandTurnStyle
|
||||
{
|
||||
get => m_LeftHandTurnStyle;
|
||||
set
|
||||
{
|
||||
SetTurnStyle(value, true);
|
||||
m_LeftHandTurnStyle = value;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Controls which turn style of locomotion to use for the right hand.")]
|
||||
TurnStyle m_RightHandTurnStyle;
|
||||
|
||||
/// <summary>
|
||||
/// Controls which turn style of locomotion to use for the left hand.
|
||||
/// </summary>
|
||||
/// <seealso cref="TurnStyle"/>
|
||||
public TurnStyle rightHandTurnStyle
|
||||
{
|
||||
get => m_RightHandTurnStyle;
|
||||
set
|
||||
{
|
||||
SetTurnStyle(value, false);
|
||||
m_RightHandTurnStyle = value;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Whether to enable the comfort mode that applies the tunneling vignette effect to smooth movement and turn.")]
|
||||
bool m_EnableComfortMode;
|
||||
|
||||
public bool enableComfortMode
|
||||
{
|
||||
get => m_EnableComfortMode;
|
||||
set
|
||||
{
|
||||
m_EnableComfortMode = value;
|
||||
if (m_ComfortMode != null)
|
||||
m_ComfortMode.SetActive(m_EnableComfortMode);
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Stores the GameObject for the comfort mode.")]
|
||||
GameObject m_ComfortMode;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Whether gravity affects continuous and grab movement when flying is disabled.")]
|
||||
bool m_UseGravity;
|
||||
|
||||
/// <summary>
|
||||
/// Whether gravity affects continuous and grab movement when flying is disabled.
|
||||
/// </summary>
|
||||
public bool useGravity
|
||||
{
|
||||
get => m_UseGravity;
|
||||
set
|
||||
{
|
||||
m_UseGravity = value;
|
||||
m_DynamicMoveProvider.useGravity = value;
|
||||
m_TwoHandedGrabMoveProvider.useGravity = value;
|
||||
m_TwoHandedGrabMoveProvider.leftGrabMoveProvider.useGravity = value;
|
||||
m_TwoHandedGrabMoveProvider.rightGrabMoveProvider.useGravity = value;
|
||||
if (value)
|
||||
{
|
||||
m_DynamicMoveProvider.gravityApplicationMode = k_DefaultGravityApplicationMode;
|
||||
m_TwoHandedGrabMoveProvider.gravityMode = k_DefaultGravityMode;
|
||||
m_TwoHandedGrabMoveProvider.leftGrabMoveProvider.gravityMode = k_DefaultGravityMode;
|
||||
m_TwoHandedGrabMoveProvider.rightGrabMoveProvider.gravityMode = k_DefaultGravityMode;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Whether to enable flying for continuous and grab movement. This overrides the use of gravity.")]
|
||||
bool m_EnableFly;
|
||||
|
||||
/// <summary>
|
||||
/// Whether to enable flying for continuous and grab movement. This overrides the use of gravity.
|
||||
/// </summary>
|
||||
public bool enableFly
|
||||
{
|
||||
get => m_EnableFly;
|
||||
set
|
||||
{
|
||||
m_EnableFly = value;
|
||||
m_DynamicMoveProvider.enableFly = value;
|
||||
m_TwoHandedGrabMoveProvider.enableFreeYMovement = value;
|
||||
m_TwoHandedGrabMoveProvider.leftGrabMoveProvider.enableFreeYMovement = value;
|
||||
m_TwoHandedGrabMoveProvider.rightGrabMoveProvider.enableFreeYMovement = value;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Whether to enable grab movement.")]
|
||||
bool m_EnableGrabMovement;
|
||||
|
||||
/// <summary>
|
||||
/// Whether to enable grab movement.
|
||||
/// </summary>
|
||||
public bool enableGrabMovement
|
||||
{
|
||||
get => m_EnableGrabMovement;
|
||||
set
|
||||
{
|
||||
m_EnableGrabMovement = value;
|
||||
m_TwoHandedGrabMoveProvider.enabled = value;
|
||||
m_TwoHandedGrabMoveProvider.leftGrabMoveProvider.enabled = value;
|
||||
m_TwoHandedGrabMoveProvider.rightGrabMoveProvider.enabled = value;
|
||||
}
|
||||
}
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
SetMoveScheme(m_LeftHandLocomotionType, true);
|
||||
SetMoveScheme(m_RightHandLocomotionType, false);
|
||||
SetTurnStyle(m_LeftHandTurnStyle, true);
|
||||
SetTurnStyle(m_RightHandTurnStyle, false);
|
||||
|
||||
if (m_ComfortMode != null)
|
||||
m_ComfortMode.SetActive(m_EnableComfortMode);
|
||||
|
||||
m_DynamicMoveProvider.useGravity = m_UseGravity;
|
||||
m_TwoHandedGrabMoveProvider.useGravity = m_UseGravity;
|
||||
m_TwoHandedGrabMoveProvider.leftGrabMoveProvider.useGravity = m_UseGravity;
|
||||
m_TwoHandedGrabMoveProvider.rightGrabMoveProvider.useGravity = m_UseGravity;
|
||||
if (m_UseGravity)
|
||||
{
|
||||
m_DynamicMoveProvider.gravityApplicationMode = k_DefaultGravityApplicationMode;
|
||||
m_TwoHandedGrabMoveProvider.gravityMode = k_DefaultGravityMode;
|
||||
m_TwoHandedGrabMoveProvider.leftGrabMoveProvider.gravityMode = k_DefaultGravityMode;
|
||||
m_TwoHandedGrabMoveProvider.rightGrabMoveProvider.gravityMode = k_DefaultGravityMode;
|
||||
}
|
||||
|
||||
m_DynamicMoveProvider.enableFly = m_EnableFly;
|
||||
m_TwoHandedGrabMoveProvider.enableFreeYMovement = m_EnableFly;
|
||||
m_TwoHandedGrabMoveProvider.leftGrabMoveProvider.enableFreeYMovement = m_EnableFly;
|
||||
m_TwoHandedGrabMoveProvider.rightGrabMoveProvider.enableFreeYMovement = m_EnableFly;
|
||||
|
||||
m_TwoHandedGrabMoveProvider.enabled = m_EnableGrabMovement;
|
||||
m_TwoHandedGrabMoveProvider.leftGrabMoveProvider.enabled = m_EnableGrabMovement;
|
||||
m_TwoHandedGrabMoveProvider.rightGrabMoveProvider.enabled = m_EnableGrabMovement;
|
||||
}
|
||||
|
||||
void SetMoveScheme(LocomotionType scheme, bool leftHand)
|
||||
{
|
||||
var targetHand = leftHand ? m_LeftHandManager : m_RightHandManager;
|
||||
targetHand.smoothMotionEnabled = (scheme == LocomotionType.MoveAndStrafe);
|
||||
}
|
||||
|
||||
void SetTurnStyle(TurnStyle style, bool leftHand)
|
||||
{
|
||||
var targetHand = leftHand ? m_LeftHandManager : m_RightHandManager;
|
||||
targetHand.smoothTurnEnabled = (style == TurnStyle.Smooth);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/XRI_Examples/Global/Scripts/LocomotionManager.cs.meta
Normal file
11
Assets/XRI_Examples/Global/Scripts/LocomotionManager.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fa74d384629b02340bc59709603b0771
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
75
Assets/XRI_Examples/Global/Scripts/ObjectReset.cs
Normal file
75
Assets/XRI_Examples/Global/Scripts/ObjectReset.cs
Normal file
@@ -0,0 +1,75 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace UnityEngine.XR.Content.Interaction
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides the ability to reset specified objects if they fall below a certain position - designated by this transform's height.
|
||||
/// </summary>
|
||||
public class ObjectReset : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
[Tooltip("Which objects to reset if falling out of range.")]
|
||||
List<Transform> m_ObjectsToReset = new List<Transform>();
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("How often to check if objects should be reset.")]
|
||||
float m_CheckDuration = 2f;
|
||||
|
||||
readonly List<Pose> m_OriginalPositions = new List<Pose>();
|
||||
|
||||
float m_CheckTimer;
|
||||
|
||||
/// <summary>
|
||||
/// See <see cref="MonoBehaviour"/>.
|
||||
/// </summary>
|
||||
protected void Start()
|
||||
{
|
||||
foreach (var currentTransform in m_ObjectsToReset)
|
||||
{
|
||||
if (currentTransform != null)
|
||||
{
|
||||
m_OriginalPositions.Add(new Pose(currentTransform.position, currentTransform.rotation));
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("Objects To Reset contained a null element. Update the reference or delete the array element of the missing object.", this);
|
||||
m_OriginalPositions.Add(new Pose());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// See <see cref="MonoBehaviour"/>.
|
||||
/// </summary>
|
||||
protected void Update()
|
||||
{
|
||||
m_CheckTimer -= Time.deltaTime;
|
||||
|
||||
if (m_CheckTimer > 0)
|
||||
return;
|
||||
|
||||
m_CheckTimer = m_CheckDuration;
|
||||
|
||||
var resetPlane = transform.position.y;
|
||||
|
||||
for (var transformIndex = 0; transformIndex < m_ObjectsToReset.Count; transformIndex++)
|
||||
{
|
||||
var currentTransform = m_ObjectsToReset[transformIndex];
|
||||
if (currentTransform == null)
|
||||
continue;
|
||||
|
||||
if (currentTransform.position.y < resetPlane)
|
||||
{
|
||||
currentTransform.SetPositionAndRotation(m_OriginalPositions[transformIndex].position, m_OriginalPositions[transformIndex].rotation);
|
||||
|
||||
var rigidBody = currentTransform.GetComponentInChildren<Rigidbody>();
|
||||
if (rigidBody != null)
|
||||
{
|
||||
rigidBody.velocity = Vector3.zero;
|
||||
rigidBody.angularVelocity = Vector3.zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/XRI_Examples/Global/Scripts/ObjectReset.cs.meta
Normal file
11
Assets/XRI_Examples/Global/Scripts/ObjectReset.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 44d90717e41f7864b9265cc48de52361
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
51
Assets/XRI_Examples/Global/Scripts/OnAnimationEvent.cs
Normal file
51
Assets/XRI_Examples/Global/Scripts/OnAnimationEvent.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using UnityEngine.Events;
|
||||
|
||||
namespace UnityEngine.XR.Content.Animation
|
||||
{
|
||||
/// <summary>
|
||||
/// Will receive triggers from the <see cref="AnimationEventActionBegin"/> and <see cref="AnimationEventActionFinished"/> classes,
|
||||
/// and forward them to Unity Events.
|
||||
/// </summary>
|
||||
public class OnAnimationEvent : MonoBehaviour, IAnimationEventActionBegin, IAnimationEventActionFinished
|
||||
{
|
||||
[Serializable]
|
||||
struct ActionEvent
|
||||
{
|
||||
public string m_Label;
|
||||
public UnityEvent m_Action;
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
ActionEvent[] m_ActionBeginEvents;
|
||||
|
||||
[SerializeField]
|
||||
ActionEvent[] m_ActionEndEvents;
|
||||
|
||||
/// <inheritdoc />
|
||||
public void ActionBegin(string label)
|
||||
{
|
||||
if (m_ActionBeginEvents == null)
|
||||
return;
|
||||
|
||||
foreach (var currentAction in m_ActionBeginEvents)
|
||||
{
|
||||
if (currentAction.m_Label == label)
|
||||
currentAction.m_Action.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void ActionFinished(string label)
|
||||
{
|
||||
if (m_ActionEndEvents == null)
|
||||
return;
|
||||
|
||||
foreach (var currentAction in m_ActionEndEvents)
|
||||
{
|
||||
if (currentAction.m_Label == label)
|
||||
currentAction.m_Action.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/XRI_Examples/Global/Scripts/OnAnimationEvent.cs.meta
Normal file
11
Assets/XRI_Examples/Global/Scripts/OnAnimationEvent.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5f41c6b958fe5744f9a8db4b5e83a155
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
32
Assets/XRI_Examples/Global/Scripts/OnSelectInteractable.cs
Normal file
32
Assets/XRI_Examples/Global/Scripts/OnSelectInteractable.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using UnityEngine.XR.Interaction.Toolkit;
|
||||
|
||||
namespace UnityEngine.XR.Content.Interaction
|
||||
{
|
||||
/// <summary>
|
||||
/// Triggers a Unity Event once when an interactable is selected by an interactor.
|
||||
/// </summary>
|
||||
public class OnSelectInteractable : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
[Tooltip("The interactable that is checked for selection.")]
|
||||
XRBaseInteractable m_TargetInteractable;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("The function to call when the interactable is selected.")]
|
||||
SelectEnterEvent m_OnSelected;
|
||||
|
||||
void Start()
|
||||
{
|
||||
if (m_TargetInteractable != null)
|
||||
m_TargetInteractable.selectEntered.AddListener(OnSelected);
|
||||
}
|
||||
|
||||
void OnSelected(SelectEnterEventArgs args)
|
||||
{
|
||||
m_OnSelected.Invoke(args);
|
||||
|
||||
if (m_TargetInteractable != null)
|
||||
m_TargetInteractable.selectEntered.RemoveListener(OnSelected);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cbba2ee228ba19f4f9e0fc5c6ec8ed04
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
84
Assets/XRI_Examples/Global/Scripts/OnTilt.cs
Normal file
84
Assets/XRI_Examples/Global/Scripts/OnTilt.cs
Normal file
@@ -0,0 +1,84 @@
|
||||
using UnityEngine.Events;
|
||||
|
||||
namespace UnityEngine.XR.Content.Interaction
|
||||
{
|
||||
/// <summary>
|
||||
/// Runs functionality when an object is tilted.
|
||||
/// Used with grabbable objects for pouring.
|
||||
/// </summary>
|
||||
public class OnTilt : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// Extra angle value that is added/removed from the threshold to events from rapid-fire triggering on and off.
|
||||
/// </summary>
|
||||
const float k_AngleBuffer = 0.05f;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Tilt range, 0 - 180 degrees.")]
|
||||
[Range(k_AngleBuffer * 2f, (1 - k_AngleBuffer * 2f))]
|
||||
float m_Threshold = 0.5f;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("The transform to check for tilt. Will default to this object if not set.")]
|
||||
Transform m_Target;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("The transform to get as the source of the 'up' direction. Will default to world up if not set.")]
|
||||
Transform m_UpSource;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Event to trigger when tilting goes over the threshold.")]
|
||||
UnityEvent m_OnBegin = new UnityEvent();
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Event to trigger when tilting returns from the threshold.")]
|
||||
UnityEvent m_OnEnd = new UnityEvent();
|
||||
|
||||
/// <summary>
|
||||
/// Event to trigger when tilting goes over the threshold.
|
||||
/// </summary>
|
||||
public UnityEvent onBegin => m_OnBegin;
|
||||
|
||||
/// <summary>
|
||||
/// Event to trigger when tilting returns from the threshold.
|
||||
/// </summary>
|
||||
public UnityEvent onEnd => m_OnEnd;
|
||||
|
||||
bool m_WithinThreshold;
|
||||
|
||||
void Update()
|
||||
{
|
||||
CheckOrientation();
|
||||
}
|
||||
|
||||
void CheckOrientation()
|
||||
{
|
||||
var targetUp = m_Target != null ? m_Target.up : transform.up;
|
||||
var baseUp = m_UpSource != null ? m_UpSource.up : Vector3.up;
|
||||
|
||||
var similarity = Vector3.Dot(-targetUp, baseUp);
|
||||
similarity = Mathf.InverseLerp(-1, 1, similarity);
|
||||
|
||||
if (m_WithinThreshold)
|
||||
similarity += k_AngleBuffer;
|
||||
else
|
||||
similarity -= k_AngleBuffer;
|
||||
|
||||
var thresholdCheck = (similarity >= m_Threshold);
|
||||
|
||||
if (m_WithinThreshold != thresholdCheck)
|
||||
{
|
||||
m_WithinThreshold = thresholdCheck;
|
||||
|
||||
if (m_WithinThreshold)
|
||||
{
|
||||
m_OnBegin.Invoke();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_OnEnd.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/XRI_Examples/Global/Scripts/OnTilt.cs.meta
Normal file
11
Assets/XRI_Examples/Global/Scripts/OnTilt.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e311508d4777a834fb25a1729a564503
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
85
Assets/XRI_Examples/Global/Scripts/OnVelocity.cs
Normal file
85
Assets/XRI_Examples/Global/Scripts/OnVelocity.cs
Normal file
@@ -0,0 +1,85 @@
|
||||
using UnityEngine.Events;
|
||||
|
||||
namespace UnityEngine.XR.Content.Interaction
|
||||
{
|
||||
/// <summary>
|
||||
/// Calls events for when the velocity of this objects breaks the begin and end threshold.
|
||||
/// </summary>
|
||||
[RequireComponent(typeof(Rigidbody))]
|
||||
public class OnVelocity : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
[Tooltip("The speed that will trigger the begin event.")]
|
||||
float m_BeginThreshold = 1.25f;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("The speed that will trigger the end event.")]
|
||||
float m_EndThreshold = 0.25f;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Event that triggers when speed meets the begin threshold.")]
|
||||
UnityEvent m_OnBegin = new UnityEvent();
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Event that triggers when the speed dips below the end threshold.")]
|
||||
UnityEvent m_OnEnd = new UnityEvent();
|
||||
|
||||
/// <summary>
|
||||
/// Event that triggers when speed meets the begin threshold.
|
||||
/// </summary>
|
||||
public UnityEvent onBegin => m_OnBegin;
|
||||
|
||||
/// <summary>
|
||||
/// Event that triggers when the speed dips below the end threshold.
|
||||
/// </summary>
|
||||
public UnityEvent onEnd => m_OnEnd;
|
||||
|
||||
Rigidbody m_RigidBody;
|
||||
bool m_HasBegun;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
m_RigidBody = GetComponent<Rigidbody>();
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
CheckVelocity();
|
||||
}
|
||||
|
||||
void CheckVelocity()
|
||||
{
|
||||
var speed = m_RigidBody.velocity.magnitude;
|
||||
m_HasBegun = HasVelocityBegun(speed);
|
||||
|
||||
if (HasVelocityEnded(speed))
|
||||
m_HasBegun = false;
|
||||
}
|
||||
|
||||
bool HasVelocityBegun(float speed)
|
||||
{
|
||||
if (m_HasBegun)
|
||||
return true;
|
||||
|
||||
var beginCheck = speed > m_BeginThreshold;
|
||||
|
||||
if (beginCheck)
|
||||
m_OnBegin.Invoke();
|
||||
|
||||
return beginCheck;
|
||||
}
|
||||
|
||||
bool HasVelocityEnded(float speed)
|
||||
{
|
||||
if (!m_HasBegun)
|
||||
return false;
|
||||
|
||||
var endCheck = speed < m_EndThreshold;
|
||||
|
||||
if (endCheck)
|
||||
m_OnEnd.Invoke();
|
||||
|
||||
return endCheck;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/XRI_Examples/Global/Scripts/OnVelocity.cs.meta
Normal file
11
Assets/XRI_Examples/Global/Scripts/OnVelocity.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2eb756a4b82b24040a468c0a73063e4d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
41
Assets/XRI_Examples/Global/Scripts/PlayQuickSound.cs
Normal file
41
Assets/XRI_Examples/Global/Scripts/PlayQuickSound.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
namespace UnityEngine.XR.Content.Interaction
|
||||
{
|
||||
/// <summary>
|
||||
/// Play a simple sound using <c>PlayOneShot</c> with volume and randomized pitch.
|
||||
/// </summary>
|
||||
[RequireComponent(typeof(AudioSource))]
|
||||
public class PlayQuickSound : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
[Tooltip("The sound that is played.")]
|
||||
AudioClip m_Sound;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("The volume of the sound.")]
|
||||
float m_Volume = 1f;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("The range of pitch the sound is played at (-pitch, pitch).")]
|
||||
[Range(0, 1)]
|
||||
float m_RandomPitchVariance;
|
||||
|
||||
AudioSource m_AudioSource;
|
||||
|
||||
const float k_DefaultPitch = 1f;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
m_AudioSource = GetComponent<AudioSource>();
|
||||
}
|
||||
|
||||
public void Play()
|
||||
{
|
||||
var randomVariance = Random.Range(-m_RandomPitchVariance, m_RandomPitchVariance);
|
||||
randomVariance += k_DefaultPitch;
|
||||
|
||||
m_AudioSource.pitch = randomVariance;
|
||||
m_AudioSource.PlayOneShot(m_Sound, m_Volume);
|
||||
m_AudioSource.pitch = k_DefaultPitch;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/XRI_Examples/Global/Scripts/PlayQuickSound.cs.meta
Normal file
11
Assets/XRI_Examples/Global/Scripts/PlayQuickSound.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0755a2ba17a31d643b4a27e3034d8a79
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
42
Assets/XRI_Examples/Global/Scripts/RayAttachModifier.cs
Normal file
42
Assets/XRI_Examples/Global/Scripts/RayAttachModifier.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using Unity.XR.CoreUtils;
|
||||
using UnityEngine.XR.Interaction.Toolkit;
|
||||
|
||||
namespace UnityEngine.XR.Content.Interaction
|
||||
{
|
||||
/// <summary>
|
||||
/// Add this to your interactable to make it snap to the source of the XR Ray Interactor
|
||||
/// instead of staying at a distance. Has a similar outcome as enabling Force Grab.
|
||||
/// </summary>
|
||||
public class RayAttachModifier : MonoBehaviour
|
||||
{
|
||||
IXRSelectInteractable m_SelectInteractable;
|
||||
|
||||
protected void OnEnable()
|
||||
{
|
||||
m_SelectInteractable = GetComponent<IXRSelectInteractable>();
|
||||
if (m_SelectInteractable as Object == null)
|
||||
{
|
||||
Debug.LogError($"Ray Attach Modifier missing required Select Interactable on {name}", this);
|
||||
return;
|
||||
}
|
||||
|
||||
m_SelectInteractable.selectEntered.AddListener(OnSelectEntered);
|
||||
}
|
||||
|
||||
protected void OnDisable()
|
||||
{
|
||||
if (m_SelectInteractable as Object != null)
|
||||
m_SelectInteractable.selectEntered.RemoveListener(OnSelectEntered);
|
||||
}
|
||||
|
||||
void OnSelectEntered(SelectEnterEventArgs args)
|
||||
{
|
||||
if (!(args.interactorObject is XRRayInteractor))
|
||||
return;
|
||||
|
||||
var attachTransform = args.interactorObject.GetAttachTransform(m_SelectInteractable);
|
||||
var originalAttachPose = args.interactorObject.GetLocalAttachPoseOnSelect(m_SelectInteractable);
|
||||
attachTransform.SetLocalPose(originalAttachPose);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/XRI_Examples/Global/Scripts/RayAttachModifier.cs.meta
Normal file
11
Assets/XRI_Examples/Global/Scripts/RayAttachModifier.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 62fb9fb1177925e4b8a383be2b9db66c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
488
Assets/XRI_Examples/Global/Scripts/TransformJoint.cs
Normal file
488
Assets/XRI_Examples/Global/Scripts/TransformJoint.cs
Normal file
@@ -0,0 +1,488 @@
|
||||
namespace UnityEngine.XR.Content.Interaction
|
||||
{
|
||||
/// <summary>
|
||||
/// Joins a rigidbody and transform together in a way that optimizes for transform and rigidbody-based motion automatically when appropriate.
|
||||
/// Exerts an increasing force when the rigidbody is separate from the anchor position, but does not oscillate like a spring.
|
||||
/// </summary>
|
||||
public class TransformJoint : MonoBehaviour, ISerializationCallbackReceiver
|
||||
{
|
||||
const float k_MinMass = 0.01f;
|
||||
const float k_MaxForceDistance = 0.01f;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("A reference to another transform this joint connects to.")]
|
||||
Transform m_ConnectedBody;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("The Position of the anchor around which the joints motion is constrained.")]
|
||||
Vector3 m_Anchor;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("The Rotation of the anchor around which the joints motion is constrained")]
|
||||
Vector3 m_AnchorAngle;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Should the connectedAnchor be calculated automatically?")]
|
||||
bool m_AutoConfigureConnectedAnchor;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Position of the anchor relative to the connected transform.")]
|
||||
Vector3 m_ConnectedAnchor;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("The Rotation of the anchor relative to the connected transform.")]
|
||||
Vector3 m_ConnectedAnchorAngle;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Enable collision between bodies connected with the joint.")]
|
||||
bool m_EnableCollision;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Baseline force applied when an obstacle is between the joint and the connected transform.")]
|
||||
float m_BaseForce = 0.25f;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Additional force applied based on the distance between joint and connected transform")]
|
||||
float m_SpringForce = 1f;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("The distance this joint must be from the anchor before teleporting.")]
|
||||
float m_BreakDistance = 1.5f;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("The angular distance this joint must be from the anchor before teleporting.")]
|
||||
float m_BreakAngle = 120f;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Should the angle be matched?")]
|
||||
bool m_MatchRotation = true;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Should the mass of the rigidbody be temporarily adjusted to stabilize very strong motion?")]
|
||||
bool m_AdjustMass = true;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A reference to another transform this joint connects to.
|
||||
/// </summary>
|
||||
public Transform connectedBody
|
||||
{
|
||||
get => m_ConnectedBody;
|
||||
set
|
||||
{
|
||||
if (m_ConnectedBody == value)
|
||||
return;
|
||||
|
||||
m_ConnectedBody = value;
|
||||
SetupConnectedBodies(true);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The Position of the anchor around which the joints motion is constrained.
|
||||
/// </summary>
|
||||
public Vector3 anchor
|
||||
{
|
||||
get => m_Anchor;
|
||||
set => m_Anchor = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The Rotation of the anchor around which the joints motion is constrained
|
||||
/// </summary>
|
||||
public Vector3 anchorAngle
|
||||
{
|
||||
get => m_AnchorAngle;
|
||||
set
|
||||
{
|
||||
m_AnchorAngle = value;
|
||||
m_AnchorRotation.eulerAngles = m_AnchorAngle;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Should the connectedAnchor be calculated automatically?
|
||||
/// </summary>
|
||||
public bool autoConfigureConnectedAnchor
|
||||
{
|
||||
get => m_AutoConfigureConnectedAnchor;
|
||||
set
|
||||
{
|
||||
m_AutoConfigureConnectedAnchor = value;
|
||||
SetupConnectedBodies(true);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Position of the anchor relative to the connected transform.
|
||||
/// </summary>
|
||||
public Vector3 connectedAnchor
|
||||
{
|
||||
get => m_ConnectedAnchor;
|
||||
set => m_ConnectedAnchor = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The Rotation of the anchor relative to the connected transform.
|
||||
/// </summary>
|
||||
public Vector3 connectedAnchorAngle
|
||||
{
|
||||
get => m_ConnectedAnchorAngle;
|
||||
set
|
||||
{
|
||||
m_ConnectedAnchorAngle = value;
|
||||
m_ConnectedAnchorRotation.eulerAngles = m_ConnectedAnchorAngle;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enable collision between bodies connected with the joint.
|
||||
/// </summary>
|
||||
public bool enableCollision
|
||||
{
|
||||
get => m_EnableCollision;
|
||||
set
|
||||
{
|
||||
m_EnableCollision = value;
|
||||
SetupConnectedBodies();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Should the mass of the rigidbody be temporarily adjusted to stabilize very strong motion?
|
||||
/// </summary>
|
||||
public bool adjustMass
|
||||
{
|
||||
get => m_AdjustMass;
|
||||
set => m_AdjustMass = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Baseline force applied when an obstacle is between the joint and the connected transform.
|
||||
/// </summary>
|
||||
public float baseForce
|
||||
{
|
||||
get => m_BaseForce;
|
||||
set => m_BaseForce = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Additional force applied based on the distance between joint and connected transform
|
||||
/// </summary>
|
||||
public float springForce
|
||||
{
|
||||
get => m_SpringForce;
|
||||
set => m_SpringForce = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The distance this joint must be from the anchor before teleporting.
|
||||
/// </summary>
|
||||
public float breakDistance
|
||||
{
|
||||
get => m_BreakDistance;
|
||||
set => m_BreakDistance = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The angular distance this joint must be from the anchor before teleporting.
|
||||
/// </summary>
|
||||
public float breakAngle
|
||||
{
|
||||
get => m_BreakAngle;
|
||||
set => m_BreakAngle = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The angular distance this joint must be from the anchor before teleporting.
|
||||
/// </summary>
|
||||
public bool matchRotation
|
||||
{
|
||||
get => m_MatchRotation;
|
||||
set => m_MatchRotation = value;
|
||||
}
|
||||
|
||||
|
||||
Quaternion m_AnchorRotation;
|
||||
Quaternion m_ConnectedAnchorRotation;
|
||||
|
||||
Transform m_Transform;
|
||||
Rigidbody m_Rigidbody;
|
||||
|
||||
bool m_FixedSyncFrame;
|
||||
bool m_ActiveCollision;
|
||||
bool m_CollisionFrame;
|
||||
bool m_LastCollisionFrame;
|
||||
|
||||
Vector3 m_LastPosition;
|
||||
Vector3 m_LastDirection;
|
||||
|
||||
Collider m_SourceCollider;
|
||||
Collider m_ConnectedCollider;
|
||||
|
||||
float m_BaseMass = 1f;
|
||||
float m_AppliedForce;
|
||||
float m_OldForce;
|
||||
|
||||
void Start()
|
||||
{
|
||||
m_Rigidbody = GetComponent<Rigidbody>();
|
||||
m_SourceCollider = GetComponent<Collider>();
|
||||
|
||||
m_Transform = transform;
|
||||
|
||||
m_AnchorRotation.eulerAngles = m_AnchorAngle;
|
||||
m_ConnectedAnchorRotation.eulerAngles = m_ConnectedAnchorAngle;
|
||||
|
||||
if (m_Rigidbody != null && m_Rigidbody.mass > k_MinMass)
|
||||
m_BaseMass = m_Rigidbody.mass;
|
||||
|
||||
// Set up connected anchor if attached
|
||||
SetupConnectedBodies(true);
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
if (m_Rigidbody != null)
|
||||
m_Rigidbody.mass = m_BaseMass;
|
||||
}
|
||||
|
||||
void SetupConnectedBodies(bool updateAnchor = false)
|
||||
{
|
||||
// Handle undoing old setup
|
||||
// If any properties are pre-existing and have changed, reset the last saved collision ignore pairing
|
||||
if (m_SourceCollider != null && m_ConnectedCollider != null)
|
||||
{
|
||||
Physics.IgnoreCollision(m_SourceCollider, m_ConnectedCollider, false);
|
||||
m_ConnectedCollider = null;
|
||||
}
|
||||
|
||||
// Handle current setup
|
||||
if (m_ConnectedBody != null)
|
||||
{
|
||||
if (m_AutoConfigureConnectedAnchor && updateAnchor)
|
||||
{
|
||||
// Calculate what offsets are currently, set them as anchor
|
||||
m_ConnectedAnchor = m_ConnectedBody.InverseTransformPoint(m_Rigidbody.position + Vector3.Scale((m_Rigidbody.rotation * m_Anchor), m_Transform.lossyScale));
|
||||
m_ConnectedAnchorRotation = (m_Rigidbody.rotation * m_AnchorRotation);
|
||||
m_ConnectedAnchorAngle = m_ConnectedAnchorRotation.eulerAngles;
|
||||
}
|
||||
if (m_EnableCollision)
|
||||
{
|
||||
// Get collider on connected body
|
||||
m_ConnectedCollider = m_ConnectedBody.GetComponent<Collider>();
|
||||
|
||||
if (m_SourceCollider != null && m_ConnectedCollider != null)
|
||||
{
|
||||
Physics.IgnoreCollision(m_SourceCollider, m_ConnectedCollider, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LateUpdate()
|
||||
{
|
||||
// Move freely unless collision has occurred - then rely on physics
|
||||
if ((m_CollisionFrame || m_ActiveCollision) && !m_FixedSyncFrame)
|
||||
{
|
||||
m_Transform.position = m_Rigidbody.position;
|
||||
|
||||
if (m_MatchRotation)
|
||||
m_Transform.rotation = m_Rigidbody.rotation;
|
||||
}
|
||||
|
||||
m_FixedSyncFrame = false;
|
||||
}
|
||||
|
||||
void FixedUpdate()
|
||||
{
|
||||
m_FixedSyncFrame = true;
|
||||
m_OldForce = m_AppliedForce;
|
||||
m_AppliedForce = 0f;
|
||||
|
||||
// Zero out any existing velocity, we are going to set force manually if needed
|
||||
m_Rigidbody.velocity = Vector3.zero;
|
||||
m_Rigidbody.angularVelocity = Vector3.zero;
|
||||
|
||||
UpdateBufferedCollision();
|
||||
UpdatePosition();
|
||||
|
||||
if (m_MatchRotation)
|
||||
UpdateRotation();
|
||||
|
||||
if (m_AdjustMass)
|
||||
{
|
||||
var offset = (m_AppliedForce / m_BaseMass) * Time.fixedDeltaTime * Time.fixedDeltaTime * 0.5f;
|
||||
var massScale = Mathf.Max((offset / k_MaxForceDistance), 1f);
|
||||
m_Rigidbody.mass = m_BaseMass * massScale;
|
||||
}
|
||||
// and acc = f/m
|
||||
// offset = acc * fixedTimestep * fixedTimestep * .5
|
||||
|
||||
// Is offset over certain desirable distance? ie. .1m
|
||||
// scale offset down by scaling mass up
|
||||
// offset*scale = acc * ftp^2 * .5
|
||||
// offset = acc *
|
||||
//
|
||||
// Based on total force, scale mass
|
||||
}
|
||||
|
||||
void UpdateBufferedCollision()
|
||||
{
|
||||
// We buffer collision over three updates
|
||||
// Once from the actual collision to the first fixed update (m_ActiveCollision)
|
||||
// Once for an entire fixedUpdate-to-fixedUpdate cycle (m_CollisionFrame)
|
||||
// And once when a collision is lost - to correct against potential errors when a moving a parent transform
|
||||
m_LastCollisionFrame = m_CollisionFrame;
|
||||
m_CollisionFrame = m_ActiveCollision;
|
||||
m_ActiveCollision = false;
|
||||
}
|
||||
|
||||
void UpdatePosition()
|
||||
{
|
||||
// Assume transform is synced to the rigid body position from late update
|
||||
// Convert anchors to world space
|
||||
var worldSourceAnchor = m_Rigidbody.position + Vector3.Scale((m_Rigidbody.rotation * m_Anchor), m_Transform.lossyScale);
|
||||
var worldDestAnchor = m_ConnectedBody.TransformPoint(m_ConnectedAnchor);
|
||||
|
||||
// Get the delta between these two positions
|
||||
// Use this to calculate the target world position for the rigidbody
|
||||
var positionDelta = worldDestAnchor - worldSourceAnchor;
|
||||
var offset = positionDelta.magnitude;
|
||||
var direction = positionDelta.normalized;
|
||||
var targetPos = m_Rigidbody.position + positionDelta;
|
||||
|
||||
// Convert the target and actual positions to world space
|
||||
var worldPos = m_Rigidbody.position;
|
||||
|
||||
if (offset > Mathf.Epsilon)
|
||||
{
|
||||
// Are we past the break distance?
|
||||
if (offset > m_BreakDistance)
|
||||
{
|
||||
// Warp back to the target
|
||||
m_Rigidbody.position = targetPos;
|
||||
m_Transform.position = targetPos;
|
||||
m_LastDirection = direction;
|
||||
return;
|
||||
}
|
||||
|
||||
// Can we move back unobstructed? Do that
|
||||
if (!m_CollisionFrame)
|
||||
{
|
||||
if (m_Rigidbody.SweepTest(direction, out var hitInfo, offset))
|
||||
{
|
||||
targetPos = worldPos + (hitInfo.distance * direction);
|
||||
m_CollisionFrame = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// If there was a collision during the previous update, we let one more update cycle pass at the current location
|
||||
// This helps prevent teleporting through objects during scenarios where many things are playing into the object's position
|
||||
if (m_LastCollisionFrame)
|
||||
{
|
||||
// Compare last direction to this direction
|
||||
// If they are facing opposite directions, no worry of collision
|
||||
if (Vector3.Dot(direction, m_LastDirection) > 0)
|
||||
{
|
||||
targetPos = worldPos;
|
||||
m_AppliedForce = m_OldForce;
|
||||
}
|
||||
}
|
||||
}
|
||||
m_Rigidbody.position = targetPos;
|
||||
m_Transform.position = targetPos;
|
||||
}
|
||||
|
||||
if (m_CollisionFrame)
|
||||
{
|
||||
// Apply a constant force based on spring logic
|
||||
//Debug.Log(m_Rigidbody.velocity);
|
||||
var force = (m_BaseForce + offset * m_SpringForce);
|
||||
m_AppliedForce = force;
|
||||
m_Rigidbody.AddForce(direction * force, ForceMode.Impulse);
|
||||
m_LastPosition = m_Rigidbody.position;
|
||||
}
|
||||
m_LastDirection = direction;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateRotation()
|
||||
{
|
||||
// Assume transform is synced to the rigid body position from late update
|
||||
// Convert anchor rotations to world space
|
||||
var worldSourceAnchor = m_Rigidbody.rotation * m_AnchorRotation;
|
||||
var worldDestAnchor = m_ConnectedBody.rotation * m_ConnectedAnchorRotation;
|
||||
|
||||
// Get the delta between these two positions
|
||||
// Use this to calculate the target world position for the rigidbody
|
||||
var rotationDelta = worldDestAnchor * Quaternion.Inverse(worldSourceAnchor);
|
||||
var targetRotation = rotationDelta * m_Rigidbody.rotation;
|
||||
|
||||
rotationDelta.ToAngleAxis(out var angleInDegrees, out var rotationAxis);
|
||||
if (angleInDegrees > 180f)
|
||||
angleInDegrees -= 360f;
|
||||
|
||||
var angleOffset = Mathf.Abs(angleInDegrees);
|
||||
|
||||
if (angleOffset > Mathf.Epsilon)
|
||||
{
|
||||
// Are we past the break distance?
|
||||
if (angleOffset > m_BreakAngle)
|
||||
{
|
||||
// Warp back to the target
|
||||
m_Rigidbody.rotation = targetRotation;
|
||||
m_Transform.rotation = targetRotation;
|
||||
}
|
||||
|
||||
// Can we move back unobstructed? Do that
|
||||
if (!m_CollisionFrame)
|
||||
{
|
||||
m_Rigidbody.rotation = targetRotation;
|
||||
m_Transform.rotation = targetRotation;
|
||||
}
|
||||
else
|
||||
{
|
||||
var force = ((angleInDegrees / 360f) * (m_BaseForce + m_SpringForce));
|
||||
m_Rigidbody.AddTorque(rotationAxis * force, ForceMode.Impulse);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OnCollisionEnter()
|
||||
{
|
||||
// While in a collision state, we change state so that the regular transform/visual updates are locked to the fixed update rate
|
||||
m_ActiveCollision = true;
|
||||
m_CollisionFrame = true;
|
||||
}
|
||||
|
||||
void OnCollisionStay()
|
||||
{
|
||||
m_ActiveCollision = true;
|
||||
m_CollisionFrame = true;
|
||||
}
|
||||
|
||||
void OnCollisionExit()
|
||||
{
|
||||
if (!enabled)
|
||||
return;
|
||||
|
||||
// When exiting collision, we lock to the last known rigidbody position.
|
||||
// This is because we can end up putting fairly strong forces on this object
|
||||
// If a parent or pure transform change invalidates the collision these forces can cause an object to move through things
|
||||
m_Rigidbody.velocity = Vector3.zero;
|
||||
m_Rigidbody.position = m_LastPosition;
|
||||
transform.position = m_LastPosition;
|
||||
}
|
||||
|
||||
public void OnBeforeSerialize()
|
||||
{
|
||||
}
|
||||
|
||||
public void OnAfterDeserialize()
|
||||
{
|
||||
m_AnchorRotation.eulerAngles = m_AnchorAngle;
|
||||
m_ConnectedAnchorRotation.eulerAngles = m_ConnectedAnchorAngle;
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user