diff --git a/Samples~/XRController/Material/Controller.mat b/Samples~/XRController/Material/Controller.mat deleted file mode 100644 index 75947ad..0000000 --- a/Samples~/XRController/Material/Controller.mat +++ /dev/null @@ -1,162 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &-5121006237457058402 -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: 9 ---- !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: 46, guid: 0000000000000000f000000000000000, type: 0} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: - - _METALLICGLOSSMAP - - _NORMALMAP - m_InvalidKeywords: - - _METALLICSPECGLOSSMAP - - _OCCLUSIONMAP - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: - - MOTIONVECTORS - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _AO: - m_Texture: {fileID: 2800000, guid: 86bcd70ff1fc9d542b1bbf038888893a, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _BaseColor: - m_Texture: {fileID: 2800000, guid: 0bce9db852d150a46abc1386096610a7, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _BaseMap: - m_Texture: {fileID: 2800000, guid: 0bce9db852d150a46abc1386096610a7, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _BumpMap: - m_Texture: {fileID: 2800000, guid: d1c4ec6d57a3cc7428cc3f89e4cb9ac2, type: 3} - 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: 0bce9db852d150a46abc1386096610a7, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _Metallic: - m_Texture: {fileID: 2800000, guid: 0d4e4e18e326ea34a9555ce353ba4203, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MetallicGlossMap: - m_Texture: {fileID: 2800000, guid: 0d4e4e18e326ea34a9555ce353ba4203, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _Normal: - m_Texture: {fileID: 2800000, guid: d1c4ec6d57a3cc7428cc3f89e4cb9ac2, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 2800000, guid: 86bcd70ff1fc9d542b1bbf038888893a, type: 3} - 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} - - _Roughness: - m_Texture: {fileID: 2800000, guid: ae2912a83fccc5f4f94484e407ee8c24, type: 3} - 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: - - _AddPrecomputedVelocity: 0 - - _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: 0.5 - - _Glossiness: 0 - - _GlossyReflections: 1 - - _Metallic: 0 - - _Mode: 0 - - _OcclusionStrength: 1 - - _Parallax: 0.005 - - _QueueControl: 0 - - _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: 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.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] - m_AllowLocking: 1 diff --git a/Samples~/XRController/Material/ControllerButton.mat b/Samples~/XRController/Material/ControllerButton.mat deleted file mode 100644 index c8a25d5..0000000 --- a/Samples~/XRController/Material/ControllerButton.mat +++ /dev/null @@ -1,162 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &-5121006237457058402 -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: 9 ---- !u!21 &2100000 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: ControllerButton - m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: - - _METALLICGLOSSMAP - - _NORMALMAP - m_InvalidKeywords: - - _METALLICSPECGLOSSMAP - - _OCCLUSIONMAP - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: - - MOTIONVECTORS - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _AO: - m_Texture: {fileID: 2800000, guid: 86bcd70ff1fc9d542b1bbf038888893a, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _BaseColor: - m_Texture: {fileID: 2800000, guid: 0bce9db852d150a46abc1386096610a7, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _BaseMap: - m_Texture: {fileID: 2800000, guid: 0bce9db852d150a46abc1386096610a7, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _BumpMap: - m_Texture: {fileID: 2800000, guid: d1c4ec6d57a3cc7428cc3f89e4cb9ac2, type: 3} - 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: 0bce9db852d150a46abc1386096610a7, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _Metallic: - m_Texture: {fileID: 2800000, guid: 0d4e4e18e326ea34a9555ce353ba4203, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MetallicGlossMap: - m_Texture: {fileID: 2800000, guid: 0d4e4e18e326ea34a9555ce353ba4203, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _Normal: - m_Texture: {fileID: 2800000, guid: d1c4ec6d57a3cc7428cc3f89e4cb9ac2, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 2800000, guid: 86bcd70ff1fc9d542b1bbf038888893a, type: 3} - 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} - - _Roughness: - m_Texture: {fileID: 2800000, guid: ae2912a83fccc5f4f94484e407ee8c24, type: 3} - 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: - - _AddPrecomputedVelocity: 0 - - _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.005 - - _QueueControl: 0 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 1 - - _SmoothnessTextureChannel: 0 - - _SpecularHighlights: 1 - - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 0 - - _UVSec: 0 - - _WorkflowMode: 1 - - _ZWrite: 1 - 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.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] - m_AllowLocking: 1 diff --git a/Samples~/XRController/Material/ControllerLED.mat b/Samples~/XRController/Material/ControllerLed_Builtin.mat similarity index 50% rename from Samples~/XRController/Material/ControllerLED.mat rename to Samples~/XRController/Material/ControllerLed_Builtin.mat index 04b6089..fd84db6 100644 --- a/Samples~/XRController/Material/ControllerLED.mat +++ b/Samples~/XRController/Material/ControllerLed_Builtin.mat @@ -7,8 +7,8 @@ Material: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: ControllerLED - m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_Name: ControllerLed_Builtin + m_Shader: {fileID: 4800000, guid: 8b45684e8afb3214ca3b6efe9b7026e0, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 m_ValidKeywords: [] @@ -24,47 +24,27 @@ Material: m_SavedProperties: serializedVersion: 3 m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} + - _BaseColor: + m_Texture: {fileID: 2800000, guid: bdbd248e432eddc439d75aae0c3ea620, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _BumpMap: + - _Emissive: 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} + - _Mask: + m_Texture: {fileID: 2800000, guid: b162726f5358bce4ea3716bdab543629, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _OcclusionMap: + - _Metallic: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _ParallaxMap: + - _Normal: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _SpecGlossMap: + - _Roughness: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} @@ -82,48 +62,17 @@ Material: m_Offset: {x: 0, y: 0} m_Ints: [] m_Floats: - - _AddPrecomputedVelocity: 0 - - _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: 0 - - _Glossiness: 0.5 - - _GlossyReflections: 1 - - _Metallic: 0 - - _Mode: 0 - - _OcclusionStrength: 1 - - _Parallax: 0.005 - - _QueueControl: 0 + - _Alpha: 0 + - _LedAlpha: 1 + - _LedIntensity: 0 + - _QueueControl: -1 - _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, g: 0, b: 0, a: 1} - - _Color: {r: 0, g: 0, b: 0, a: 1} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} + - _EmissiveColor: {r: 0, g: 0, b: 0, a: 0} + - _LedColor: {r: 0, g: 0.5016849, b: 1, a: 1} m_BuildTextureStacks: [] m_AllowLocking: 1 ---- !u!114 &6530154691802465495 +--- !u!114 &6414468939250447496 MonoBehaviour: m_ObjectHideFlags: 11 m_CorrespondingSourceObject: {fileID: 0} diff --git a/Samples~/XRController/Material/ControllerLED.mat.meta b/Samples~/XRController/Material/ControllerLed_Builtin.mat.meta similarity index 64% rename from Samples~/XRController/Material/ControllerLED.mat.meta rename to Samples~/XRController/Material/ControllerLed_Builtin.mat.meta index 717d2f9..de1f4e4 100644 --- a/Samples~/XRController/Material/ControllerLED.mat.meta +++ b/Samples~/XRController/Material/ControllerLed_Builtin.mat.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: bdd1862cd6f2b16499c1452732012561 +guid: e9dec9f7244289641959144af35e0abc NativeFormatImporter: externalObjects: {} - mainObjectFileID: 2100000 + mainObjectFileID: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Samples~/XRController/Material/Controller_Builtin.mat b/Samples~/XRController/Material/Controller_Builtin.mat new file mode 100644 index 0000000..1f6b025 --- /dev/null +++ b/Samples~/XRController/Material/Controller_Builtin.mat @@ -0,0 +1,52 @@ +%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: Controller_Builtin + m_Shader: {fileID: 4800000, guid: 5763f3f03376b9a48bcac2f5cdaecd27, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AoRoughnessMetallic: + m_Texture: {fileID: 2800000, guid: 3bd2ea1964fbaff4bb0838332916a177, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BaseColor: + m_Texture: {fileID: 2800000, guid: bcecee3fd3866b445ad54407bc8ade8c, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Metallic: + m_Texture: {fileID: 2800000, guid: 8ec7c8a9e494f2642b217f4876658ab1, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Normal: + m_Texture: {fileID: 2800000, guid: 7c167e4459d975341a1967516daecf9a, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Roughness: + m_Texture: {fileID: 2800000, guid: 1eda9d01c157d5d43a19938da49ee9d5, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _Metallic: 0 + - _Roughness: 0.5 + m_Colors: [] + m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Samples~/XRController/Material/Controller.mat.meta b/Samples~/XRController/Material/Controller_Builtin.mat.meta similarity index 64% rename from Samples~/XRController/Material/Controller.mat.meta rename to Samples~/XRController/Material/Controller_Builtin.mat.meta index fcaf61b..5b5a591 100644 --- a/Samples~/XRController/Material/Controller.mat.meta +++ b/Samples~/XRController/Material/Controller_Builtin.mat.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: b9a1629f76681a042b010d162c2fdc2b +guid: 17a17c6fa1dd3d6428a3fcfbf016c46b NativeFormatImporter: externalObjects: {} - mainObjectFileID: 2100000 + mainObjectFileID: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Samples~/XRController/Mesh.meta b/Samples~/XRController/Mesh.meta index 5c7c320..a4ec0fc 100644 --- a/Samples~/XRController/Mesh.meta +++ b/Samples~/XRController/Mesh.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 29717aea44683c347a169c5e3e9ecd37 +guid: 158ad908539139b4e8ae2fb7e99f139b folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Samples~/XRController/Mesh/LeftController.fbx b/Samples~/XRController/Mesh/LeftController.fbx index 35ddac1..73e76be 100644 Binary files a/Samples~/XRController/Mesh/LeftController.fbx and b/Samples~/XRController/Mesh/LeftController.fbx differ diff --git a/Samples~/XRController/Mesh/LeftController.fbx.meta b/Samples~/XRController/Mesh/LeftController.fbx.meta index e82ac08..bea3c4e 100644 --- a/Samples~/XRController/Mesh/LeftController.fbx.meta +++ b/Samples~/XRController/Mesh/LeftController.fbx.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 1b49b762dca79f24f931179a91f05289 +guid: 9fc8a93975864e646bb3ac19753439ea ModelImporter: serializedVersion: 22200 internalIDToNameTable: [] @@ -16,8 +16,6 @@ ModelImporter: optimizeGameObjects: 0 removeConstantScaleCurves: 0 motionNodeName: - rigImportErrors: - rigImportWarnings: animationImportErrors: animationImportWarnings: animationRetargetingWarnings: diff --git a/Samples~/XRController/Mesh/RightController.fbx b/Samples~/XRController/Mesh/RightController.fbx index 75bbf89..a9e85f6 100644 Binary files a/Samples~/XRController/Mesh/RightController.fbx and b/Samples~/XRController/Mesh/RightController.fbx differ diff --git a/Samples~/XRController/Mesh/RightController.fbx.meta b/Samples~/XRController/Mesh/RightController.fbx.meta index 690bb20..db06493 100644 --- a/Samples~/XRController/Mesh/RightController.fbx.meta +++ b/Samples~/XRController/Mesh/RightController.fbx.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 6776c902296b26441b87a0a88dc19696 +guid: 816cf601952d83643a2c9ca175fe03ce ModelImporter: serializedVersion: 22200 internalIDToNameTable: [] @@ -16,8 +16,6 @@ ModelImporter: optimizeGameObjects: 0 removeConstantScaleCurves: 0 motionNodeName: - rigImportErrors: - rigImportWarnings: animationImportErrors: animationImportWarnings: animationRetargetingWarnings: diff --git a/Samples~/XRController/Prefab/LeftController.prefab b/Samples~/XRController/Prefab/LeftController.prefab index cf58876..71899ef 100644 --- a/Samples~/XRController/Prefab/LeftController.prefab +++ b/Samples~/XRController/Prefab/LeftController.prefab @@ -1,6 +1,6 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!1001 &4204891181824414388 +--- !u!1001 &4524944331212079985 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 @@ -8,195 +8,278 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - - target: {fileID: -8679921383154817045, guid: 1b49b762dca79f24f931179a91f05289, type: 3} + - target: {fileID: -9199463342675015460, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -9199463342675015460, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -9199463342675015460, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: -8.341 + objectReference: {fileID: 0} + - target: {fileID: -9186606906265628803, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} + propertyPath: m_LocalRotation.w + value: 0.90613246 + objectReference: {fileID: 0} + - target: {fileID: -9186606906265628803, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} + propertyPath: m_LocalRotation.x + value: 0.4228209 + objectReference: {fileID: 0} + - target: {fileID: -9186606906265628803, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} + propertyPath: m_LocalRotation.z + value: -0.003339723 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} propertyPath: m_LocalPosition.x value: -0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 1b49b762dca79f24f931179a91f05289, type: 3} + - target: {fileID: -8679921383154817045, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} propertyPath: m_LocalPosition.y - value: 0.01 + value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 1b49b762dca79f24f931179a91f05289, type: 3} + - target: {fileID: -8679921383154817045, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} propertyPath: m_LocalPosition.z - value: -0.05 + value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 1b49b762dca79f24f931179a91f05289, type: 3} + - target: {fileID: -8679921383154817045, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} propertyPath: m_LocalRotation.w - value: 0.9063079 + value: 1 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 1b49b762dca79f24f931179a91f05289, type: 3} + - target: {fileID: -8679921383154817045, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} propertyPath: m_LocalRotation.x - value: -0.42261827 + value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 1b49b762dca79f24f931179a91f05289, type: 3} + - target: {fileID: -8679921383154817045, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} propertyPath: m_LocalRotation.y value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 1b49b762dca79f24f931179a91f05289, type: 3} + - target: {fileID: -8679921383154817045, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} propertyPath: m_LocalRotation.z value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 1b49b762dca79f24f931179a91f05289, type: 3} + - target: {fileID: -8679921383154817045, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} propertyPath: m_LocalEulerAnglesHint.x - value: -50 + value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 1b49b762dca79f24f931179a91f05289, type: 3} + - target: {fileID: -8679921383154817045, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 1b49b762dca79f24f931179a91f05289, type: 3} + - target: {fileID: -8679921383154817045, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: -6663248615839425721, guid: 1b49b762dca79f24f931179a91f05289, type: 3} + - target: {fileID: -8482179750240973916, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} propertyPath: m_CastShadows value: 0 objectReference: {fileID: 0} - - target: {fileID: -6663248615839425721, guid: 1b49b762dca79f24f931179a91f05289, type: 3} + - target: {fileID: -8482179750240973916, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} + propertyPath: m_ReceiveShadows + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8482179750240973916, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} propertyPath: m_LightProbeUsage value: 0 objectReference: {fileID: 0} - - target: {fileID: -6663248615839425721, guid: 1b49b762dca79f24f931179a91f05289, type: 3} + - target: {fileID: -8482179750240973916, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} + propertyPath: m_ReflectionProbeUsage + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8482179750240973916, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} propertyPath: 'm_Materials.Array.data[0]' value: - objectReference: {fileID: 2100000, guid: bdd1862cd6f2b16499c1452732012561, type: 2} - - target: {fileID: -1380771316523579159, guid: 1b49b762dca79f24f931179a91f05289, type: 3} + objectReference: {fileID: 2100000, guid: e9dec9f7244289641959144af35e0abc, type: 2} + - target: {fileID: -4520252348662025184, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} propertyPath: 'm_Materials.Array.data[0]' value: - objectReference: {fileID: 2100000, guid: 35f2f0f62b2b97c07ae2ba643569349c, type: 2} - - target: {fileID: 919132149155446097, guid: 1b49b762dca79f24f931179a91f05289, type: 3} - propertyPath: m_Name - value: LeftController + objectReference: {fileID: 2100000, guid: 17a17c6fa1dd3d6428a3fcfbf016c46b, type: 2} + - target: {fileID: -2212996682566225843, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} + propertyPath: m_LocalRotation.w + value: 0.38255233 + objectReference: {fileID: 0} + - target: {fileID: -2212996682566225843, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} + propertyPath: m_LocalRotation.y + value: 0.010017451 + objectReference: {fileID: 0} + - target: {fileID: -2212996682566225843, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} + propertyPath: m_LocalRotation.z + value: -0.024184342 objectReference: {fileID: 0} - - target: {fileID: 2619218313309105869, guid: 1b49b762dca79f24f931179a91f05289, type: 3} + - target: {fileID: -1615913737620187343, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} propertyPath: 'm_Materials.Array.data[0]' value: - objectReference: {fileID: 2100000, guid: b9a1629f76681a042b010d162c2fdc2b, type: 2} - - target: {fileID: 3022904049054381717, guid: 1b49b762dca79f24f931179a91f05289, type: 3} + objectReference: {fileID: 2100000, guid: 17a17c6fa1dd3d6428a3fcfbf016c46b, type: 2} + - target: {fileID: -537658470732713232, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} + propertyPath: m_LocalRotation.x + value: 0.4402061 + objectReference: {fileID: 0} + - target: {fileID: -537658470732713232, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} + propertyPath: m_LocalRotation.y + value: 0.047430817 + objectReference: {fileID: 0} + - target: {fileID: -537658470732713232, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} + propertyPath: m_LocalRotation.z + value: 0.012314759 + objectReference: {fileID: 0} + - target: {fileID: -245333062987662520, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} propertyPath: 'm_Materials.Array.data[0]' value: - objectReference: {fileID: 2100000, guid: 35f2f0f62b2b97c07ae2ba643569349c, type: 2} - - target: {fileID: 5325284574502630797, guid: 1b49b762dca79f24f931179a91f05289, type: 3} + objectReference: {fileID: 2100000, guid: 17a17c6fa1dd3d6428a3fcfbf016c46b, type: 2} + - target: {fileID: 919132149155446097, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} + propertyPath: m_Name + value: LeftController 1 + objectReference: {fileID: 0} + - target: {fileID: 1062538198305378713, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} propertyPath: 'm_Materials.Array.data[0]' value: - objectReference: {fileID: 2100000, guid: 35f2f0f62b2b97c07ae2ba643569349c, type: 2} - - target: {fileID: 5785143619850038663, guid: 1b49b762dca79f24f931179a91f05289, type: 3} + objectReference: {fileID: 2100000, guid: 17a17c6fa1dd3d6428a3fcfbf016c46b, type: 2} + - target: {fileID: 3112121240831153201, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} + propertyPath: m_LocalRotation.x + value: 0.3790508 + objectReference: {fileID: 0} + - target: {fileID: 3112121240831153201, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} + propertyPath: m_LocalRotation.y + value: 0.05607926 + objectReference: {fileID: 0} + - target: {fileID: 3112121240831153201, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} + propertyPath: m_LocalRotation.z + value: 0.0002647508 + objectReference: {fileID: 0} + - target: {fileID: 5010559310533935947, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} propertyPath: 'm_Materials.Array.data[0]' value: - objectReference: {fileID: 2100000, guid: 35f2f0f62b2b97c07ae2ba643569349c, type: 2} - - target: {fileID: 7912577938104809701, guid: 1b49b762dca79f24f931179a91f05289, type: 3} + objectReference: {fileID: 2100000, guid: 17a17c6fa1dd3d6428a3fcfbf016c46b, type: 2} + - target: {fileID: 5286140622660225535, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} + propertyPath: m_LocalRotation.x + value: 0.0006407937 + objectReference: {fileID: 0} + - target: {fileID: 5286140622660225535, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} + propertyPath: m_LocalRotation.y + value: 0.012737585 + objectReference: {fileID: 0} + - target: {fileID: 5286140622660225535, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} + propertyPath: m_LocalRotation.z + value: 0.01241482 + objectReference: {fileID: 0} + - target: {fileID: 5286140622660225535, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -16.818 + objectReference: {fileID: 0} + - target: {fileID: 5286140622660225535, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 1.029 + objectReference: {fileID: 0} + - target: {fileID: 5286140622660225535, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 1.487 + objectReference: {fileID: 0} + - target: {fileID: 6836609147848689043, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} propertyPath: 'm_Materials.Array.data[0]' value: - objectReference: {fileID: 2100000, guid: 35f2f0f62b2b97c07ae2ba643569349c, type: 2} - - target: {fileID: 8129873126111405855, guid: 1b49b762dca79f24f931179a91f05289, type: 3} + objectReference: {fileID: 2100000, guid: 17a17c6fa1dd3d6428a3fcfbf016c46b, type: 2} + - target: {fileID: 7527643747332895556, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} propertyPath: 'm_Materials.Array.data[0]' value: - objectReference: {fileID: 2100000, guid: 35f2f0f62b2b97c07ae2ba643569349c, type: 2} + objectReference: {fileID: 2100000, guid: 17a17c6fa1dd3d6428a3fcfbf016c46b, type: 2} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] m_AddedComponents: - - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 1b49b762dca79f24f931179a91f05289, type: 3} + - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} insertIndex: -1 - addedObject: {fileID: -2191443546594941805} - - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 1b49b762dca79f24f931179a91f05289, type: 3} + addedObject: {fileID: 237499724411863802} + - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} insertIndex: -1 - addedObject: {fileID: 106320436904039793} - m_SourcePrefab: {fileID: 100100000, guid: 1b49b762dca79f24f931179a91f05289, type: 3} ---- !u!4 &762857701643272421 stripped + addedObject: {fileID: 3914180316112748588} + m_SourcePrefab: {fileID: 100100000, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} +--- !u!4 &1584050057703855936 stripped Transform: - m_CorrespondingSourceObject: {fileID: -5706921328002510255, guid: 1b49b762dca79f24f931179a91f05289, type: 3} - m_PrefabInstance: {fileID: 4204891181824414388} + m_CorrespondingSourceObject: {fileID: 3112121240831153201, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} + m_PrefabInstance: {fileID: 4524944331212079985} m_PrefabAsset: {fileID: 0} ---- !u!4 &3294422559947940247 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 1721190471195947811, guid: 1b49b762dca79f24f931179a91f05289, type: 3} - m_PrefabInstance: {fileID: 4204891181824414388} - m_PrefabAsset: {fileID: 0} ---- !u!4 &3338177163201177434 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 1443773330459751918, guid: 1b49b762dca79f24f931179a91f05289, type: 3} - m_PrefabInstance: {fileID: 4204891181824414388} - m_PrefabAsset: {fileID: 0} ---- !u!4 &3535638649786920005 stripped -Transform: - m_CorrespondingSourceObject: {fileID: -8409387228586705167, guid: 1b49b762dca79f24f931179a91f05289, type: 3} - m_PrefabInstance: {fileID: 4204891181824414388} - m_PrefabAsset: {fileID: 0} ---- !u!1 &3934931739962257381 stripped +--- !u!1 &3605902486027468320 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 1b49b762dca79f24f931179a91f05289, type: 3} - m_PrefabInstance: {fileID: 4204891181824414388} + m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} + m_PrefabInstance: {fileID: 4524944331212079985} m_PrefabAsset: {fileID: 0} ---- !u!114 &-2191443546594941805 +--- !u!114 &237499724411863802 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3934931739962257381} + m_GameObject: {fileID: 3605902486027468320} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 49ad92e74cacea040be7c224f4f331c3, type: 3} + m_Script: {fileID: 11500000, guid: f77db2ed0ea4e19428c3b518ecbb741c, type: 3} m_Name: m_EditorClassIdentifier: - _thumbStick: {fileID: 6560750023782525230} - _upperButton: {fileID: 3294422559947940247} - _lowerButton: {fileID: 3338177163201177434} - _systemButton: {fileID: 3535638649786920005} - _trigger: {fileID: 8090141865140552173} - _grip: {fileID: 762857701643272421} - _maxThumbStickRot: {x: 10, y: 10} - _pressedThumbStickOffset: 0.002 - _pressedUpperBtnOffset: 0.002 - _pressedLowerBtnOffset: 0.002 - _pressedSystemBtnOffset: 0.001 - _maxTriggerRot: 17 - _maxGripRot: 10 - _thumbStickInput: - m_Name: Thumb Stick Input + _thumbstick: + _targetObject: {fileID: 6882080604667900732} + _releasedPosition: {x: 0.0173542, y: -0.015634399, z: -0.0202263} + _pressedPosition: {x: 0.0174, y: -0.0165, z: -0.0193} + _releasedRotation: {x: 45, y: 183, z: 180} + _pressedRotation: {x: 45, y: 183, z: 180} + _upperButton: + _targetObject: {fileID: 1584050057703855936} + _releasedPosition: {x: -0.00241119, y: -0.008994049, z: -0.0266108} + _pressedPosition: {x: -0.0022, y: -0.0104, z: -0.0252} + _releasedRotation: {x: 44.44384, y: 8.359817, z: 3.4532106} + _pressedRotation: {x: 44.44384, y: 8.359817, z: 3.4532106} + _lowerButton: + _targetObject: {fileID: 5062624998912389505} + _releasedPosition: {x: 0.0028574099, y: 0.0013485999, z: -0.017285} + _pressedPosition: {x: 0.0031, y: -0.0003, z: -0.016} + _releasedRotation: {x: 52.015095, y: 8.963512, z: 5.9539495} + _pressedRotation: {x: 52.015095, y: 8.963512, z: 5.9539495} + _systemButton: + _targetObject: {fileID: 4488199129426775052} + _releasedPosition: {x: 0.017930599, y: 0.00466629, z: -0.0124584995} + _pressedPosition: {x: 0.0179, y: 0.0041, z: -0.012} + _releasedRotation: {x: 50.02645, y: 1.6288157, z: 0.33768004} + _pressedRotation: {x: 50.02645, y: 1.6288157, z: 0.33768004} + _triggerButton: + _targetObject: {fileID: 8617620323715287694} + _releasedPosition: {x: 0.00461447, y: -0.038828697, z: -0.026794199} + _pressedPosition: {x: 0.00461447, y: -0.038828697, z: -0.026794199} + _releasedRotation: {x: 0.05529701, y: 1.4604588, z: 1.4234905} + _pressedRotation: {x: 343.18213, y: 1.0287308, z: 1.4871078} + _gripButton: + _targetObject: {fileID: 4512365146767657901} + _releasedPosition: {x: 0.013130601, y: -0.0273438, z: 0.023010299} + _pressedPosition: {x: 0.013130601, y: -0.0273438, z: 0.023010299} + _releasedRotation: {x: 0, y: 0, z: 0} + _pressedRotation: {x: -1.9773975e-21, y: 9.045018e-22, z: 351.65912} + _thumbstickPressAction: + m_Name: Thumbstick Press m_Type: 0 - m_ExpectedControlType: Vector2 - m_Id: 711525a7-0492-4a70-98ac-b741737e98c2 - m_Processors: - m_Interactions: - m_SingletonActionBindings: - - m_Name: - m_Id: bcae8ab2-80a4-4c77-8354-7556a13143a9 - m_Path: {LeftHand}/thumbstick - m_Interactions: - m_Processors: - m_Groups: - m_Action: Thumb Stick Input - m_Flags: 0 - m_Flags: 0 - _thumbStickPressedInput: - m_Name: Thumb Stick Pressed Input - m_Type: 1 - m_ExpectedControlType: Button - m_Id: 9cf9d271-fef7-43c7-8d44-c9fd4f5e6d87 + m_ExpectedControlType: + m_Id: f7111406-3e29-44cb-8a4a-eac358d96fed m_Processors: m_Interactions: m_SingletonActionBindings: - m_Name: - m_Id: 43eaba42-3217-4a56-ad11-d26c1cbd4ac1 + m_Id: 3c4c6089-c877-4912-88c7-e77d51e3a99a m_Path: {LeftHand}/thumbstickClicked m_Interactions: m_Processors: m_Groups: - m_Action: Thumb Stick Pressed Input + m_Action: Thumbstick Press m_Flags: 0 m_Flags: 0 - _upperButtonPressedInput: + _upperButtonPressAction: m_Name: Upper Button Pressed Input - m_Type: 1 - m_ExpectedControlType: Button - m_Id: 5dbbc449-b607-4c35-bda1-fc566b51366d + m_Type: 0 + m_ExpectedControlType: + m_Id: ce4fa43e-bc56-4689-b246-c456fe1d2e1f m_Processors: m_Interactions: m_SingletonActionBindings: - m_Name: - m_Id: cac6bf0f-0c70-4f73-9891-4fe5fba227be + m_Id: c7753fdb-32c5-499c-9857-17e60e40ae34 m_Path: {LeftHand}/secondaryButton m_Interactions: m_Processors: @@ -204,16 +287,16 @@ MonoBehaviour: m_Action: Upper Button Pressed Input m_Flags: 0 m_Flags: 0 - _lowerButtonPressedInput: + _lowerButtonPressAction: m_Name: Lower Button Pressed Input - m_Type: 1 - m_ExpectedControlType: Button - m_Id: 02bcf1e5-2435-4705-8c2c-8ab97a73c035 + m_Type: 0 + m_ExpectedControlType: + m_Id: 0dfeabd4-cf7a-48e9-b88c-74b7945418e9 m_Processors: m_Interactions: m_SingletonActionBindings: - m_Name: - m_Id: eb17d3ec-4ab3-4add-a146-e98a4716fd8f + m_Id: 3b677494-e31a-44de-af08-9e23c7671971 m_Path: {LeftHand}/primaryButton m_Interactions: m_Processors: @@ -221,16 +304,16 @@ MonoBehaviour: m_Action: Lower Button Pressed Input m_Flags: 0 m_Flags: 0 - _systemButtonPressedInput: + _systemButtonPressAction: m_Name: System Button Pressed Input - m_Type: 1 - m_ExpectedControlType: Button - m_Id: 1d5d05fd-0136-4c54-9f6b-1526fd10a600 + m_Type: 0 + m_ExpectedControlType: + m_Id: 71ac668f-930b-4bdb-ba69-88e80df7d2b8 m_Processors: m_Interactions: m_SingletonActionBindings: - m_Name: - m_Id: d3613966-6fdd-4f0f-bd30-a1848e8eee7c + m_Id: 9b24f201-fde9-490d-9de5-795681fcb8a6 m_Path: {LeftHand}/menu m_Interactions: m_Processors: @@ -238,16 +321,16 @@ MonoBehaviour: m_Action: System Button Pressed Input m_Flags: 0 m_Flags: 0 - _triggerInput: + _triggerAxisAction: m_Name: Trigger Input m_Type: 0 m_ExpectedControlType: - m_Id: 6ec42fef-8025-41cf-a5f4-9b22268ec4c1 + m_Id: 0d4e1e63-38f5-46d0-9ebb-e3113a606070 m_Processors: m_Interactions: m_SingletonActionBindings: - m_Name: - m_Id: f89cd8e3-3dfd-4f94-bed9-c0505d9d065a + m_Id: 28ff7636-2bdf-4e8f-a986-0d5f1e3363ca m_Path: {LeftHand}/trigger m_Interactions: m_Processors: @@ -255,16 +338,16 @@ MonoBehaviour: m_Action: Trigger Input m_Flags: 0 m_Flags: 0 - _gripInput: + _gripAxisAction: m_Name: Grip Input m_Type: 0 m_ExpectedControlType: - m_Id: 0b5e7be1-a919-4e02-9a6a-d2b11d7b85a1 + m_Id: ae5026d5-4b39-4822-8dd4-4cfd84f3ef49 m_Processors: m_Interactions: m_SingletonActionBindings: - m_Name: - m_Id: 7a8533a8-7d9d-4e20-ac5d-9b66f1fb83f1 + m_Id: 2e86eef3-15ca-4a72-84ad-628d306d3540 m_Path: {LeftHand}/grip m_Interactions: m_Processors: @@ -272,17 +355,34 @@ MonoBehaviour: m_Action: Grip Input m_Flags: 0 m_Flags: 0 - _inverseThumbStickX: 1 - _inverseThumbStickY: 1 - _gripRotationPivot: {x: 0, y: 0, z: 1} - _triggerRotationPivot: {x: 1, y: 0, z: 0} ---- !u!114 &106320436904039793 + _thumbstickTransform: {fileID: 6882080604667900732} + _maxThumbstickRot: {x: 10, y: 10} + _inverseThumbstickX: 1 + _inverseThumbstickY: 0 + _thumbstickAxisAction: + m_Name: Thumb Stick Input + m_Type: 0 + m_ExpectedControlType: + m_Id: 24c35428-5db2-4a20-91e1-1dd099b0ebbc + m_Processors: + m_Interactions: + m_SingletonActionBindings: + - m_Name: + m_Id: e80d62ab-b23b-45f2-9b29-c8a522afdcb2 + m_Path: {LeftHand}/thumbstick + m_Interactions: + m_Processors: + m_Groups: + m_Action: Thumb Stick Input + m_Flags: 0 + m_Flags: 0 +--- !u!114 &3914180316112748588 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3934931739962257381} + m_GameObject: {fileID: 3605902486027468320} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: c2fadf230d1919748a9aa21d40f74619, type: 3} @@ -369,13 +469,28 @@ MonoBehaviour: m_Interactions: m_SingletonActionBindings: [] m_Flags: 0 ---- !u!4 &6560750023782525230 stripped +--- !u!4 &4488199129426775052 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -9186606906265628803, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} + m_PrefabInstance: {fileID: 4524944331212079985} + m_PrefabAsset: {fileID: 0} +--- !u!4 &4512365146767657901 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -9199463342675015460, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} + m_PrefabInstance: {fileID: 4524944331212079985} + m_PrefabAsset: {fileID: 0} +--- !u!4 &5062624998912389505 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -537658470732713232, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} + m_PrefabInstance: {fileID: 4524944331212079985} + m_PrefabAsset: {fileID: 0} +--- !u!4 &6882080604667900732 stripped Transform: - m_CorrespondingSourceObject: {fileID: 7013988232356461466, guid: 1b49b762dca79f24f931179a91f05289, type: 3} - m_PrefabInstance: {fileID: 4204891181824414388} + m_CorrespondingSourceObject: {fileID: -2212996682566225843, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} + m_PrefabInstance: {fileID: 4524944331212079985} m_PrefabAsset: {fileID: 0} ---- !u!4 &8090141865140552173 stripped +--- !u!4 &8617620323715287694 stripped Transform: - m_CorrespondingSourceObject: {fileID: 5341044213140755289, guid: 1b49b762dca79f24f931179a91f05289, type: 3} - m_PrefabInstance: {fileID: 4204891181824414388} + m_CorrespondingSourceObject: {fileID: 5286140622660225535, guid: 9fc8a93975864e646bb3ac19753439ea, type: 3} + m_PrefabInstance: {fileID: 4524944331212079985} m_PrefabAsset: {fileID: 0} diff --git a/Samples~/XRController/Prefab/LeftController.prefab.meta b/Samples~/XRController/Prefab/LeftController.prefab.meta index 0bf79dd..8d9c64a 100644 --- a/Samples~/XRController/Prefab/LeftController.prefab.meta +++ b/Samples~/XRController/Prefab/LeftController.prefab.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 28d082d6c802a844384715111b194769 +guid: 89b99af74e08b9249b5af14bce889a03 PrefabImporter: externalObjects: {} userData: diff --git a/Samples~/XRController/Prefab/RightController.prefab b/Samples~/XRController/Prefab/RightController.prefab index 841385a..f11c603 100644 --- a/Samples~/XRController/Prefab/RightController.prefab +++ b/Samples~/XRController/Prefab/RightController.prefab @@ -1,6 +1,6 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!1001 &7103663176713473981 +--- !u!1001 &4511177028789018445 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 @@ -8,195 +8,274 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - - target: {fileID: -8784341879701893518, guid: 6776c902296b26441b87a0a88dc19696, type: 3} + - target: {fileID: -9199463342675015460, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -9199463342675015460, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -9199463342675015460, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 7.958 + objectReference: {fileID: 0} + - target: {fileID: -9031431984426089154, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} propertyPath: 'm_Materials.Array.data[0]' value: - objectReference: {fileID: 2100000, guid: 35f2f0f62b2b97c07ae2ba643569349c, type: 2} - - target: {fileID: -8679921383154817045, guid: 6776c902296b26441b87a0a88dc19696, type: 3} + objectReference: {fileID: 2100000, guid: 17a17c6fa1dd3d6428a3fcfbf016c46b, type: 2} + - target: {fileID: -8679921383154817045, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} propertyPath: m_LocalPosition.x value: -0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 6776c902296b26441b87a0a88dc19696, type: 3} + - target: {fileID: -8679921383154817045, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} propertyPath: m_LocalPosition.y - value: 0.01 + value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 6776c902296b26441b87a0a88dc19696, type: 3} + - target: {fileID: -8679921383154817045, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} propertyPath: m_LocalPosition.z - value: -0.05 + value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 6776c902296b26441b87a0a88dc19696, type: 3} + - target: {fileID: -8679921383154817045, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} propertyPath: m_LocalRotation.w - value: 0.9063079 + value: 1 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 6776c902296b26441b87a0a88dc19696, type: 3} + - target: {fileID: -8679921383154817045, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} propertyPath: m_LocalRotation.x - value: -0.42261827 + value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 6776c902296b26441b87a0a88dc19696, type: 3} + - target: {fileID: -8679921383154817045, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} propertyPath: m_LocalRotation.y - value: 0 + value: -0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 6776c902296b26441b87a0a88dc19696, type: 3} + - target: {fileID: -8679921383154817045, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} propertyPath: m_LocalRotation.z - value: 0 + value: -0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 6776c902296b26441b87a0a88dc19696, type: 3} + - target: {fileID: -8679921383154817045, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} propertyPath: m_LocalEulerAnglesHint.x - value: -50 + value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 6776c902296b26441b87a0a88dc19696, type: 3} + - target: {fileID: -8679921383154817045, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 6776c902296b26441b87a0a88dc19696, type: 3} + - target: {fileID: -8679921383154817045, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: -6862024747161618847, guid: 6776c902296b26441b87a0a88dc19696, type: 3} + - target: {fileID: -7928756367484528061, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} propertyPath: 'm_Materials.Array.data[0]' value: - objectReference: {fileID: 2100000, guid: 35f2f0f62b2b97c07ae2ba643569349c, type: 2} - - target: {fileID: -5314042243280585700, guid: 6776c902296b26441b87a0a88dc19696, type: 3} + objectReference: {fileID: 2100000, guid: 17a17c6fa1dd3d6428a3fcfbf016c46b, type: 2} + - target: {fileID: -6534560969330674531, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} propertyPath: 'm_Materials.Array.data[0]' value: - objectReference: {fileID: 2100000, guid: 35f2f0f62b2b97c07ae2ba643569349c, type: 2} - - target: {fileID: -3217550034380309225, guid: 6776c902296b26441b87a0a88dc19696, type: 3} + objectReference: {fileID: 2100000, guid: 17a17c6fa1dd3d6428a3fcfbf016c46b, type: 2} + - target: {fileID: -3820934110361096230, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} + propertyPath: m_LocalRotation.y + value: -0.0014957441 + objectReference: {fileID: 0} + - target: {fileID: -3820934110361096230, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} + propertyPath: m_LocalRotation.z + value: -0.021139782 + objectReference: {fileID: 0} + - target: {fileID: -3812675933000061213, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} propertyPath: 'm_Materials.Array.data[0]' value: - objectReference: {fileID: 2100000, guid: 35f2f0f62b2b97c07ae2ba643569349c, type: 2} - - target: {fileID: -2125337632178896584, guid: 6776c902296b26441b87a0a88dc19696, type: 3} + objectReference: {fileID: 2100000, guid: 17a17c6fa1dd3d6428a3fcfbf016c46b, type: 2} + - target: {fileID: -2212996682566225843, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} + propertyPath: m_LocalRotation.w + value: 0.38255233 + objectReference: {fileID: 0} + - target: {fileID: -2212996682566225843, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} + propertyPath: m_LocalRotation.y + value: 0.010017451 + objectReference: {fileID: 0} + - target: {fileID: -2212996682566225843, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} + propertyPath: m_LocalRotation.z + value: -0.024184342 + objectReference: {fileID: 0} + - target: {fileID: -636201255714939468, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} propertyPath: 'm_Materials.Array.data[0]' value: - objectReference: {fileID: 2100000, guid: 35f2f0f62b2b97c07ae2ba643569349c, type: 2} - - target: {fileID: -145678107328856847, guid: 6776c902296b26441b87a0a88dc19696, type: 3} + objectReference: {fileID: 2100000, guid: 17a17c6fa1dd3d6428a3fcfbf016c46b, type: 2} + - target: {fileID: -538038805722592409, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} propertyPath: 'm_Materials.Array.data[0]' value: - objectReference: {fileID: 2100000, guid: 35f2f0f62b2b97c07ae2ba643569349c, type: 2} - - target: {fileID: 919132149155446097, guid: 6776c902296b26441b87a0a88dc19696, type: 3} + objectReference: {fileID: 2100000, guid: 17a17c6fa1dd3d6428a3fcfbf016c46b, type: 2} + - target: {fileID: -537658470732713232, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9189474 + objectReference: {fileID: 0} + - target: {fileID: -537658470732713232, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} + propertyPath: m_LocalRotation.x + value: 0.39137304 + objectReference: {fileID: 0} + - target: {fileID: -537658470732713232, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} + propertyPath: m_LocalRotation.y + value: -0.034849536 + objectReference: {fileID: 0} + - target: {fileID: -537658470732713232, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} + propertyPath: m_LocalRotation.z + value: -0.03388795 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} propertyPath: m_Name value: RightController objectReference: {fileID: 0} - - target: {fileID: 5083040237849557129, guid: 6776c902296b26441b87a0a88dc19696, type: 3} - propertyPath: 'm_Materials.Array.data[0]' - value: - objectReference: {fileID: 2100000, guid: b9a1629f76681a042b010d162c2fdc2b, type: 2} - - target: {fileID: 9208272126419478429, guid: 6776c902296b26441b87a0a88dc19696, type: 3} + - target: {fileID: 3112121240831153201, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} + propertyPath: m_LocalRotation.y + value: -0.059101086 + objectReference: {fileID: 0} + - target: {fileID: 3112121240831153201, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} + propertyPath: m_LocalRotation.z + value: -0.045532595 + objectReference: {fileID: 0} + - target: {fileID: 4666676305529430110, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} propertyPath: m_CastShadows value: 0 objectReference: {fileID: 0} - - target: {fileID: 9208272126419478429, guid: 6776c902296b26441b87a0a88dc19696, type: 3} + - target: {fileID: 4666676305529430110, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} + propertyPath: m_ReceiveShadows + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4666676305529430110, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} propertyPath: m_LightProbeUsage value: 0 objectReference: {fileID: 0} - - target: {fileID: 9208272126419478429, guid: 6776c902296b26441b87a0a88dc19696, type: 3} + - target: {fileID: 4666676305529430110, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} + propertyPath: m_ReflectionProbeUsage + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4666676305529430110, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} propertyPath: 'm_Materials.Array.data[0]' value: - objectReference: {fileID: 2100000, guid: bdd1862cd6f2b16499c1452732012561, type: 2} + objectReference: {fileID: 2100000, guid: e9dec9f7244289641959144af35e0abc, type: 2} + - target: {fileID: 5286140622660225535, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} + propertyPath: m_LocalRotation.x + value: 0.0006407937 + objectReference: {fileID: 0} + - target: {fileID: 5286140622660225535, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} + propertyPath: m_LocalRotation.y + value: 0.012737585 + objectReference: {fileID: 0} + - target: {fileID: 5286140622660225535, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} + propertyPath: m_LocalRotation.z + value: 0.01241482 + objectReference: {fileID: 0} + - target: {fileID: 5286140622660225535, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -20.047 + objectReference: {fileID: 0} + - target: {fileID: 5286140622660225535, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0.94 + objectReference: {fileID: 0} + - target: {fileID: 5286140622660225535, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 1.515 + objectReference: {fileID: 0} + - target: {fileID: 9203173333654325547, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} + propertyPath: 'm_Materials.Array.data[0]' + value: + objectReference: {fileID: 2100000, guid: 17a17c6fa1dd3d6428a3fcfbf016c46b, type: 2} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] m_AddedComponents: - - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 6776c902296b26441b87a0a88dc19696, type: 3} + - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} insertIndex: -1 - addedObject: {fileID: -6543063263856533454} - - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 6776c902296b26441b87a0a88dc19696, type: 3} + addedObject: {fileID: 7885517500407780082} + - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} insertIndex: -1 - addedObject: {fileID: 8259703150381748233} - m_SourcePrefab: {fileID: 100100000, guid: 6776c902296b26441b87a0a88dc19696, type: 3} ---- !u!4 &447389116888004299 stripped + addedObject: {fileID: 5275774093606804905} + m_SourcePrefab: {fileID: 100100000, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} +--- !u!4 &1561221147330038652 stripped Transform: - m_CorrespondingSourceObject: {fileID: -1972512806318392970, guid: 6776c902296b26441b87a0a88dc19696, type: 3} - m_PrefabInstance: {fileID: 7103663176713473981} + m_CorrespondingSourceObject: {fileID: 3112121240831153201, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} + m_PrefabInstance: {fileID: 4511177028789018445} m_PrefabAsset: {fileID: 0} ---- !u!4 &858690377499744557 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 7602047982978766480, guid: 6776c902296b26441b87a0a88dc19696, type: 3} - m_PrefabInstance: {fileID: 7103663176713473981} - m_PrefabAsset: {fileID: 0} ---- !u!4 &4833032538134728416 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 2415945325235355997, guid: 6776c902296b26441b87a0a88dc19696, type: 3} - m_PrefabInstance: {fileID: 7103663176713473981} - m_PrefabAsset: {fileID: 0} ---- !u!4 &6831642413329840564 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 4349235418747893257, guid: 6776c902296b26441b87a0a88dc19696, type: 3} - m_PrefabInstance: {fileID: 7103663176713473981} - m_PrefabAsset: {fileID: 0} ---- !u!1 &7950016438109647596 stripped +--- !u!1 &3628637182804238876 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 6776c902296b26441b87a0a88dc19696, type: 3} - m_PrefabInstance: {fileID: 7103663176713473981} + m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} + m_PrefabInstance: {fileID: 4511177028789018445} m_PrefabAsset: {fileID: 0} ---- !u!114 &-6543063263856533454 +--- !u!114 &7885517500407780082 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7950016438109647596} + m_GameObject: {fileID: 3628637182804238876} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 49ad92e74cacea040be7c224f4f331c3, type: 3} + m_Script: {fileID: 11500000, guid: f77db2ed0ea4e19428c3b518ecbb741c, type: 3} m_Name: m_EditorClassIdentifier: - _thumbStick: {fileID: 858690377499744557} - _upperButton: {fileID: 8563786927995694241} - _lowerButton: {fileID: 7963703494288566308} - _systemButton: {fileID: 6831642413329840564} - _trigger: {fileID: 447389116888004299} - _grip: {fileID: 4833032538134728416} - _maxThumbStickRot: {x: 10, y: 10} - _pressedThumbStickOffset: 0.002 - _pressedUpperBtnOffset: 0.002 - _pressedLowerBtnOffset: 0.002 - _pressedSystemBtnOffset: 0.001 - _maxTriggerRot: 17 - _maxGripRot: -10 - _thumbStickInput: - m_Name: Thumb Stick Input + _thumbstick: + _targetObject: {fileID: 6904916146455752448} + _releasedPosition: {x: -0.017354209, y: -0.015634442, z: -0.020226292} + _pressedPosition: {x: -0.0173, y: -0.0162, z: -0.0197} + _releasedRotation: {x: 45, y: 183, z: 180} + _pressedRotation: {x: 45, y: 183, z: 180} + _upperButton: + _targetObject: {fileID: 1561221147330038652} + _releasedPosition: {x: 0.002411185, y: -0.008994053, z: -0.026610777} + _pressedPosition: {x: 0.00213, y: -0.01033, z: -0.02518} + _releasedRotation: {x: 42.475372, y: 348.81885, z: 350.02014} + _pressedRotation: {x: 42.475372, y: 348.81885, z: 350.02014} + _lowerButton: + _targetObject: {fileID: 5049434458485173693} + _releasedPosition: {x: -0.0028574052, y: 0.0013485994, z: -0.017284963} + _pressedPosition: {x: -0.00301, y: 0.00013, z: -0.01611} + _releasedRotation: {x: 45.80245, y: 352.53473, z: 352.6188} + _pressedRotation: {x: 45.80245, y: 352.53473, z: 352.6188} + _systemButton: + _targetObject: {fileID: 8386752748177059991} + _releasedPosition: {x: -0.01793063, y: 0.0046662926, z: -0.012458517} + _pressedPosition: {x: -0.01795, y: 0.00401, z: -0.01191} + _releasedRotation: {x: 50.08134, y: 358.1592, z: 356.46573} + _pressedRotation: {x: 50.08134, y: 358.1592, z: 356.46573} + _triggerButton: + _targetObject: {fileID: 8630813852918077106} + _releasedPosition: {x: -0.0046144696, y: -0.03882868, z: -0.02679424} + _pressedPosition: {x: -0.0046144696, y: -0.03882868, z: -0.02679424} + _releasedRotation: {x: 0.05529701, y: 1.4604588, z: 1.4234905} + _pressedRotation: {x: 339.95322, y: 0.939546, z: 1.5153179} + _gripButton: + _targetObject: {fileID: 4525584704228808593} + _releasedPosition: {x: -0.013130592, y: -0.027343752, z: 0.023010304} + _pressedPosition: {x: -0.013130592, y: -0.027343752, z: 0.023010304} + _releasedRotation: {x: 0, y: 0, z: 0} + _pressedRotation: {x: 8.51035e-22, y: 5.9195586e-23, z: 7.9578476} + _thumbstickPressAction: + m_Name: Thumbstick Press m_Type: 0 - m_ExpectedControlType: Vector2 - m_Id: 8c7e2def-b6ba-4664-8f6a-66af72fdb1c0 - m_Processors: - m_Interactions: - m_SingletonActionBindings: - - m_Name: - m_Id: 3a9d57d1-cf09-4679-ba7b-a0ab8a8777e7 - m_Path: {RightHand}/thumbstick - m_Interactions: - m_Processors: - m_Groups: - m_Action: Thumb Stick Input - m_Flags: 0 - m_Flags: 0 - _thumbStickPressedInput: - m_Name: Thumb Stick Pressed Input - m_Type: 1 - m_ExpectedControlType: Button - m_Id: 99b58c0a-2f29-4009-9194-31c2dceb7aa4 + m_ExpectedControlType: + m_Id: f7111406-3e29-44cb-8a4a-eac358d96fed m_Processors: m_Interactions: m_SingletonActionBindings: - m_Name: - m_Id: 3e571457-2758-47aa-9466-67c6ac94dd46 + m_Id: 73a7f310-7541-49a6-bd1d-9256995fbda0 m_Path: {RightHand}/thumbstickClicked m_Interactions: m_Processors: m_Groups: - m_Action: Thumb Stick Pressed Input + m_Action: Thumbstick Press m_Flags: 0 m_Flags: 0 - _upperButtonPressedInput: + _upperButtonPressAction: m_Name: Upper Button Pressed Input - m_Type: 1 - m_ExpectedControlType: Button - m_Id: f49c71ff-10f3-4cac-b31d-30934359bc33 + m_Type: 0 + m_ExpectedControlType: + m_Id: ce4fa43e-bc56-4689-b246-c456fe1d2e1f m_Processors: m_Interactions: m_SingletonActionBindings: - m_Name: - m_Id: 4f302464-f8d4-4e01-8f27-1f3998825ca9 + m_Id: bfc58e8c-880c-417c-91f8-5de2d3f2bb19 m_Path: {RightHand}/secondaryButton m_Interactions: m_Processors: @@ -204,16 +283,16 @@ MonoBehaviour: m_Action: Upper Button Pressed Input m_Flags: 0 m_Flags: 0 - _lowerButtonPressedInput: + _lowerButtonPressAction: m_Name: Lower Button Pressed Input - m_Type: 1 - m_ExpectedControlType: Button - m_Id: 0d589104-79d9-4292-9906-6ec3ffb3fbc3 + m_Type: 0 + m_ExpectedControlType: + m_Id: 0dfeabd4-cf7a-48e9-b88c-74b7945418e9 m_Processors: m_Interactions: m_SingletonActionBindings: - m_Name: - m_Id: f8bf1b01-29db-46c0-b2f7-812d5335510a + m_Id: 90397d65-522b-4f26-a422-76645fc6ce90 m_Path: {RightHand}/primaryButton m_Interactions: m_Processors: @@ -221,16 +300,16 @@ MonoBehaviour: m_Action: Lower Button Pressed Input m_Flags: 0 m_Flags: 0 - _systemButtonPressedInput: + _systemButtonPressAction: m_Name: System Button Pressed Input - m_Type: 1 - m_ExpectedControlType: Button - m_Id: 204582f4-3b37-4564-bc46-47d78719a08b + m_Type: 0 + m_ExpectedControlType: + m_Id: 71ac668f-930b-4bdb-ba69-88e80df7d2b8 m_Processors: m_Interactions: m_SingletonActionBindings: - m_Name: - m_Id: 7f1b74e6-09ce-4f89-bd15-256046c7cdfa + m_Id: 67b427e6-fae1-4e1e-8887-f429b0c8fa59 m_Path: {RightHand}/menu m_Interactions: m_Processors: @@ -238,16 +317,16 @@ MonoBehaviour: m_Action: System Button Pressed Input m_Flags: 0 m_Flags: 0 - _triggerInput: + _triggerAxisAction: m_Name: Trigger Input m_Type: 0 m_ExpectedControlType: - m_Id: 61f541b4-96cf-4366-908a-ed3e700cb741 + m_Id: 0d4e1e63-38f5-46d0-9ebb-e3113a606070 m_Processors: m_Interactions: m_SingletonActionBindings: - m_Name: - m_Id: f3628654-d886-46a8-890c-0e0704e59331 + m_Id: 81252442-8433-4312-be73-3a371aaa45fc m_Path: {RightHand}/trigger m_Interactions: m_Processors: @@ -255,16 +334,16 @@ MonoBehaviour: m_Action: Trigger Input m_Flags: 0 m_Flags: 0 - _gripInput: + _gripAxisAction: m_Name: Grip Input m_Type: 0 m_ExpectedControlType: - m_Id: c5c87782-108d-421e-b8c3-b200bb931da2 + m_Id: ae5026d5-4b39-4822-8dd4-4cfd84f3ef49 m_Processors: m_Interactions: m_SingletonActionBindings: - m_Name: - m_Id: 76b0f182-2468-4a72-a816-9cc007cd343c + m_Id: 27420bfb-997c-4dff-9e3d-d1c39819fe36 m_Path: {RightHand}/grip m_Interactions: m_Processors: @@ -272,17 +351,34 @@ MonoBehaviour: m_Action: Grip Input m_Flags: 0 m_Flags: 0 - _inverseThumbStickX: 1 - _inverseThumbStickY: 1 - _gripRotationPivot: {x: 0, y: 0, z: 1} - _triggerRotationPivot: {x: 1, y: 0, z: 0} ---- !u!114 &8259703150381748233 + _thumbstickTransform: {fileID: 6904916146455752448} + _maxThumbstickRot: {x: 10, y: 10} + _inverseThumbstickX: 1 + _inverseThumbstickY: 0 + _thumbstickAxisAction: + m_Name: Thumb Stick Input + m_Type: 0 + m_ExpectedControlType: + m_Id: 24c35428-5db2-4a20-91e1-1dd099b0ebbc + m_Processors: + m_Interactions: + m_SingletonActionBindings: + - m_Name: + m_Id: def71536-6721-412d-b322-736e99ff08e8 + m_Path: {RightHand}/thumbstick + m_Interactions: + m_Processors: + m_Groups: + m_Action: Thumb Stick Input + m_Flags: 0 + m_Flags: 0 +--- !u!114 &5275774093606804905 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7950016438109647596} + m_GameObject: {fileID: 3628637182804238876} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: c2fadf230d1919748a9aa21d40f74619, type: 3} @@ -369,13 +465,28 @@ MonoBehaviour: m_Interactions: m_SingletonActionBindings: [] m_Flags: 0 ---- !u!4 &7963703494288566308 stripped +--- !u!4 &4525584704228808593 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -9199463342675015460, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} + m_PrefabInstance: {fileID: 4511177028789018445} + m_PrefabAsset: {fileID: 0} +--- !u!4 &5049434458485173693 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -537658470732713232, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} + m_PrefabInstance: {fileID: 4511177028789018445} + m_PrefabAsset: {fileID: 0} +--- !u!4 &6904916146455752448 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -2212996682566225843, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} + m_PrefabInstance: {fileID: 4511177028789018445} + m_PrefabAsset: {fileID: 0} +--- !u!4 &8386752748177059991 stripped Transform: - m_CorrespondingSourceObject: {fileID: 869628106617186201, guid: 6776c902296b26441b87a0a88dc19696, type: 3} - m_PrefabInstance: {fileID: 7103663176713473981} + m_CorrespondingSourceObject: {fileID: -3820934110361096230, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} + m_PrefabInstance: {fileID: 4511177028789018445} m_PrefabAsset: {fileID: 0} ---- !u!4 &8563786927995694241 stripped +--- !u!4 &8630813852918077106 stripped Transform: - m_CorrespondingSourceObject: {fileID: -7760292788115692772, guid: 6776c902296b26441b87a0a88dc19696, type: 3} - m_PrefabInstance: {fileID: 7103663176713473981} + m_CorrespondingSourceObject: {fileID: 5286140622660225535, guid: 816cf601952d83643a2c9ca175fe03ce, type: 3} + m_PrefabInstance: {fileID: 4511177028789018445} m_PrefabAsset: {fileID: 0} diff --git a/Samples~/XRController/Prefab/RightController.prefab.meta b/Samples~/XRController/Prefab/RightController.prefab.meta index e0cd5ed..0f9a074 100644 --- a/Samples~/XRController/Prefab/RightController.prefab.meta +++ b/Samples~/XRController/Prefab/RightController.prefab.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 85bf3796aed1db840ad839bab28c9abc +guid: 19a9bcbf3a34722409a02f8f5fbd2f6f PrefabImporter: externalObjects: {} userData: diff --git a/Samples~/XRController/Script/XRControllerDisplay.cs b/Samples~/XRController/Script/XRControllerDisplay.cs index 1b54910..a975202 100644 --- a/Samples~/XRController/Script/XRControllerDisplay.cs +++ b/Samples~/XRController/Script/XRControllerDisplay.cs @@ -1,4 +1,4 @@ -// +// // // Copyright 2025 Google LLC // @@ -19,6 +19,8 @@ namespace Google.XR.Extensions.Samples.XRController { + using System; + using System.Collections.Generic; using UnityEngine; using UnityEngine.InputSystem; @@ -27,196 +29,235 @@ namespace Google.XR.Extensions.Samples.XRController /// public class XRControllerDisplay : MonoBehaviour { -#pragma warning disable CS0649 // Serialized fields don't need assignment - [Header("Cached")] - [SerializeField] private Transform _thumbStick; - [SerializeField] private Transform _upperButton; - [SerializeField] private Transform _lowerButton; - [SerializeField] private Transform _systemButton; - [SerializeField] private Transform _trigger; - [SerializeField] private Transform _grip; - - [Header("Parameter")] - [SerializeField] private Vector2 _maxThumbStickRot; - [SerializeField] private float _pressedThumbStickOffset; - [SerializeField] private float _pressedUpperBtnOffset; - [SerializeField] private float _pressedLowerBtnOffset; - [SerializeField] private float _pressedSystemBtnOffset; - [SerializeField] private float _maxTriggerRot; - [SerializeField] private float _maxGripRot; - - [Header("Input")] - [SerializeField] private InputAction _thumbStickInput; - [SerializeField] private InputAction _thumbStickPressedInput; - [SerializeField] private InputAction _upperButtonPressedInput; - [SerializeField] private InputAction _lowerButtonPressedInput; - [SerializeField] private InputAction _systemButtonPressedInput; - [SerializeField] private InputAction _triggerInput; - [SerializeField] private InputAction _gripInput; - [SerializeField] private bool _inverseThumbStickX; - [SerializeField] private bool _inverseThumbStickY; - [SerializeField] private Vector3 _gripRotationPivot; - [SerializeField] private Vector3 _triggerRotationPivot; + private readonly List<(InputAction action, + Action onStarted, + Action onPerformed, + Action onCanceled)> _bindings = new(); + +#pragma warning disable CS0649 // Serialized fields don't need assignment. + [Header("Buttons")] + [SerializeField] private XrControllerButtonInfo _thumbstick; + [SerializeField] private XrControllerButtonInfo _upperButton; + [SerializeField] private XrControllerButtonInfo _lowerButton; + [SerializeField] private XrControllerButtonInfo _systemButton; + [SerializeField] private XrControllerButtonInfo _triggerButton; + [SerializeField] private XrControllerButtonInfo _gripButton; + + [Header("Input Actions")] + [SerializeField] private InputAction _thumbstickPressAction; + [SerializeField] private InputAction _upperButtonPressAction; + [SerializeField] private InputAction _lowerButtonPressAction; + [SerializeField] private InputAction _systemButtonPressAction; + [SerializeField] private InputAction _triggerAxisAction; + [SerializeField] private InputAction _gripAxisAction; + + [Header("Thumbstick")] + [SerializeField] private Transform _thumbstickTransform; + [SerializeField] private Vector2 _maxThumbstickRot; + [SerializeField] private bool _inverseThumbstickX; + [SerializeField] private bool _inverseThumbstickY; + [SerializeField] private InputAction _thumbstickAxisAction; #pragma warning restore CS0649 - private Quaternion _initThumbStickRot; - private Vector3 _initThumbStickPos; - private Vector3 _initUpperButtonPos; - private Vector3 _initLowerButtonPos; - private Vector3 _initSystemButtonPos; - private Quaternion _initTriggerRot; - private Quaternion _initGripRot; + private Quaternion _thumbstickInitialRotation; private void OnEnable() { - _thumbStickInput.Enable(); - _thumbStickPressedInput.Enable(); - _upperButtonPressedInput.Enable(); - _lowerButtonPressedInput.Enable(); - _systemButtonPressedInput.Enable(); - _triggerInput.Enable(); - _gripInput.Enable(); - - _thumbStickInput.performed += ThumbStickInputPerformed; - _thumbStickInput.canceled += ThumbStickInputCanceled; - _thumbStickPressedInput.started += ThumbStickPressedInputStarted; - _thumbStickPressedInput.canceled += ThumbStickPressedInputCanceled; - _upperButtonPressedInput.started += UpperButtonPressedInputStarted; - _upperButtonPressedInput.canceled += UpperButtonPressedInputCanceled; - _lowerButtonPressedInput.started += LowerButtonPressedInputStarted; - _lowerButtonPressedInput.canceled += LowerButtonPressedInputCanceled; - _systemButtonPressedInput.started += SystemButtonPressedInputStarted; - _systemButtonPressedInput.canceled += SystemButtonPressedInputCanceled; - _triggerInput.performed += TriggerInputPerformed; - _triggerInput.canceled += TriggerInputCanceled; - _gripInput.performed += GripInputPerformed; - _gripInput.canceled += GripInputCanceled; + if (_thumbstickTransform != null) + { + _thumbstickInitialRotation = _thumbstickTransform.localRotation; + } + + EnableActions( + _thumbstickPressAction, + _upperButtonPressAction, + _lowerButtonPressAction, + _systemButtonPressAction, + _triggerAxisAction, + _gripAxisAction, + _thumbstickAxisAction); + + BindPress(_thumbstickPressAction, _thumbstick); + BindPress(_upperButtonPressAction, _upperButton); + BindPress(_lowerButtonPressAction, _lowerButton); + BindPress(_systemButtonPressAction, _systemButton); + + BindAxis(_triggerAxisAction, _triggerButton); + BindAxis(_gripAxisAction, _gripButton); + + BindThumbstickVector2(_thumbstickAxisAction, _thumbstickTransform); } private void OnDisable() { - _thumbStickInput.Disable(); - _thumbStickPressedInput.Disable(); - _upperButtonPressedInput.Disable(); - _lowerButtonPressedInput.Disable(); - _triggerInput.Disable(); - _gripInput.Disable(); - - _thumbStickInput.performed -= ThumbStickInputPerformed; - _thumbStickInput.canceled -= ThumbStickInputCanceled; - _thumbStickPressedInput.started -= ThumbStickPressedInputStarted; - _thumbStickPressedInput.canceled -= ThumbStickPressedInputCanceled; - _upperButtonPressedInput.started -= UpperButtonPressedInputStarted; - _upperButtonPressedInput.started -= UpperButtonPressedInputCanceled; - _lowerButtonPressedInput.started -= LowerButtonPressedInputStarted; - _lowerButtonPressedInput.started -= LowerButtonPressedInputCanceled; - _systemButtonPressedInput.started -= SystemButtonPressedInputStarted; - _systemButtonPressedInput.started -= SystemButtonPressedInputCanceled; - _triggerInput.performed -= TriggerInputPerformed; - _triggerInput.canceled -= TriggerInputCanceled; - _gripInput.performed -= GripInputPerformed; - _gripInput.canceled -= GripInputCanceled; - } + foreach (var (action, onStarted, onPerformed, onCanceled) in _bindings) + { + if (action == null) + { + continue; + } - private void Start() - { - _initThumbStickRot = _thumbStick.localRotation; - _initThumbStickPos = _thumbStick.localPosition; - _initUpperButtonPos = _upperButton.localPosition; - _initLowerButtonPos = _lowerButton.localPosition; - _initSystemButtonPos = _systemButton.localPosition; - _initTriggerRot = _trigger.localRotation; - _initGripRot = _grip.localRotation; - } + if (onStarted != null) + { + action.started -= onStarted; + } - private void ThumbStickInputPerformed(InputAction.CallbackContext obj) - { - Vector2 value = obj.ReadValue(); - float axisX = Mathf.Lerp(0f, _maxThumbStickRot.x, Mathf.Abs(value.y)) - * -Mathf.Sign(value.y) * (_inverseThumbStickX ? -1f : 1f); - float axisY = Mathf.Lerp(0f, _maxThumbStickRot.y, Mathf.Abs(value.x)) - * -Mathf.Sign(value.x) * (_inverseThumbStickY ? -1f : 1f); - _thumbStick.localRotation = Quaternion.Euler( - _initThumbStickRot.eulerAngles + new Vector3(axisX, axisY, 0f)); - } + if (onPerformed != null) + { + action.performed -= onPerformed; + } - private void ThumbStickInputCanceled(InputAction.CallbackContext obj) - { - _thumbStick.localRotation = _initThumbStickRot; - } + if (onCanceled != null) + { + action.canceled -= onCanceled; + } + } - private void ThumbStickPressedInputStarted(InputAction.CallbackContext obj) - { - Vector3 targetPos = transform.TransformPoint(_initThumbStickPos) - - (_thumbStick.up * _pressedThumbStickOffset); - _thumbStick.position = targetPos; - } + _bindings.Clear(); - private void ThumbStickPressedInputCanceled(InputAction.CallbackContext obj) - { - _thumbStick.position = transform.TransformPoint(_initThumbStickPos); - } + DisableActions( + _thumbstickPressAction, + _upperButtonPressAction, + _lowerButtonPressAction, + _systemButtonPressAction, + _triggerAxisAction, + _gripAxisAction, + _thumbstickAxisAction); - private void UpperButtonPressedInputStarted(InputAction.CallbackContext obj) - { - Vector3 targetPos = transform.TransformPoint(_initUpperButtonPos) - - (_upperButton.up * _pressedUpperBtnOffset); - _upperButton.position = targetPos; + ResetAll(); } - private void UpperButtonPressedInputCanceled(InputAction.CallbackContext obj) + private void BindPress(InputAction action, XrControllerButtonInfo target) { - _upperButton.position = transform.TransformPoint(_initUpperButtonPos); - } + if (action == null || target == null) + { + return; + } - private void LowerButtonPressedInputStarted(InputAction.CallbackContext obj) - { - Vector3 targetPos = transform.TransformPoint(_initLowerButtonPos) - - (_lowerButton.up * _pressedLowerBtnOffset); - _lowerButton.position = targetPos; - } + Action started = _ => target.SetStatus(1f); + Action canceled = _ => target.SetStatus(0f); - private void LowerButtonPressedInputCanceled(InputAction.CallbackContext obj) - { - _lowerButton.position = transform.TransformPoint(_initLowerButtonPos); + action.started += started; + action.canceled += canceled; + + _bindings.Add((action, started, null, canceled)); } - private void SystemButtonPressedInputStarted(InputAction.CallbackContext obj) + private void BindAxis(InputAction action, XrControllerButtonInfo target) { - Vector3 targetPos = transform.TransformPoint(_initSystemButtonPos) - - (_systemButton.up * _pressedSystemBtnOffset); - _systemButton.position = targetPos; + if (action == null || target == null) + { + return; + } + + Action performed = ctx => + target.SetStatus(ctx.ReadValue()); + Action canceled = _ => target.SetStatus(0f); + + action.performed += performed; + action.canceled += canceled; + + _bindings.Add((action, null, performed, canceled)); } - private void SystemButtonPressedInputCanceled(InputAction.CallbackContext obj) + private void BindThumbstickVector2(InputAction action, Transform stickTransform) { - _systemButton.position = transform.TransformPoint(_initSystemButtonPos); + if (action == null || stickTransform == null) + { + return; + } + + var initial = _thumbstickInitialRotation; + + Action performed = ctx => + { + var value = ctx.ReadValue(); + float axisX = Mathf.Lerp(0f, _maxThumbstickRot.x, Mathf.Abs(value.y)) + * -Mathf.Sign(value.y) + * (_inverseThumbstickX ? -1f : 1f); + float axisY = Mathf.Lerp(0f, _maxThumbstickRot.y, Mathf.Abs(value.x)) + * -Mathf.Sign(value.x) + * (_inverseThumbstickY ? -1f : 1f); + + stickTransform.localRotation = Quaternion.Euler( + initial.eulerAngles + new Vector3(axisX, 0f, axisY)); + }; + + Action canceled = _ => + { + stickTransform.localRotation = initial; + }; + + action.performed += performed; + action.canceled += canceled; + + _bindings.Add((action, null, performed, canceled)); } - private void TriggerInputPerformed(InputAction.CallbackContext obj) + private void EnableActions(params InputAction[] actions) { - float value = obj.ReadValue(); - float rot = Mathf.Lerp(0f, _maxTriggerRot, Mathf.Abs(value)); - _trigger.localRotation = Quaternion.Euler(_initTriggerRot.eulerAngles + - _triggerRotationPivot * rot); + foreach (var a in actions) + { + a?.Enable(); + } } - private void TriggerInputCanceled(InputAction.CallbackContext obj) + private void DisableActions(params InputAction[] actions) { - _trigger.localRotation = _initTriggerRot; + foreach (var a in actions) + { + a?.Disable(); + } } - private void GripInputPerformed(InputAction.CallbackContext obj) + private void ResetAll() { - float value = obj.ReadValue(); - float rot = Mathf.Lerp(0f, _maxGripRot, Mathf.Abs(value)); - _grip.localRotation = Quaternion.Euler(_initGripRot.eulerAngles + - _gripRotationPivot * rot); + _thumbstick?.SetStatus(0f); + _upperButton?.SetStatus(0f); + _lowerButton?.SetStatus(0f); + _systemButton?.SetStatus(0f); + _triggerButton?.SetStatus(0f); + _gripButton?.SetStatus(0f); + + if (_thumbstickTransform != null) + { + _thumbstickTransform.localRotation = _thumbstickInitialRotation; + } } + } + + /// + /// Holds released/pressed poses for a controller button and applies + /// the interpolated transform to a target object. + /// + [Serializable] + public class XrControllerButtonInfo + { +#pragma warning disable CS0649 // Serialized fields don't need assignment. + [SerializeField] private Transform _targetObject; + [SerializeField] private Vector3 _releasedPosition; + [SerializeField] private Vector3 _pressedPosition; + [SerializeField] private Vector3 _releasedRotation; + [SerializeField] private Vector3 _pressedRotation; +#pragma warning restore CS0649 - private void GripInputCanceled(InputAction.CallbackContext obj) + /// + /// Applies the pressed/released interpolation to the target object's local transform. + /// + public void SetStatus(float t) { - _grip.localRotation = _initGripRot; + if (_targetObject == null) + { + return; + } + + t = Mathf.Clamp01(t); + + _targetObject.localPosition = Vector3.Lerp(_releasedPosition, _pressedPosition, t); + _targetObject.localRotation = Quaternion.Lerp( + Quaternion.Euler(_releasedRotation), + Quaternion.Euler(_pressedRotation), + t); } } -} +} \ No newline at end of file diff --git a/Samples~/XRController/Script/XRControllerDisplay.cs.meta b/Samples~/XRController/Script/XRControllerDisplay.cs.meta index 7a862aa..9b969db 100644 --- a/Samples~/XRController/Script/XRControllerDisplay.cs.meta +++ b/Samples~/XRController/Script/XRControllerDisplay.cs.meta @@ -1,11 +1,2 @@ fileFormatVersion: 2 -guid: 49ad92e74cacea040be7c224f4f331c3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +guid: f77db2ed0ea4e19428c3b518ecbb741c \ No newline at end of file diff --git a/Samples~/XRController/Material/ControllerButton.mat.meta b/Samples~/XRController/Shader.meta similarity index 52% rename from Samples~/XRController/Material/ControllerButton.mat.meta rename to Samples~/XRController/Shader.meta index 3c71f9b..3a68267 100644 --- a/Samples~/XRController/Material/ControllerButton.mat.meta +++ b/Samples~/XRController/Shader.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 35f2f0f62b2b97c07ae2ba643569349c -NativeFormatImporter: +guid: b5ca06a3a53322c49a6355d14bb4a2b9 +folderAsset: yes +DefaultImporter: externalObjects: {} - mainObjectFileID: 2100000 userData: assetBundleName: assetBundleVariant: diff --git a/Samples~/XRController/Shader/ControllerLed_Builtin.shader b/Samples~/XRController/Shader/ControllerLed_Builtin.shader new file mode 100644 index 0000000..9156d05 --- /dev/null +++ b/Samples~/XRController/Shader/ControllerLed_Builtin.shader @@ -0,0 +1,61 @@ +Shader "ControllerLed_Builtin" +{ + Properties + { + _Mask ("Mask", 2D) = "white" {} + _LedColor ("LED Color", Color) = (0, 0, 0, 1) + _LedIntensity ("LED Intensity", Range(0, 2)) = 0 + } + SubShader + { + Tags + { + "Queue" = "Transparent" "RenderType"="Transparent" "IgnoreProjector" = "True" + } + Blend SrcAlpha OneMinusSrcAlpha + LOD 100 + + Pass + { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + float2 uv : TEXCOORD0; + }; + + struct v2f + { + float2 uv : TEXCOORD0; + float4 vertex : SV_POSITION; + }; + + sampler2D _Mask; + fixed3 _Mask_ST; + fixed3 _LedColor; + fixed _LedIntensity; + + v2f vert(appdata v) + { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + o.uv = v.uv; + return o; + } + + fixed4 frag(v2f i) : SV_Target + { + float mask = tex2D(_Mask, i.uv).a; + float3 color = mask * _LedColor * _LedIntensity; + float alpha = mask * min(1, _LedIntensity); + return fixed4(color, alpha); + } + ENDCG + } + } +} diff --git a/Samples~/XRController/Shader/ControllerLed_Builtin.shader.meta b/Samples~/XRController/Shader/ControllerLed_Builtin.shader.meta new file mode 100644 index 0000000..bd4fa09 --- /dev/null +++ b/Samples~/XRController/Shader/ControllerLed_Builtin.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8b45684e8afb3214ca3b6efe9b7026e0 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Samples~/XRController/Shader/Controller_Builtin.shader b/Samples~/XRController/Shader/Controller_Builtin.shader new file mode 100644 index 0000000..3861889 --- /dev/null +++ b/Samples~/XRController/Shader/Controller_Builtin.shader @@ -0,0 +1,46 @@ +Shader "Controller_Gltf_Builtin" +{ + Properties + { + _BaseColor ("Base Color", 2D) = "white" {} + _Normal ("Normal", 2D) = "bump" {} + _AoRoughnessMetallic ("AoRoughnessMetallic", 2D) = "White" {} + } + SubShader + { + Tags + { + "RenderType"="Opaque" + } + LOD 200 + + CGPROGRAM + // Physically based Standard lighting model, and enable shadows on all light types + #pragma surface surf Standard fullforwardshadows + + // Use shader model 3.0 target, to get nicer looking lighting + #pragma target 3.0 + + sampler2D _BaseColor; + sampler2D _Normal; + sampler2D _AoRoughnessMetallic; + + struct Input + { + float2 uv_BaseColor; + }; + + void surf(Input IN, inout SurfaceOutputStandard o) + { + o.Albedo = tex2D(_BaseColor, IN.uv_BaseColor).rgb; + o.Normal = UnpackNormal(tex2D(_Normal, IN.uv_BaseColor)); + + float3 arm = tex2D(_AoRoughnessMetallic, IN.uv_BaseColor); + o.Metallic = arm.b; + o.Smoothness = 1 - arm.g; + o.Occlusion = arm.r; + } + ENDCG + } + FallBack "Diffuse" +} diff --git a/Samples~/XRController/Shader/Controller_Builtin.shader.meta b/Samples~/XRController/Shader/Controller_Builtin.shader.meta new file mode 100644 index 0000000..432d936 --- /dev/null +++ b/Samples~/XRController/Shader/Controller_Builtin.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5763f3f03376b9a48bcac2f5cdaecd27 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Samples~/XRController/Texture.meta b/Samples~/XRController/Texture.meta index 52d08f5..398a3a2 100644 --- a/Samples~/XRController/Texture.meta +++ b/Samples~/XRController/Texture.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 7144b25601655fd4bb9acfccbadd94b8 +guid: e65411fb55427314e9f5f10508a5e706 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Samples~/XRController/Texture/AoRoughnessMetallic.png b/Samples~/XRController/Texture/AoRoughnessMetallic.png new file mode 100644 index 0000000..2c80ec8 Binary files /dev/null and b/Samples~/XRController/Texture/AoRoughnessMetallic.png differ diff --git a/Samples~/XRController/Texture/Controller_Metallic.png.meta b/Samples~/XRController/Texture/AoRoughnessMetallic.png.meta similarity index 83% rename from Samples~/XRController/Texture/Controller_Metallic.png.meta rename to Samples~/XRController/Texture/AoRoughnessMetallic.png.meta index 966a414..f8e695a 100644 --- a/Samples~/XRController/Texture/Controller_Metallic.png.meta +++ b/Samples~/XRController/Texture/AoRoughnessMetallic.png.meta @@ -1,12 +1,12 @@ fileFormatVersion: 2 -guid: 0d4e4e18e326ea34a9555ce353ba4203 +guid: 3bd2ea1964fbaff4bb0838332916a177 TextureImporter: internalIDToNameTable: [] externalObjects: {} - serializedVersion: 12 + serializedVersion: 13 mipmaps: mipMapMode: 0 - enableMipMap: 0 + enableMipMap: 1 sRGBTexture: 0 linearTexture: 0 fadeOut: 0 @@ -51,7 +51,7 @@ TextureImporter: spritePixelsToUnits: 100 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 0 + alphaUsage: 1 alphaIsTransparency: 0 spriteTessellationDetail: -1 textureType: 0 @@ -67,9 +67,9 @@ TextureImporter: swizzle: 50462976 cookieLightType: 0 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform - maxTextureSize: 256 + maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 textureCompression: 1 @@ -80,7 +80,7 @@ TextureImporter: ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 2048 resizeAlgorithm: 0 @@ -93,7 +93,7 @@ TextureImporter: ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 2048 resizeAlgorithm: 0 @@ -106,23 +106,11 @@ TextureImporter: ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: Server - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 sprites: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: @@ -132,6 +120,8 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] + spriteCustomMetadata: + entries: [] nameFileIdTable: {} mipmapLimitGroupName: pSDRemoveMatte: 0 diff --git a/Samples~/XRController/Texture/BaseColor.png b/Samples~/XRController/Texture/BaseColor.png new file mode 100644 index 0000000..3c9d4c3 Binary files /dev/null and b/Samples~/XRController/Texture/BaseColor.png differ diff --git a/Samples~/XRController/Texture/Controller_AO.png.meta b/Samples~/XRController/Texture/BaseColor.png.meta similarity index 84% rename from Samples~/XRController/Texture/Controller_AO.png.meta rename to Samples~/XRController/Texture/BaseColor.png.meta index 2c74d90..168eaef 100644 --- a/Samples~/XRController/Texture/Controller_AO.png.meta +++ b/Samples~/XRController/Texture/BaseColor.png.meta @@ -1,12 +1,12 @@ fileFormatVersion: 2 -guid: 86bcd70ff1fc9d542b1bbf038888893a +guid: bcecee3fd3866b445ad54407bc8ade8c TextureImporter: internalIDToNameTable: [] externalObjects: {} - serializedVersion: 12 + serializedVersion: 13 mipmaps: mipMapMode: 0 - enableMipMap: 0 + enableMipMap: 1 sRGBTexture: 1 linearTexture: 0 fadeOut: 0 @@ -51,7 +51,7 @@ TextureImporter: spritePixelsToUnits: 100 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 0 + alphaUsage: 1 alphaIsTransparency: 0 spriteTessellationDetail: -1 textureType: 0 @@ -67,9 +67,9 @@ TextureImporter: swizzle: 50462976 cookieLightType: 0 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform - maxTextureSize: 32 + maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 textureCompression: 1 @@ -80,7 +80,7 @@ TextureImporter: ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 2048 resizeAlgorithm: 0 @@ -93,7 +93,7 @@ TextureImporter: ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 2048 resizeAlgorithm: 0 @@ -106,23 +106,11 @@ TextureImporter: ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: Server - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 sprites: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: @@ -132,6 +120,8 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] + spriteCustomMetadata: + entries: [] nameFileIdTable: {} mipmapLimitGroupName: pSDRemoveMatte: 0 diff --git a/Samples~/XRController/Texture/Controller_AO.png b/Samples~/XRController/Texture/Controller_AO.png deleted file mode 100644 index adc107a..0000000 Binary files a/Samples~/XRController/Texture/Controller_AO.png and /dev/null differ diff --git a/Samples~/XRController/Texture/Controller_BaseColor.png b/Samples~/XRController/Texture/Controller_BaseColor.png deleted file mode 100644 index 977f466..0000000 Binary files a/Samples~/XRController/Texture/Controller_BaseColor.png and /dev/null differ diff --git a/Samples~/XRController/Texture/Controller_Metallic.png b/Samples~/XRController/Texture/Controller_Metallic.png deleted file mode 100644 index 1beedae..0000000 Binary files a/Samples~/XRController/Texture/Controller_Metallic.png and /dev/null differ diff --git a/Samples~/XRController/Texture/Controller_Normal.png b/Samples~/XRController/Texture/Controller_Normal.png deleted file mode 100644 index f941c6d..0000000 Binary files a/Samples~/XRController/Texture/Controller_Normal.png and /dev/null differ diff --git a/Samples~/XRController/Texture/Controller_Roughness.png b/Samples~/XRController/Texture/Controller_Roughness.png deleted file mode 100644 index 415696c..0000000 Binary files a/Samples~/XRController/Texture/Controller_Roughness.png and /dev/null differ diff --git a/Samples~/XRController/Texture/Normal_OpenGL.png b/Samples~/XRController/Texture/Normal_OpenGL.png new file mode 100644 index 0000000..bf338db Binary files /dev/null and b/Samples~/XRController/Texture/Normal_OpenGL.png differ diff --git a/Samples~/XRController/Texture/Controller_Normal.png.meta b/Samples~/XRController/Texture/Normal_OpenGL.png.meta similarity index 84% rename from Samples~/XRController/Texture/Controller_Normal.png.meta rename to Samples~/XRController/Texture/Normal_OpenGL.png.meta index 6e1492e..df9be7c 100644 --- a/Samples~/XRController/Texture/Controller_Normal.png.meta +++ b/Samples~/XRController/Texture/Normal_OpenGL.png.meta @@ -1,12 +1,12 @@ fileFormatVersion: 2 -guid: d1c4ec6d57a3cc7428cc3f89e4cb9ac2 +guid: 7c167e4459d975341a1967516daecf9a TextureImporter: internalIDToNameTable: [] externalObjects: {} - serializedVersion: 12 + serializedVersion: 13 mipmaps: mipMapMode: 0 - enableMipMap: 0 + enableMipMap: 1 sRGBTexture: 0 linearTexture: 0 fadeOut: 0 @@ -67,21 +67,8 @@ TextureImporter: swizzle: 50462976 cookieLightType: 0 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform - maxTextureSize: 512 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 2 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: Standalone maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 @@ -93,8 +80,8 @@ TextureImporter: ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: Android + - serializedVersion: 4 + buildTarget: Standalone maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 @@ -106,8 +93,8 @@ TextureImporter: ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: Server + - serializedVersion: 4 + buildTarget: Android maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 @@ -123,6 +110,7 @@ TextureImporter: serializedVersion: 2 sprites: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: @@ -132,6 +120,8 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] + spriteCustomMetadata: + entries: [] nameFileIdTable: {} mipmapLimitGroupName: pSDRemoveMatte: 0 diff --git a/Samples~/XRController/Texture/Roughness.png b/Samples~/XRController/Texture/Roughness.png new file mode 100644 index 0000000..0d3a5a6 Binary files /dev/null and b/Samples~/XRController/Texture/Roughness.png differ diff --git a/Samples~/XRController/Texture/Controller_Roughness.png.meta b/Samples~/XRController/Texture/Roughness.png.meta similarity index 84% rename from Samples~/XRController/Texture/Controller_Roughness.png.meta rename to Samples~/XRController/Texture/Roughness.png.meta index 284746b..dd6d2ba 100644 --- a/Samples~/XRController/Texture/Controller_Roughness.png.meta +++ b/Samples~/XRController/Texture/Roughness.png.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 -guid: ae2912a83fccc5f4f94484e407ee8c24 +guid: 1eda9d01c157d5d43a19938da49ee9d5 TextureImporter: internalIDToNameTable: [] externalObjects: {} - serializedVersion: 12 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -51,7 +51,7 @@ TextureImporter: spritePixelsToUnits: 100 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 0 + alphaUsage: 1 alphaIsTransparency: 0 spriteTessellationDetail: -1 textureType: 0 @@ -67,9 +67,9 @@ TextureImporter: swizzle: 50462976 cookieLightType: 0 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform - maxTextureSize: 256 + maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 textureCompression: 1 @@ -80,7 +80,7 @@ TextureImporter: ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 2048 resizeAlgorithm: 0 @@ -93,7 +93,7 @@ TextureImporter: ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 2048 resizeAlgorithm: 0 @@ -106,23 +106,11 @@ TextureImporter: ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: Server - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 sprites: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: @@ -132,6 +120,8 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] + spriteCustomMetadata: + entries: [] nameFileIdTable: {} mipmapLimitGroupName: pSDRemoveMatte: 0 diff --git a/Samples~/XRController/Texture/led_with_alpha.png b/Samples~/XRController/Texture/led_with_alpha.png new file mode 100644 index 0000000..56623a7 Binary files /dev/null and b/Samples~/XRController/Texture/led_with_alpha.png differ diff --git a/Samples~/XRController/Texture/Controller_BaseColor.png.meta b/Samples~/XRController/Texture/led_with_alpha.png.meta similarity index 83% rename from Samples~/XRController/Texture/Controller_BaseColor.png.meta rename to Samples~/XRController/Texture/led_with_alpha.png.meta index 868697f..41c814e 100644 --- a/Samples~/XRController/Texture/Controller_BaseColor.png.meta +++ b/Samples~/XRController/Texture/led_with_alpha.png.meta @@ -1,12 +1,12 @@ fileFormatVersion: 2 -guid: 0bce9db852d150a46abc1386096610a7 +guid: b162726f5358bce4ea3716bdab543629 TextureImporter: internalIDToNameTable: [] externalObjects: {} - serializedVersion: 12 + serializedVersion: 13 mipmaps: mipMapMode: 0 - enableMipMap: 0 + enableMipMap: 1 sRGBTexture: 1 linearTexture: 0 fadeOut: 0 @@ -51,7 +51,7 @@ TextureImporter: spritePixelsToUnits: 100 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 0 + alphaUsage: 1 alphaIsTransparency: 0 spriteTessellationDetail: -1 textureType: 0 @@ -64,24 +64,11 @@ TextureImporter: textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 - swizzle: 50462976 + swizzle: 50529027 cookieLightType: 0 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform - maxTextureSize: 512 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: Standalone maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 @@ -93,8 +80,8 @@ TextureImporter: ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: Android + - serializedVersion: 4 + buildTarget: Standalone maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 @@ -106,8 +93,8 @@ TextureImporter: ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: Server + - serializedVersion: 4 + buildTarget: Android maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 @@ -123,6 +110,7 @@ TextureImporter: serializedVersion: 2 sprites: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: @@ -132,6 +120,8 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] + spriteCustomMetadata: + entries: [] nameFileIdTable: {} mipmapLimitGroupName: pSDRemoveMatte: 0 diff --git a/Samples~/XRController/XRControllerSample.unity b/Samples~/XRController/XRControllerSample.unity index f964772..fa46af6 100644 --- a/Samples~/XRController/XRControllerSample.unity +++ b/Samples~/XRController/XRControllerSample.unity @@ -410,7 +410,7 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} ---- !u!1001 &721646432 +--- !u!1001 &481690943 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 @@ -418,47 +418,47 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 1962637911} m_Modifications: - - target: {fileID: 3934931739962257381, guid: 28d082d6c802a844384715111b194769, type: 3} + - target: {fileID: 3628637182804238876, guid: 19a9bcbf3a34722409a02f8f5fbd2f6f, type: 3} propertyPath: m_Name - value: LeftController + value: RightController objectReference: {fileID: 0} - - target: {fileID: 4454199932067018079, guid: 28d082d6c802a844384715111b194769, type: 3} + - target: {fileID: 4111877608682191014, guid: 19a9bcbf3a34722409a02f8f5fbd2f6f, type: 3} propertyPath: m_LocalPosition.x - value: 0 + value: -0 objectReference: {fileID: 0} - - target: {fileID: 4454199932067018079, guid: 28d082d6c802a844384715111b194769, type: 3} + - target: {fileID: 4111877608682191014, guid: 19a9bcbf3a34722409a02f8f5fbd2f6f, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4454199932067018079, guid: 28d082d6c802a844384715111b194769, type: 3} + - target: {fileID: 4111877608682191014, guid: 19a9bcbf3a34722409a02f8f5fbd2f6f, type: 3} propertyPath: m_LocalPosition.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 4454199932067018079, guid: 28d082d6c802a844384715111b194769, type: 3} + - target: {fileID: 4111877608682191014, guid: 19a9bcbf3a34722409a02f8f5fbd2f6f, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4454199932067018079, guid: 28d082d6c802a844384715111b194769, type: 3} + - target: {fileID: 4111877608682191014, guid: 19a9bcbf3a34722409a02f8f5fbd2f6f, type: 3} propertyPath: m_LocalRotation.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 4454199932067018079, guid: 28d082d6c802a844384715111b194769, type: 3} + - target: {fileID: 4111877608682191014, guid: 19a9bcbf3a34722409a02f8f5fbd2f6f, type: 3} propertyPath: m_LocalRotation.y - value: 0 + value: -0 objectReference: {fileID: 0} - - target: {fileID: 4454199932067018079, guid: 28d082d6c802a844384715111b194769, type: 3} + - target: {fileID: 4111877608682191014, guid: 19a9bcbf3a34722409a02f8f5fbd2f6f, type: 3} propertyPath: m_LocalRotation.z - value: 0 + value: -0 objectReference: {fileID: 0} - - target: {fileID: 4454199932067018079, guid: 28d082d6c802a844384715111b194769, type: 3} + - target: {fileID: 4111877608682191014, guid: 19a9bcbf3a34722409a02f8f5fbd2f6f, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 4454199932067018079, guid: 28d082d6c802a844384715111b194769, type: 3} + - target: {fileID: 4111877608682191014, guid: 19a9bcbf3a34722409a02f8f5fbd2f6f, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4454199932067018079, guid: 28d082d6c802a844384715111b194769, type: 3} + - target: {fileID: 4111877608682191014, guid: 19a9bcbf3a34722409a02f8f5fbd2f6f, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} @@ -466,13 +466,13 @@ PrefabInstance: m_RemovedGameObjects: [] m_AddedGameObjects: [] m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 28d082d6c802a844384715111b194769, type: 3} ---- !u!4 &721646433 stripped + m_SourcePrefab: {fileID: 100100000, guid: 19a9bcbf3a34722409a02f8f5fbd2f6f, type: 3} +--- !u!4 &481690944 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4454199932067018079, guid: 28d082d6c802a844384715111b194769, type: 3} - m_PrefabInstance: {fileID: 721646432} + m_CorrespondingSourceObject: {fileID: 4111877608682191014, guid: 19a9bcbf3a34722409a02f8f5fbd2f6f, type: 3} + m_PrefabInstance: {fileID: 481690943} m_PrefabAsset: {fileID: 0} ---- !u!1001 &1507901172 +--- !u!1001 &1003596368 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 @@ -480,59 +480,59 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 1962637911} m_Modifications: - - target: {fileID: 7286808223074150486, guid: 85bf3796aed1db840ad839bab28c9abc, type: 3} + - target: {fileID: 3605902486027468320, guid: 89b99af74e08b9249b5af14bce889a03, type: 3} + propertyPath: m_Name + value: LeftController + objectReference: {fileID: 0} + - target: {fileID: 4125699234809586842, guid: 89b99af74e08b9249b5af14bce889a03, type: 3} propertyPath: m_LocalPosition.x - value: 0 + value: -0 objectReference: {fileID: 0} - - target: {fileID: 7286808223074150486, guid: 85bf3796aed1db840ad839bab28c9abc, type: 3} + - target: {fileID: 4125699234809586842, guid: 89b99af74e08b9249b5af14bce889a03, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 7286808223074150486, guid: 85bf3796aed1db840ad839bab28c9abc, type: 3} + - target: {fileID: 4125699234809586842, guid: 89b99af74e08b9249b5af14bce889a03, type: 3} propertyPath: m_LocalPosition.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 7286808223074150486, guid: 85bf3796aed1db840ad839bab28c9abc, type: 3} + - target: {fileID: 4125699234809586842, guid: 89b99af74e08b9249b5af14bce889a03, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 7286808223074150486, guid: 85bf3796aed1db840ad839bab28c9abc, type: 3} + - target: {fileID: 4125699234809586842, guid: 89b99af74e08b9249b5af14bce889a03, type: 3} propertyPath: m_LocalRotation.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 7286808223074150486, guid: 85bf3796aed1db840ad839bab28c9abc, type: 3} + - target: {fileID: 4125699234809586842, guid: 89b99af74e08b9249b5af14bce889a03, type: 3} propertyPath: m_LocalRotation.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 7286808223074150486, guid: 85bf3796aed1db840ad839bab28c9abc, type: 3} + - target: {fileID: 4125699234809586842, guid: 89b99af74e08b9249b5af14bce889a03, type: 3} propertyPath: m_LocalRotation.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 7286808223074150486, guid: 85bf3796aed1db840ad839bab28c9abc, type: 3} + - target: {fileID: 4125699234809586842, guid: 89b99af74e08b9249b5af14bce889a03, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 7286808223074150486, guid: 85bf3796aed1db840ad839bab28c9abc, type: 3} + - target: {fileID: 4125699234809586842, guid: 89b99af74e08b9249b5af14bce889a03, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 7286808223074150486, guid: 85bf3796aed1db840ad839bab28c9abc, type: 3} + - target: {fileID: 4125699234809586842, guid: 89b99af74e08b9249b5af14bce889a03, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 7950016438109647596, guid: 85bf3796aed1db840ad839bab28c9abc, type: 3} - propertyPath: m_Name - value: RightController - objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 85bf3796aed1db840ad839bab28c9abc, type: 3} ---- !u!4 &1507901173 stripped + m_SourcePrefab: {fileID: 100100000, guid: 89b99af74e08b9249b5af14bce889a03, type: 3} +--- !u!4 &1003596369 stripped Transform: - m_CorrespondingSourceObject: {fileID: 7286808223074150486, guid: 85bf3796aed1db840ad839bab28c9abc, type: 3} - m_PrefabInstance: {fileID: 1507901172} + m_CorrespondingSourceObject: {fileID: 4125699234809586842, guid: 89b99af74e08b9249b5af14bce889a03, type: 3} + m_PrefabInstance: {fileID: 1003596368} m_PrefabAsset: {fileID: 0} --- !u!1 &1962637910 GameObject: @@ -564,8 +564,8 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 330585546} - - {fileID: 1507901173} - - {fileID: 721646433} + - {fileID: 1003596369} + - {fileID: 481690944} m_Father: {fileID: 2050088264} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &2050088262