Initialer Upload neues Unity-Projekt

This commit is contained in:
Daniel Ocks
2025-07-21 09:11:14 +02:00
commit eeca72985b
14558 changed files with 1508140 additions and 0 deletions

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: a2300d431cc9116478ccc8bb42061072
folderAsset: yes
timeCreated: 1479762244
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,216 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: ControllerButtonHints
m_Shader: {fileID: 4800000, guid: de053fb214897cc439db35fc0361a282, type: 3}
m_ShaderKeywords: S_SPECULAR_NONE S_UNLIT _ALPHABLEND_ON
m_LightmapFlags: 5
m_CustomRenderQueue: 2000
stringTagMap:
OriginalShader: Unlit/Texture
RenderType: Transparent
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
- first:
name: _BumpMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _DetailAlbedoMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _DetailMask
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _DetailNormalMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _EmissionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _MetallicGlossMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _OcclusionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _ParallaxMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _SpecGlossMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: g_tOverrideLightmap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- first:
name: PixelSnap
second: 0
- first:
name: _BumpScale
second: 1
- first:
name: _ColorMask
second: 15
- first:
name: _Cutoff
second: 0.5
- first:
name: _DetailNormalMapScale
second: 1
- first:
name: _DstBlend
second: 10
- first:
name: _Glossiness
second: 0.5
- first:
name: _InvFade
second: 0.5
- first:
name: _Metallic
second: 0
- first:
name: _Mode
second: 2
- first:
name: _OcclusionStrength
second: 1
- first:
name: _OcclusionStrengthDirectDiffuse
second: 1
- first:
name: _OcclusionStrengthDirectSpecular
second: 1
- first:
name: _OcclusionStrengthIndirectDiffuse
second: 1
- first:
name: _OcclusionStrengthIndirectSpecular
second: 1
- first:
name: _Parallax
second: 0.02
- first:
name: _SpecularMode
second: 1
- first:
name: _SrcBlend
second: 5
- first:
name: _Stencil
second: 0
- first:
name: _StencilComp
second: 8
- first:
name: _StencilOp
second: 0
- first:
name: _StencilReadMask
second: 255
- first:
name: _StencilWriteMask
second: 255
- first:
name: _UVSec
second: 0
- first:
name: _ZWrite
second: 0
- first:
name: g_bReceiveShadows
second: 1
- first:
name: g_bUnlit
second: 1
- first:
name: g_bWorldAlignedTexture
second: 0
- first:
name: g_flCubeMapScalar
second: 1
- first:
name: g_flReflectanceBias
second: 0
- first:
name: g_flReflectanceMax
second: 1
- first:
name: g_flReflectanceMin
second: 0
- first:
name: g_flReflectanceScale
second: 1
m_Colors:
- first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 0.1254902}
- first:
name: _EmissionColor
second: {r: 0, g: 0, b: 0, a: 1}
- first:
name: _SceneTint
second: {r: 0.64705884, g: 0.64705884, b: 0.64705884, a: 1}
- first:
name: _SpecColor
second: {r: 0.2, g: 0.2, b: 0.2, a: 1}
- first:
name: _TintColor
second: {r: 0.5, g: 0.5, b: 0.5, a: 0.5}
- first:
name: g_vWorldAlignedNormalTangentU
second: {r: -1, g: 0, b: 0, a: 0}
- first:
name: g_vWorldAlignedNormalTangentV
second: {r: 0, g: 0, b: 1, a: 0}
- first:
name: g_vWorldAlignedTextureNormal
second: {r: 0, g: 1, b: 0, a: 0}
- first:
name: g_vWorldAlignedTexturePosition
second: {r: 0, g: 0, b: 0, a: 0}
- first:
name: g_vWorldAlignedTextureSize
second: {r: 1, g: 1, b: 1, a: 0}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 11b050e661ec0cf48a289a7266451e91
timeCreated: 1452301140
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,202 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: ControllerTextHintAnchor
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: S_SPECULAR_NONE S_UNLIT _EMISSION
m_LightmapFlags: 1
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
- first:
name: _BumpMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _DetailAlbedoMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _DetailMask
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _DetailNormalMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _EmissionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _MetallicGlossMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _OcclusionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _ParallaxMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _SpecGlossMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: g_tOverrideLightmap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- first:
name: _BumpScale
second: 1
- first:
name: _Cutoff
second: 0.5
- first:
name: _DetailNormalMapScale
second: 1
- first:
name: _DstBlend
second: 0
- first:
name: _FogMultiplier
second: 1
- first:
name: _GlossMapScale
second: 1
- first:
name: _Glossiness
second: 0.5
- first:
name: _GlossyReflections
second: 1
- first:
name: _Metallic
second: 0
- first:
name: _Mode
second: 0
- first:
name: _OcclusionStrength
second: 1
- first:
name: _OcclusionStrengthDirectDiffuse
second: 1
- first:
name: _OcclusionStrengthDirectSpecular
second: 1
- first:
name: _OcclusionStrengthIndirectDiffuse
second: 1
- first:
name: _OcclusionStrengthIndirectSpecular
second: 1
- first:
name: _Parallax
second: 0.02
- first:
name: _SmoothnessTextureChannel
second: 0
- first:
name: _SpecularHighlights
second: 1
- first:
name: _SpecularMode
second: 1
- first:
name: _SrcBlend
second: 1
- first:
name: _UVSec
second: 0
- first:
name: _ZWrite
second: 1
- first:
name: g_bReceiveShadows
second: 1
- first:
name: g_bUnlit
second: 1
- first:
name: g_bWorldAlignedTexture
second: 0
- first:
name: g_flCubeMapScalar
second: 1
- first:
name: g_flReflectanceBias
second: 0
- first:
name: g_flReflectanceMax
second: 1
- first:
name: g_flReflectanceMin
second: 0
- first:
name: g_flReflectanceScale
second: 1
m_Colors:
- first:
name: _Color
second: {r: 0.854902, g: 0.854902, b: 0.854902, a: 1}
- first:
name: _EmissionColor
second: {r: 0, g: 0, b: 0, a: 1}
- first:
name: _SceneTint
second: {r: 1, g: 1, b: 1, a: 1}
- first:
name: _SpecColor
second: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
- first:
name: g_vWorldAlignedNormalTangentU
second: {r: -1, g: 0, b: 0, a: 0}
- first:
name: g_vWorldAlignedNormalTangentV
second: {r: 0, g: 0, b: 1, a: 0}
- first:
name: g_vWorldAlignedTextureNormal
second: {r: 0, g: 1, b: 0, a: 0}
- first:
name: g_vWorldAlignedTexturePosition
second: {r: 0, g: 0, b: 0, a: 0}
- first:
name: g_vWorldAlignedTextureSize
second: {r: 1, g: 1, b: 1, a: 0}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7f08f06256ab27b4cb9eb0b41831a69f
timeCreated: 1456565286
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,205 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: ControllerTextHintLine
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: S_SPECULAR_NONE S_UNLIT _EMISSION
m_LightmapFlags: 1
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
- first:
name: _BumpMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _DetailAlbedoMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _DetailMask
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _DetailNormalMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _EmissionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _MetallicGlossMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _OcclusionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _ParallaxMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _SpecGlossMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: g_tOverrideLightmap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- first:
name: PixelSnap
second: 0
- first:
name: _BumpScale
second: 1
- first:
name: _Cutoff
second: 0.5
- first:
name: _DetailNormalMapScale
second: 1
- first:
name: _DstBlend
second: 0
- first:
name: _FogMultiplier
second: 1
- first:
name: _GlossMapScale
second: 1
- first:
name: _Glossiness
second: 0.5
- first:
name: _GlossyReflections
second: 1
- first:
name: _Metallic
second: 0
- first:
name: _Mode
second: 0
- first:
name: _OcclusionStrength
second: 1
- first:
name: _OcclusionStrengthDirectDiffuse
second: 1
- first:
name: _OcclusionStrengthDirectSpecular
second: 1
- first:
name: _OcclusionStrengthIndirectDiffuse
second: 1
- first:
name: _OcclusionStrengthIndirectSpecular
second: 1
- first:
name: _Parallax
second: 0.02
- first:
name: _SmoothnessTextureChannel
second: 0
- first:
name: _SpecularHighlights
second: 1
- first:
name: _SpecularMode
second: 1
- first:
name: _SrcBlend
second: 1
- first:
name: _UVSec
second: 0
- first:
name: _ZWrite
second: 1
- first:
name: g_bReceiveShadows
second: 1
- first:
name: g_bUnlit
second: 1
- first:
name: g_bWorldAlignedTexture
second: 0
- first:
name: g_flCubeMapScalar
second: 1
- first:
name: g_flReflectanceBias
second: 0
- first:
name: g_flReflectanceMax
second: 1
- first:
name: g_flReflectanceMin
second: 0
- first:
name: g_flReflectanceScale
second: 1
m_Colors:
- first:
name: _Color
second: {r: 0.85490197, g: 0.85490197, b: 0.85490197, a: 1}
- first:
name: _EmissionColor
second: {r: 0, g: 0, b: 0, a: 1}
- first:
name: _SceneTint
second: {r: 1, g: 1, b: 1, a: 1}
- first:
name: _SpecColor
second: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
- first:
name: g_vWorldAlignedNormalTangentU
second: {r: -1, g: 0, b: 0, a: 0}
- first:
name: g_vWorldAlignedNormalTangentV
second: {r: 0, g: 0, b: 1, a: 0}
- first:
name: g_vWorldAlignedTextureNormal
second: {r: 0, g: 1, b: 0, a: 0}
- first:
name: g_vWorldAlignedTexturePosition
second: {r: 0, g: 0, b: 0, a: 0}
- first:
name: g_vWorldAlignedTextureSize
second: {r: 1, g: 1, b: 1, a: 0}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: fa05b1dac59aa764184da0aba83b2bf9
timeCreated: 1456610834
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,137 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-6798356609545366105
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: 1
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: URPControllerButtonHints
m_Shader: {fileID: 4800000, guid: 650dd9526735d5b46b79224bc6e94025, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 5
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 1
m_CustomRenderQueue: 3050
stringTagMap:
OriginalShader: Unlit/Texture
RenderType: Transparent
disabledShaderPasses:
- SHADOWCASTER
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- g_tOverrideLightmap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- PixelSnap: 0
- _AlphaClip: 0
- _Blend: 0
- _BumpScale: 1
- _ColorMask: 15
- _Cull: 0
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 10
- _Glossiness: 0.5
- _InvFade: 0.5
- _Metallic: 0
- _Mode: 2
- _OcclusionStrength: 1
- _OcclusionStrengthDirectDiffuse: 1
- _OcclusionStrengthDirectSpecular: 1
- _OcclusionStrengthIndirectDiffuse: 1
- _OcclusionStrengthIndirectSpecular: 1
- _Parallax: 0.02
- _QueueOffset: 0
- _SampleGI: 0
- _SpecularMode: 1
- _SrcBlend: 5
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _Surface: 1
- _UVSec: 0
- _ZWrite: 0
- g_bReceiveShadows: 1
- g_bUnlit: 1
- g_bWorldAlignedTexture: 0
- g_flCubeMapScalar: 1
- g_flReflectanceBias: 0
- g_flReflectanceMax: 1
- g_flReflectanceMin: 0
- g_flReflectanceScale: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 0.1254902}
- _Color: {r: 1, g: 1, b: 1, a: 0.1254902}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SceneTint: {r: 0.64705884, g: 0.64705884, b: 0.64705884, a: 1}
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
- _TintColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5}
- g_vWorldAlignedNormalTangentU: {r: -1, g: 0, b: 0, a: 0}
- g_vWorldAlignedNormalTangentV: {r: 0, g: 0, b: 1, a: 0}
- g_vWorldAlignedTextureNormal: {r: 0, g: 1, b: 0, a: 0}
- g_vWorldAlignedTexturePosition: {r: 0, g: 0, b: 0, a: 0}
- g_vWorldAlignedTextureSize: {r: 1, g: 1, b: 1, a: 0}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 70a2eb634d7ed434b86d36f190fcf3a1
timeCreated: 1452301140
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,136 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-6903812706632878421
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: 1
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: URPControllerTextHintAnchor
m_Shader: {fileID: 4800000, guid: 650dd9526735d5b46b79224bc6e94025, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 6
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3050
stringTagMap:
RenderType: Transparent
disabledShaderPasses:
- SHADOWCASTER
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- g_tOverrideLightmap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _AlphaClip: 0
- _Blend: 0
- _BumpScale: 1
- _Cull: 2
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 10
- _EnvironmentReflections: 1
- _FogMultiplier: 1
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _OcclusionStrengthDirectDiffuse: 1
- _OcclusionStrengthDirectSpecular: 1
- _OcclusionStrengthIndirectDiffuse: 1
- _OcclusionStrengthIndirectSpecular: 1
- _Parallax: 0.02
- _QueueOffset: 0
- _ReceiveShadows: 1
- _SampleGI: 0
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SpecularMode: 1
- _SrcBlend: 5
- _Surface: 1
- _UVSec: 0
- _WorkflowMode: 1
- _ZWrite: 0
- g_bReceiveShadows: 1
- g_bUnlit: 1
- g_bWorldAlignedTexture: 0
- g_flCubeMapScalar: 1
- g_flReflectanceBias: 0
- g_flReflectanceMax: 1
- g_flReflectanceMin: 0
- g_flReflectanceScale: 1
m_Colors:
- _BaseColor: {r: 0.854902, g: 0.854902, b: 0.854902, a: 1}
- _Color: {r: 0.854902, g: 0.854902, b: 0.854902, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SceneTint: {r: 1, g: 1, b: 1, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
- g_vWorldAlignedNormalTangentU: {r: -1, g: 0, b: 0, a: 0}
- g_vWorldAlignedNormalTangentV: {r: 0, g: 0, b: 1, a: 0}
- g_vWorldAlignedTextureNormal: {r: 0, g: 1, b: 0, a: 0}
- g_vWorldAlignedTexturePosition: {r: 0, g: 0, b: 0, a: 0}
- g_vWorldAlignedTextureSize: {r: 1, g: 1, b: 1, a: 0}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5ee00630a4cba94459f162ea174a1d97
timeCreated: 1456565286
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,137 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-458418814011274066
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: 1
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: URPControllerTextHintLine
m_Shader: {fileID: 4800000, guid: 650dd9526735d5b46b79224bc6e94025, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 6
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3050
stringTagMap:
RenderType: Transparent
disabledShaderPasses:
- SHADOWCASTER
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- g_tOverrideLightmap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- PixelSnap: 0
- _AlphaClip: 0
- _Blend: 0
- _BumpScale: 1
- _Cull: 2
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 10
- _EnvironmentReflections: 1
- _FogMultiplier: 1
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _OcclusionStrengthDirectDiffuse: 1
- _OcclusionStrengthDirectSpecular: 1
- _OcclusionStrengthIndirectDiffuse: 1
- _OcclusionStrengthIndirectSpecular: 1
- _Parallax: 0.02
- _QueueOffset: 0
- _ReceiveShadows: 1
- _SampleGI: 0
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SpecularMode: 1
- _SrcBlend: 5
- _Surface: 1
- _UVSec: 0
- _WorkflowMode: 1
- _ZWrite: 0
- g_bReceiveShadows: 1
- g_bUnlit: 1
- g_bWorldAlignedTexture: 0
- g_flCubeMapScalar: 1
- g_flReflectanceBias: 0
- g_flReflectanceMax: 1
- g_flReflectanceMin: 0
- g_flReflectanceScale: 1
m_Colors:
- _BaseColor: {r: 0.85490197, g: 0.85490197, b: 0.85490197, a: 1}
- _Color: {r: 0.85490197, g: 0.85490197, b: 0.85490197, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SceneTint: {r: 1, g: 1, b: 1, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
- g_vWorldAlignedNormalTangentU: {r: -1, g: 0, b: 0, a: 0}
- g_vWorldAlignedNormalTangentV: {r: 0, g: 0, b: 1, a: 0}
- g_vWorldAlignedTextureNormal: {r: 0, g: 1, b: 0, a: 0}
- g_vWorldAlignedTexturePosition: {r: 0, g: 0, b: 0, a: 0}
- g_vWorldAlignedTextureSize: {r: 1, g: 1, b: 1, a: 0}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d51c2116441c31e408cfcd6e44b1ff93
timeCreated: 1456610834
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: bbecae3d442b2b0478f2e6a2afc24059
folderAsset: yes
timeCreated: 1479762244
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5fa42bb9e52706a42b8a1eaf0b54326a
timeCreated: 1456611350
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 8f511b02628aaca43be0aecee58c1b71
folderAsset: yes
timeCreated: 1479769520
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,889 @@
//======= Copyright (c) Valve Corporation, All rights reserved. ===============
//
// Purpose: Displays text and button hints on the controllers
//
//=============================================================================
#if UNITY_UGUI_UI || !UNITY_2019_2_OR_NEWER
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
using System.Text;
namespace Valve.VR.InteractionSystem
{
//-------------------------------------------------------------------------
public class ControllerButtonHints : MonoBehaviour
{
public Material controllerMaterial;
public Material urpControllerMaterial;
public Material usingMaterial
{
get
{
#if UNITY_URP
return urpControllerMaterial;
#else
return controllerMaterial;
#endif
}
}
public Color flashColor = new Color( 1.0f, 0.557f, 0.0f );
public GameObject textHintPrefab;
public SteamVR_Action_Vibration hapticFlash = SteamVR_Input.GetAction<SteamVR_Action_Vibration>("Haptic");
public bool autoSetWithControllerRangeOfMotion = true;
[Header( "Debug" )]
public bool debugHints = false;
private SteamVR_RenderModel renderModel;
private Player player;
private List<MeshRenderer> renderers = new List<MeshRenderer>();
private List<MeshRenderer> flashingRenderers = new List<MeshRenderer>();
private float startTime;
private float tickCount;
private enum OffsetType
{
Up,
Right,
Forward,
Back
}
//Info for each of the buttons
private class ActionHintInfo
{
public string componentName;
public List<MeshRenderer> renderers;
public Transform localTransform;
//Text hint
public GameObject textHintObject;
public Transform textStartAnchor;
public Transform textEndAnchor;
public Vector3 textEndOffsetDir;
public Transform canvasOffset;
public Text text;
public TextMesh textMesh;
public Canvas textCanvas;
public LineRenderer line;
public float distanceFromCenter;
public bool textHintActive = false;
}
private Dictionary<ISteamVR_Action_In_Source, ActionHintInfo> actionHintInfos;
private Transform textHintParent;
private int colorID;
public bool initialized { get; private set; }
private Vector3 centerPosition = Vector3.zero;
SteamVR_Events.Action renderModelLoadedAction;
protected SteamVR_Input_Sources inputSource;
//-------------------------------------------------
void Awake()
{
renderModelLoadedAction = SteamVR_Events.RenderModelLoadedAction( OnRenderModelLoaded );
#if UNITY_URP
colorID = Shader.PropertyToID( "_BaseColor" );
#else
colorID = Shader.PropertyToID( "_Color" );
#endif
}
//-------------------------------------------------
void Start()
{
player = Player.instance;
}
//-------------------------------------------------
private void HintDebugLog( string msg )
{
if ( debugHints )
{
Debug.Log("<b>[SteamVR Interaction]</b> Hints: " + msg );
}
}
//-------------------------------------------------
void OnEnable()
{
renderModelLoadedAction.enabled = true;
}
//-------------------------------------------------
void OnDisable()
{
renderModelLoadedAction.enabled = false;
Clear();
}
//-------------------------------------------------
private void OnParentHandInputFocusLost()
{
//Hide all the hints when the controller is no longer the primary attached object
HideAllButtonHints();
HideAllText();
}
public virtual void SetInputSource(SteamVR_Input_Sources newInputSource)
{
inputSource = newInputSource;
if (renderModel != null)
renderModel.SetInputSource(newInputSource);
}
//-------------------------------------------------
// Gets called when the hand has been initialized and a render model has been set
//-------------------------------------------------
private void OnHandInitialized(int deviceIndex)
{
//Create a new render model for the controller hints
renderModel = new GameObject( "SteamVR_RenderModel" ).AddComponent<SteamVR_RenderModel>();
renderModel.transform.parent = transform;
renderModel.transform.localPosition = Vector3.zero;
renderModel.transform.localRotation = Quaternion.identity;
renderModel.transform.localScale = Vector3.one;
renderModel.SetInputSource(inputSource);
renderModel.SetDeviceIndex(deviceIndex);
if ( !initialized )
{
//The controller hint render model needs to be active to get accurate transforms for all the individual components
renderModel.gameObject.SetActive( true );
}
}
private Dictionary<string, Transform> componentTransformMap = new Dictionary<string, Transform>();
//-------------------------------------------------
void OnRenderModelLoaded(SteamVR_RenderModel renderModel, bool succeess)
{
//Only initialize when the render model for the controller hints has been loaded
if (renderModel == this.renderModel)
{
//Debug.Log("<b>[SteamVR Interaction]</b> OnRenderModelLoaded: " + this.renderModel.renderModelName);
if (initialized)
{
Destroy(textHintParent.gameObject);
componentTransformMap.Clear();
flashingRenderers.Clear();
}
renderModel.SetMeshRendererState(false);
StartCoroutine(DoInitialize(renderModel));
}
}
private IEnumerator DoInitialize(SteamVR_RenderModel renderModel)
{
while (renderModel.initializedAttachPoints == false)
yield return null;
textHintParent = new GameObject("Text Hints").transform;
textHintParent.SetParent(this.transform);
textHintParent.localPosition = Vector3.zero;
textHintParent.localRotation = Quaternion.identity;
textHintParent.localScale = Vector3.one;
//Get the button mask for each component of the render model
var renderModels = OpenVR.RenderModels;
if (renderModels != null)
{
string renderModelDebug = "";
if (debugHints)
renderModelDebug = "Components for render model " + renderModel.index;
for (int childIndex = 0; childIndex < renderModel.transform.childCount; childIndex++)
{
Transform child = renderModel.transform.GetChild(childIndex);
if (componentTransformMap.ContainsKey(child.name))
{
if (debugHints)
renderModelDebug += "\n\t! Child component already exists with name: " + child.name;
}
else
componentTransformMap.Add(child.name, child);
if (debugHints)
renderModelDebug += "\n\t" + child.name + ".";
}
//Uncomment to show the button mask for each component of the render model
HintDebugLog(renderModelDebug);
}
actionHintInfos = new Dictionary<ISteamVR_Action_In_Source, ActionHintInfo>();
for (int actionIndex = 0; actionIndex < SteamVR_Input.actionsNonPoseNonSkeletonIn.Length; actionIndex++)
{
ISteamVR_Action_In action = SteamVR_Input.actionsNonPoseNonSkeletonIn[actionIndex];
if (action.GetActive(inputSource))
CreateAndAddButtonInfo(action, inputSource);
}
ComputeTextEndTransforms();
initialized = true;
//Set the controller hints render model to not active
renderModel.SetMeshRendererState(true);
renderModel.gameObject.SetActive(false);
}
//-------------------------------------------------
private void CreateAndAddButtonInfo(ISteamVR_Action_In action, SteamVR_Input_Sources inputSource)
{
Transform buttonTransform = null;
List<MeshRenderer> buttonRenderers = new List<MeshRenderer>();
StringBuilder buttonDebug = new StringBuilder();
buttonDebug.Append("Looking for action: ");
buttonDebug.AppendLine(action.GetShortName());
buttonDebug.Append("Action localized origin: ");
buttonDebug.AppendLine(action.GetLocalizedOrigin(inputSource));
string actionComponentName = action.GetRenderModelComponentName(inputSource);
if (componentTransformMap.ContainsKey(actionComponentName))
{
buttonDebug.AppendLine(string.Format("Found component: {0} for {1}", actionComponentName, action.GetShortName()));
Transform componentTransform = componentTransformMap[actionComponentName];
buttonTransform = componentTransform;
buttonDebug.AppendLine(string.Format("Found componentTransform: {0}. buttonTransform: {1}", componentTransform, buttonTransform));
buttonRenderers.AddRange(componentTransform.GetComponentsInChildren<MeshRenderer>());
}
else
{
buttonDebug.AppendLine(string.Format("Can't find component transform for action: {0}. Component name: \"{1}\"", action.GetShortName(), actionComponentName));
}
buttonDebug.AppendLine(string.Format("Found {0} renderers for {1}", buttonRenderers.Count, action.GetShortName()));
foreach ( MeshRenderer renderer in buttonRenderers )
{
buttonDebug.Append("\t");
buttonDebug.AppendLine(renderer.name);
}
HintDebugLog( buttonDebug.ToString() );
if ( buttonTransform == null )
{
HintDebugLog( "Couldn't find buttonTransform for " + action.GetShortName());
return;
}
ActionHintInfo hintInfo = new ActionHintInfo();
actionHintInfos.Add( action, hintInfo );
hintInfo.componentName = buttonTransform.name;
hintInfo.renderers = buttonRenderers;
//Get the local transform for the button
for (int childIndex = 0; childIndex < buttonTransform.childCount; childIndex++)
{
Transform child = buttonTransform.GetChild(childIndex);
if (child.name == SteamVR_RenderModel.k_localTransformName)
hintInfo.localTransform = child;
}
OffsetType offsetType = OffsetType.Right;
/*
switch ( buttonID )
{
case EVRButtonId.k_EButton_SteamVR_Trigger:
{
offsetType = OffsetType.Right;
}
break;
case EVRButtonId.k_EButton_ApplicationMenu:
{
offsetType = OffsetType.Right;
}
break;
case EVRButtonId.k_EButton_System:
{
offsetType = OffsetType.Right;
}
break;
case Valve.VR.EVRButtonId.k_EButton_Grip:
{
offsetType = OffsetType.Forward;
}
break;
case Valve.VR.EVRButtonId.k_EButton_SteamVR_Touchpad:
{
offsetType = OffsetType.Up;
}
break;
}
*/
//Offset for the text end transform
switch ( offsetType )
{
case OffsetType.Forward:
hintInfo.textEndOffsetDir = hintInfo.localTransform.forward;
break;
case OffsetType.Back:
hintInfo.textEndOffsetDir = -hintInfo.localTransform.forward;
break;
case OffsetType.Right:
hintInfo.textEndOffsetDir = hintInfo.localTransform.right;
break;
case OffsetType.Up:
hintInfo.textEndOffsetDir = hintInfo.localTransform.up;
break;
}
//Create the text hint object
Vector3 hintStartPos = hintInfo.localTransform.position + ( hintInfo.localTransform.forward * 0.01f );
hintInfo.textHintObject = GameObject.Instantiate( textHintPrefab, hintStartPos, Quaternion.identity ) as GameObject;
hintInfo.textHintObject.name = "Hint_" + hintInfo.componentName + "_Start";
hintInfo.textHintObject.transform.SetParent( textHintParent );
hintInfo.textHintObject.layer = gameObject.layer;
hintInfo.textHintObject.tag = gameObject.tag;
//Get all the relevant child objects
hintInfo.textStartAnchor = hintInfo.textHintObject.transform.Find( "Start" );
hintInfo.textEndAnchor = hintInfo.textHintObject.transform.Find( "End" );
hintInfo.canvasOffset = hintInfo.textHintObject.transform.Find( "CanvasOffset" );
hintInfo.line = hintInfo.textHintObject.transform.Find( "Line" ).GetComponent<LineRenderer>();
hintInfo.textCanvas = hintInfo.textHintObject.GetComponentInChildren<Canvas>();
hintInfo.text = hintInfo.textCanvas.GetComponentInChildren<Text>();
hintInfo.textMesh = hintInfo.textCanvas.GetComponentInChildren<TextMesh>();
hintInfo.textHintObject.SetActive( false );
hintInfo.textStartAnchor.position = hintStartPos;
if ( hintInfo.text != null )
{
hintInfo.text.text = hintInfo.componentName;
}
if ( hintInfo.textMesh != null )
{
hintInfo.textMesh.text = hintInfo.componentName;
}
centerPosition += hintInfo.textStartAnchor.position;
// Scale hint components to match player size
hintInfo.textCanvas.transform.localScale = Vector3.Scale( hintInfo.textCanvas.transform.localScale, player.transform.localScale );
hintInfo.textStartAnchor.transform.localScale = Vector3.Scale( hintInfo.textStartAnchor.transform.localScale, player.transform.localScale );
hintInfo.textEndAnchor.transform.localScale = Vector3.Scale( hintInfo.textEndAnchor.transform.localScale, player.transform.localScale );
hintInfo.line.transform.localScale = Vector3.Scale( hintInfo.line.transform.localScale, player.transform.localScale );
}
//-------------------------------------------------
private void ComputeTextEndTransforms()
{
//This is done as a separate step after all the ButtonHintInfos have been initialized
//to make the text hints fan out appropriately based on the button's position on the controller.
centerPosition /= actionHintInfos.Count;
float maxDistanceFromCenter = 0.0f;
foreach ( var hintInfo in actionHintInfos )
{
hintInfo.Value.distanceFromCenter = Vector3.Distance( hintInfo.Value.textStartAnchor.position, centerPosition );
if ( hintInfo.Value.distanceFromCenter > maxDistanceFromCenter )
{
maxDistanceFromCenter = hintInfo.Value.distanceFromCenter;
}
}
foreach ( var hintInfo in actionHintInfos )
{
Vector3 centerToButton = hintInfo.Value.textStartAnchor.position - centerPosition;
centerToButton.Normalize();
centerToButton = Vector3.Project( centerToButton, renderModel.transform.forward );
//Spread out the text end positions based on the distance from the center
float t = hintInfo.Value.distanceFromCenter / maxDistanceFromCenter;
float scale = hintInfo.Value.distanceFromCenter * Mathf.Pow( 2, 10 * ( t - 1.0f ) ) * 20.0f;
//Flip the direction of the end pos based on which hand this is
float endPosOffset = 0.1f;
Vector3 hintEndPos = hintInfo.Value.textStartAnchor.position + ( hintInfo.Value.textEndOffsetDir * endPosOffset ) + ( centerToButton * scale * 0.1f );
if (SteamVR_Utils.IsValid(hintEndPos))
{
hintInfo.Value.textEndAnchor.position = hintEndPos;
hintInfo.Value.canvasOffset.position = hintEndPos;
}
else
{
Debug.LogWarning("<b>[SteamVR Interaction]</b> Invalid end position for: " + hintInfo.Value.textStartAnchor.name, hintInfo.Value.textStartAnchor.gameObject);
}
hintInfo.Value.canvasOffset.localRotation = Quaternion.identity;
}
}
//-------------------------------------------------
private void ShowButtonHint( params ISteamVR_Action_In_Source[] actions )
{
renderModel.gameObject.SetActive( true );
renderModel.GetComponentsInChildren<MeshRenderer>( renderers );
for ( int i = 0; i < renderers.Count; i++ )
{
Texture mainTexture = renderers[i].material.mainTexture;
renderers[i].sharedMaterial = usingMaterial;
renderers[i].material.mainTexture = mainTexture;
// This is to poke unity into setting the correct render queue for the model
#if UNITY_URP
renderers[i].material.renderQueue = usingMaterial.renderQueue;
#else
renderers[i].material.renderQueue = usingMaterial.shader.renderQueue;
#endif
}
for ( int i = 0; i < actions.Length; i++ )
{
if ( actionHintInfos.ContainsKey( actions[i] ) )
{
ActionHintInfo hintInfo = actionHintInfos[actions[i]];
foreach ( MeshRenderer renderer in hintInfo.renderers )
{
if ( !flashingRenderers.Contains( renderer ) )
{
flashingRenderers.Add( renderer );
}
}
}
}
startTime = Time.realtimeSinceStartup;
tickCount = 0.0f;
}
//-------------------------------------------------
private void HideAllButtonHints()
{
Clear();
if (renderModel != null && renderModel.gameObject != null)
renderModel.gameObject.SetActive( false );
}
//-------------------------------------------------
private void HideButtonHint( params ISteamVR_Action_In_Source[] actions )
{
Color baseColor = usingMaterial.GetColor( colorID );
for ( int i = 0; i < actions.Length; i++ )
{
if ( actionHintInfos.ContainsKey(actions[i] ) )
{
ActionHintInfo hintInfo = actionHintInfos[actions[i]];
foreach ( MeshRenderer renderer in hintInfo.renderers )
{
renderer.material.color = baseColor;
flashingRenderers.Remove( renderer );
}
}
}
if ( flashingRenderers.Count == 0 )
{
renderModel.gameObject.SetActive( false );
}
}
//-------------------------------------------------
private bool IsButtonHintActive(ISteamVR_Action_In_Source action )
{
if ( actionHintInfos.ContainsKey(action) )
{
ActionHintInfo hintInfo = actionHintInfos[action];
foreach ( MeshRenderer buttonRenderer in hintInfo.renderers )
{
if ( flashingRenderers.Contains( buttonRenderer ) )
{
return true;
}
}
}
return false;
}
//-------------------------------------------------
private IEnumerator TestButtonHints()
{
while ( true )
{
for (int actionIndex = 0; actionIndex < SteamVR_Input.actionsNonPoseNonSkeletonIn.Length; actionIndex++)
{
ISteamVR_Action_In action = SteamVR_Input.actionsNonPoseNonSkeletonIn[actionIndex];
if (action.GetActive(inputSource))
{
ShowButtonHint(action);
yield return new WaitForSeconds(1.0f);
}
yield return null;
}
}
}
//-------------------------------------------------
private IEnumerator TestTextHints()
{
while ( true )
{
for (int actionIndex = 0; actionIndex < SteamVR_Input.actionsNonPoseNonSkeletonIn.Length; actionIndex++)
{
ISteamVR_Action_In action = SteamVR_Input.actionsNonPoseNonSkeletonIn[actionIndex];
if (action.GetActive(inputSource))
{
ShowText(action, action.GetShortName());
yield return new WaitForSeconds(3.0f);
}
yield return null;
}
HideAllText();
yield return new WaitForSeconds( 3.0f );
}
}
//-------------------------------------------------
void Update()
{
if ( renderModel != null && renderModel.gameObject.activeInHierarchy && flashingRenderers.Count > 0 )
{
Color baseColor = usingMaterial.GetColor( colorID );
float flash = ( Time.realtimeSinceStartup - startTime ) * Mathf.PI * 2.0f;
flash = Mathf.Cos( flash );
flash = Util.RemapNumberClamped( flash, -1.0f, 1.0f, 0.0f, 1.0f );
float ticks = ( Time.realtimeSinceStartup - startTime );
if ( ticks - tickCount > 1.0f )
{
tickCount += 1.0f;
hapticFlash.Execute(0, 0.005f, 0.005f, 1, inputSource);
}
for ( int i = 0; i < flashingRenderers.Count; i++ )
{
Renderer r = flashingRenderers[i];
r.material.SetColor( colorID, Color.Lerp( baseColor, flashColor, flash ) );
}
if ( initialized )
{
foreach ( var hintInfo in actionHintInfos )
{
if ( hintInfo.Value.textHintActive )
{
UpdateTextHint( hintInfo.Value );
}
}
}
}
}
//-------------------------------------------------
private void UpdateTextHint( ActionHintInfo hintInfo )
{
Transform playerTransform = player.hmdTransform;
Vector3 vDir = playerTransform.position - hintInfo.canvasOffset.position;
Quaternion standardLookat = Quaternion.LookRotation( vDir, Vector3.up );
Quaternion upsideDownLookat = Quaternion.LookRotation( vDir, playerTransform.up );
float flInterp;
if ( playerTransform.forward.y > 0.0f )
{
flInterp = Util.RemapNumberClamped( playerTransform.forward.y, 0.6f, 0.4f, 1.0f, 0.0f );
}
else
{
flInterp = Util.RemapNumberClamped( playerTransform.forward.y, -0.8f, -0.6f, 1.0f, 0.0f );
}
hintInfo.canvasOffset.rotation = Quaternion.Slerp( standardLookat, upsideDownLookat, flInterp );
Transform lineTransform = hintInfo.line.transform;
hintInfo.line.useWorldSpace = false;
hintInfo.line.SetPosition( 0, lineTransform.InverseTransformPoint( hintInfo.textStartAnchor.position ) );
hintInfo.line.SetPosition( 1, lineTransform.InverseTransformPoint( hintInfo.textEndAnchor.position ) );
}
//-------------------------------------------------
private void Clear()
{
renderers.Clear();
flashingRenderers.Clear();
}
//-------------------------------------------------
private void ShowText(ISteamVR_Action_In_Source action, string text, bool highlightButton = true )
{
if ( actionHintInfos.ContainsKey(action) )
{
ActionHintInfo hintInfo = actionHintInfos[action];
hintInfo.textHintObject.SetActive( true );
hintInfo.textHintActive = true;
if ( hintInfo.text != null )
{
hintInfo.text.text = text;
}
if ( hintInfo.textMesh != null )
{
hintInfo.textMesh.text = text;
}
UpdateTextHint( hintInfo );
if ( highlightButton )
{
ShowButtonHint(action);
}
renderModel.gameObject.SetActive( true );
}
}
//-------------------------------------------------
private void HideText(ISteamVR_Action_In_Source action)
{
if ( actionHintInfos.ContainsKey(action) )
{
ActionHintInfo hintInfo = actionHintInfos[action];
hintInfo.textHintObject.SetActive( false );
hintInfo.textHintActive = false;
HideButtonHint(action);
}
}
//-------------------------------------------------
private void HideAllText()
{
if (actionHintInfos != null)
{
foreach (var hintInfo in actionHintInfos)
{
hintInfo.Value.textHintObject.SetActive(false);
hintInfo.Value.textHintActive = false;
}
HideAllButtonHints();
}
}
//-------------------------------------------------
private string GetActiveHintText(ISteamVR_Action_In_Source action )
{
if ( actionHintInfos.ContainsKey(action) )
{
ActionHintInfo hintInfo = actionHintInfos[action];
if ( hintInfo.textHintActive )
{
return hintInfo.text.text;
}
}
return string.Empty;
}
//-------------------------------------------------
// These are the static functions which are used to show/hide the hints
//-------------------------------------------------
//-------------------------------------------------
private static ControllerButtonHints GetControllerButtonHints( Hand hand )
{
if ( hand != null )
{
ControllerButtonHints hints = hand.GetComponentInChildren<ControllerButtonHints>();
if ( hints != null && hints.initialized )
{
return hints;
}
}
return null;
}
//-------------------------------------------------
public static void ShowButtonHint( Hand hand, params ISteamVR_Action_In_Source[] actions )
{
ControllerButtonHints hints = GetControllerButtonHints( hand );
if ( hints != null )
{
hints.ShowButtonHint( actions );
}
}
//-------------------------------------------------
public static void HideButtonHint( Hand hand, params ISteamVR_Action_In_Source[] actions )
{
ControllerButtonHints hints = GetControllerButtonHints( hand );
if ( hints != null )
{
hints.HideButtonHint( actions );
}
}
//-------------------------------------------------
public static void HideAllButtonHints( Hand hand )
{
ControllerButtonHints hints = GetControllerButtonHints( hand );
if ( hints != null )
{
hints.HideAllButtonHints();
}
}
//-------------------------------------------------
public static bool IsButtonHintActive( Hand hand, ISteamVR_Action_In_Source action )
{
ControllerButtonHints hints = GetControllerButtonHints( hand );
if ( hints != null )
{
return hints.IsButtonHintActive(action);
}
return false;
}
//-------------------------------------------------
public static void ShowTextHint( Hand hand, ISteamVR_Action_In_Source action, string text, bool highlightButton = true )
{
ControllerButtonHints hints = GetControllerButtonHints( hand );
if ( hints != null )
{
hints.ShowText(action, text, highlightButton );
if (hand != null)
{
if (hints.autoSetWithControllerRangeOfMotion)
hand.SetTemporarySkeletonRangeOfMotion(SkeletalMotionRangeChange.WithController);
}
}
}
//-------------------------------------------------
public static void HideTextHint( Hand hand, ISteamVR_Action_In_Source action)
{
ControllerButtonHints hints = GetControllerButtonHints( hand );
if ( hints != null )
{
hints.HideText(action);
if (hand != null)
{
if (hints.autoSetWithControllerRangeOfMotion)
hand.ResetTemporarySkeletonRangeOfMotion();
}
}
}
//-------------------------------------------------
public static void HideAllTextHints( Hand hand )
{
ControllerButtonHints hints = GetControllerButtonHints( hand );
if ( hints != null )
{
hints.HideAllText();
}
}
//-------------------------------------------------
public static string GetActiveHintText( Hand hand, ISteamVR_Action_In_Source action)
{
ControllerButtonHints hints = GetControllerButtonHints( hand );
if ( hints != null )
{
return hints.GetActiveHintText(action);
}
return string.Empty;
}
}
}
#else
using UnityEngine;
namespace Valve.VR.InteractionSystem { public class ControllerButtonHints : MonoBehaviour {
public static void ShowButtonHint(Hand hand, params ISteamVR_Action_In_Source[] actions) { }
public static void HideButtonHint(Hand hand, params ISteamVR_Action_In_Source[] actions) { }
public static void HideAllButtonHints(Hand hand) { }
public static bool IsButtonHintActive(Hand hand, ISteamVR_Action_In_Source action) { return false; }
public static void ShowTextHint(Hand hand, ISteamVR_Action_In_Source action, string text, bool highlightButton = true) { }
public static void HideTextHint(Hand hand, ISteamVR_Action_In_Source action) { }
public static void HideAllTextHints(Hand hand) { }
public static string GetActiveHintText(Hand hand, ISteamVR_Action_In_Source action) { return null; }
} }
#endif

View File

@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: ea1001a6626353541ab4d4b39f4c3569
timeCreated: 1544851960
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences:
- controllerMaterial: {fileID: 2100000, guid: 11b050e661ec0cf48a289a7266451e91,
type: 2}
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 1375c26e5558daa48ae7ab8a8117cbe1
folderAsset: yes
timeCreated: 1479762244
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,236 @@
//======= Copyright (c) Valve Corporation, All rights reserved. ===============
//
// Purpose:
//
//=============================================================================
// UNITY_SHADER_NO_UPGRADE
Shader "Valve/VR/ControllerButtonHints"
{
Properties
{
_MainTex ( "Texture", 2D ) = "white" {}
_Color( "Color", Color ) = ( 1, 1, 1, 1 )
_SceneTint( "SceneTint", Color ) = ( 1, 1, 1, 1 )
}
SubShader
{
Tags{ "Queue" = "Transparent+1" "RenderType" = "Transparent" }
LOD 100
Pass
{
// Render State ---------------------------------------------------------------------------------------------------------------------------------------------
Blend Zero SrcColor // Alpha blending
Cull Off
ZWrite Off
ZTest Off
Stencil
{
Ref 2
Comp notequal
Pass replace
Fail keep
}
CGPROGRAM
#pragma vertex MainVS
#pragma fragment MainPS
// Includes -------------------------------------------------------------------------------------------------------------------------------------------------
#include "UnityCG.cginc"
#if UNITY_VERSION >= 201810
// Structs --------------------------------------------------------------------------------------------------------------------------------------------------
struct VertexInput
{
float4 vertex : POSITION;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct VertexOutput
{
float4 vertex : SV_POSITION;
UNITY_VERTEX_OUTPUT_STEREO
};
// Globals --------------------------------------------------------------------------------------------------------------------------------------------------
UNITY_INSTANCING_BUFFER_START( Props )
UNITY_DEFINE_INSTANCED_PROP( float4, _SceneTint )
UNITY_INSTANCING_BUFFER_END( Props )
// MainVs ---------------------------------------------------------------------------------------------------------------------------------------------------
VertexOutput MainVS( VertexInput i )
{
VertexOutput o;
UNITY_SETUP_INSTANCE_ID( i );
UNITY_INITIALIZE_OUTPUT( VertexOutput, o );
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( o );
o.vertex = UnityObjectToClipPos(i.vertex);
return o;
}
// MainPs ---------------------------------------------------------------------------------------------------------------------------------------------------
float4 MainPS( VertexOutput i ) : SV_Target
{
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( i );
return UNITY_ACCESS_INSTANCED_PROP( Props, _SceneTint.rgba );
}
#else
// Structs --------------------------------------------------------------------------------------------------------------------------------------------------
struct VertexInput
{
float4 vertex : POSITION;
};
struct VertexOutput
{
float4 vertex : SV_POSITION;
};
// Globals --------------------------------------------------------------------------------------------------------------------------------------------------
float4 _SceneTint;
// MainVs ---------------------------------------------------------------------------------------------------------------------------------------------------
VertexOutput MainVS( VertexInput i )
{
VertexOutput o;
#if UNITY_VERSION >= 540
o.vertex = UnityObjectToClipPos(i.vertex);
#else
o.vertex = mul(UNITY_MATRIX_MVP, i.vertex);
#endif
return o;
}
// MainPs ---------------------------------------------------------------------------------------------------------------------------------------------------
float4 MainPS( VertexOutput i ) : SV_Target
{
return _SceneTint.rgba;
}
#endif
ENDCG
}
Pass
{
// Render State ---------------------------------------------------------------------------------------------------------------------------------------------
Blend SrcAlpha OneMinusSrcAlpha // Alpha blending
Cull Off
ZWrite Off
ZTest Always
CGPROGRAM
#pragma vertex MainVS
#pragma fragment MainPS
// Includes -------------------------------------------------------------------------------------------------------------------------------------------------
#include "UnityCG.cginc"
#if UNITY_VERSION >= 201810
// Structs --------------------------------------------------------------------------------------------------------------------------------------------------
struct VertexInput
{
float4 vertex : POSITION;
float2 uv : TEXCOORD0;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct VertexOutput
{
float2 uv : TEXCOORD0;
float4 vertex : SV_POSITION;
UNITY_VERTEX_OUTPUT_STEREO
};
// Globals --------------------------------------------------------------------------------------------------------------------------------------------------
UNITY_INSTANCING_BUFFER_START( Props )
UNITY_DEFINE_INSTANCED_PROP( sampler2D, _MainTex )
UNITY_DEFINE_INSTANCED_PROP( float4, _MainTex_ST )
UNITY_DEFINE_INSTANCED_PROP( float4, _Color )
UNITY_INSTANCING_BUFFER_END( Props )
// MainVs ---------------------------------------------------------------------------------------------------------------------------------------------------
VertexOutput MainVS( VertexInput i )
{
VertexOutput o;
UNITY_SETUP_INSTANCE_ID( i );
UNITY_INITIALIZE_OUTPUT( VertexOutput, o );
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( o );
o.vertex = UnityObjectToClipPos(i.vertex);
o.uv = TRANSFORM_TEX( i.uv, UNITY_ACCESS_INSTANCED_PROP( Props, _MainTex ) );
return o;
}
// MainPs ---------------------------------------------------------------------------------------------------------------------------------------------------
float4 MainPS( VertexOutput i ) : SV_Target
{
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( i );
float4 vColor;
vColor.rgb = lerp( tex2D( UNITY_ACCESS_INSTANCED_PROP( Props, _MainTex ), i.uv).rgb, UNITY_ACCESS_INSTANCED_PROP( Props, _Color.rgb ), UNITY_ACCESS_INSTANCED_PROP( Props, _Color.a ) );
vColor.a = UNITY_ACCESS_INSTANCED_PROP( Props, _Color.a );
return vColor.rgba;
}
#else
// Structs --------------------------------------------------------------------------------------------------------------------------------------------------
struct VertexInput
{
float4 vertex : POSITION;
float2 uv : TEXCOORD0;
};
struct VertexOutput
{
float2 uv : TEXCOORD0;
float4 vertex : SV_POSITION;
};
// Globals --------------------------------------------------------------------------------------------------------------------------------------------------
sampler2D _MainTex;
float4 _MainTex_ST;
float4 _Color;
// MainVs ---------------------------------------------------------------------------------------------------------------------------------------------------
VertexOutput MainVS( VertexInput i )
{
VertexOutput o;
#if UNITY_VERSION >= 540
o.vertex = UnityObjectToClipPos(i.vertex);
#else
o.vertex = mul(UNITY_MATRIX_MVP, i.vertex);
#endif
o.uv = TRANSFORM_TEX( i.uv, _MainTex );
return o;
}
// MainPs ---------------------------------------------------------------------------------------------------------------------------------------------------
float4 MainPS( VertexOutput i ) : SV_Target
{
float4 vColor;
vColor.rgb = lerp( tex2D(_MainTex, i.uv).rgb, _Color.rgb, _Color.a );
vColor.a = _Color.a;
return vColor.rgba;
}
#endif
ENDCG
}
}
}

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: de053fb214897cc439db35fc0361a282
timeCreated: 1452302861
licenseType: Store
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 6fa11a15b6830ea40808c51f7a5f0a4e
folderAsset: yes
timeCreated: 1479762244
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,114 @@
fileFormatVersion: 2
guid: 5697c26ee2ef0c848996640f6a3d3432
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 2
aniso: 16
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 9, y: 9, z: 9, w: 9}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 1
swizzle: 50462976
cookieLightType: 1
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
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
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant: