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,8 @@
fileFormatVersion: 2
guid: 188aa8d1a0e72644faeab939bb702929
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,77 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Blue
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _EMISSION
m_LightmapFlags: 0
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 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}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0, g: 0.14357352, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1b68ffca77c4c6344af03830dbeca2ca
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,78 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Clear
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _ALPHAPREMULTIPLY_ON _EMISSION _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
m_LightmapFlags: 0
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap:
RenderType: Transparent
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 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}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 10
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 3
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 1
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 0
m_Colors:
- _Color: {r: 1, g: 0.995283, b: 0.995283, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 15d1a592c297987428ced42437287bdd
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,77 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Green
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _EMISSION
m_LightmapFlags: 0
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 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}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0.029469624, g: 1, b: 0.023584902, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2512827267cc0da4a90ecb92fd35043b
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,77 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: IconAnchor
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 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}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: befcd1ef2cd28244a86619559833f221
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,77 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: IconBackground
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 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}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0, g: 0, b: 0, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5ec6b1df0a0620b44b46efcf07957ab3
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,87 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: LineMat
m_Shader: {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _EMISSION
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 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}
m_Floats:
- _BumpScale: 1
- _ColorMask: 15
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0
- _GlossyReflections: 1
- _InvFade: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UVSec: 0
- _UseUIAlphaClip: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _TintColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5}
m_BuildTextureStacks: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0cbffc4fb1a293742bc1585db8956773
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,81 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Passthrough
m_Shader: {fileID: 4800000, guid: 27773a146fd29844e82256d3724c6100, type: 3}
m_ShaderKeywords: _ZWRITE_ON
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 1998
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 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}
m_Floats:
- _Alpha: 1
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _EnableStereo: 1
- _Gamma: 1
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _TintColor: {r: 1, g: 1, b: 1, a: 1}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e5462914f0e0ad646bd4fdabf728279c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,77 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Red
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _EMISSION
m_LightmapFlags: 0
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 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}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 0.033018887, b: 0.033018887, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0066bacc1d5fc4644948eaee1f667052
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,78 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UIPanelMat
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 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}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0
- _GlossyReflections: 1
- _Metallic: 0.659
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0.11764707, g: 0.1254902, b: 0.13333334, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3252edf2caa714746bfd24cc09c37a6a
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 17be7170607133a44aa2f5dc5a8d942d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,119 @@
fileFormatVersion: 2
guid: 80e6035dc653427458a8ff49ad454eee
ModelImporter:
serializedVersion: 23
fileIDToRecycleName:
100000: anchor
100002: //RootNode
100004: ForwardAxis
100006: rightAxis
100008: UpAxis
400000: anchor
400002: //RootNode
400004: ForwardAxis
400006: rightAxis
400008: UpAxis
2100000: ui_bright
2100002: ui_dark
2100004: blu
2100006: red
2100008: green
2300000: anchor
2300002: ForwardAxis
2300004: rightAxis
2300006: UpAxis
3300000: anchor
3300002: ForwardAxis
3300004: rightAxis
3300006: UpAxis
4300000: anchor
4300002: UpAxis
4300004: ForwardAxis
4300006: rightAxis
9500000: //RootNode
externalObjects: {}
materials:
importMaterials: 1
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 0
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
optimizeMeshForGPU: 1
keepQuads: 0
weldVertices: 1
preserveHierarchy: 0
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVPackMargin: 4
useFileScale: 1
previousCalculatedGlobalScale: 0.01
hasPreviousCalculatedGlobalScale: 1
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
importAnimation: 1
copyAvatar: 0
humanDescription:
serializedVersion: 2
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
animationType: 2
humanoidOversampling: 1
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 38433a3a0a02b054ba5252c8fbfc578f
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: bfee9d7faddbe8d40b04d370732cdb52
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: cbd6efbdc5102a044bf11631bfccb0c1
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 02e9a487018db0844a1995bc65a47c27
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,350 @@
// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
using System;
using System.Collections;
using UnityEngine;
using TMPro;
using UnityEngine.UI;
using System.Collections.Generic;
using UnityEngine.Serialization;
using System.Text;
/// <summary>
/// Specific functionality for spawned anchors
/// </summary>
[RequireComponent(typeof(OVRSpatialAnchor))]
public class Anchor : MonoBehaviour
{
public const string NumUuidsPlayerPref = "numUuids";
[SerializeField, FormerlySerializedAs("canvas_")]
private Canvas _canvas;
[SerializeField, FormerlySerializedAs("pivot_")]
private Transform _pivot;
[SerializeField, FormerlySerializedAs("anchorMenu_")]
private GameObject _anchorMenu;
private bool _isSelected;
private bool _isHovered;
[SerializeField, FormerlySerializedAs("anchorName_")]
private TextMeshProUGUI _anchorName;
[SerializeField, FormerlySerializedAs("saveIcon_")]
private GameObject _saveIcon;
[SerializeField, FormerlySerializedAs("labelImage_")]
private Image _labelImage;
[SerializeField, FormerlySerializedAs("labelBaseColor_")]
private Color _labelBaseColor;
[SerializeField, FormerlySerializedAs("labelHighlightColor_")]
private Color _labelHighlightColor;
[SerializeField, FormerlySerializedAs("labelSelectedColor_")]
private Color _labelSelectedColor;
[SerializeField, FormerlySerializedAs("uiManager_")]
private AnchorUIManager _uiManager;
[SerializeField, FormerlySerializedAs("renderers_")]
private MeshRenderer[] _renderers;
private int _menuIndex = 0;
[SerializeField, FormerlySerializedAs("buttonList_")]
private List<Button> _buttonList;
private Button _selectedButton;
private OVRSpatialAnchor _spatialAnchor;
private GameObject _icon;
#region Monobehaviour Methods
private void Awake()
{
_anchorMenu.SetActive(false);
_renderers = GetComponentsInChildren<MeshRenderer>();
_canvas.worldCamera = Camera.main;
_selectedButton = _buttonList[0];
_selectedButton.OnSelect(null);
_spatialAnchor = GetComponent<OVRSpatialAnchor>();
_icon = GetComponent<Transform>().FindChildRecursive("Sphere").gameObject;
}
static string ConvertUuidToString(System.Guid guid)
{
var value = guid.ToByteArray();
StringBuilder hex = new StringBuilder(value.Length * 2 + 4);
for (int ii = 0; ii < value.Length; ++ii)
{
if (3 < ii && ii < 11 && ii % 2 == 0)
{
hex.Append("-");
}
hex.AppendFormat("{0:x2}", value[ii]);
}
return hex.ToString();
}
private IEnumerator Start()
{
while (_spatialAnchor && !_spatialAnchor.Created)
{
yield return null;
}
if (_spatialAnchor)
{
_anchorName.text = ConvertUuidToString(_spatialAnchor.Uuid);
}
else
{
// Creation must have failed
Destroy(gameObject);
}
}
private void Update()
{
// Billboard the boundary
BillboardPanel(_canvas.transform);
// Billboard the menu
BillboardPanel(_pivot);
HandleMenuNavigation();
//Billboard the icon
BillboardPanel(_icon.transform);
}
#endregion // MonoBehaviour Methods
#region UI Event Listeners
/// <summary>
/// UI callback for the anchor menu's Save button
/// </summary>
public void OnSaveLocalButtonPressed()
{
if (!_spatialAnchor) return;
_spatialAnchor.Save((anchor, success) =>
{
if (!success) return;
// Enables save icon on the menu
ShowSaveIcon = true;
SaveUuidToPlayerPrefs(anchor.Uuid);
});
}
void SaveUuidToPlayerPrefs(Guid uuid)
{
// Write uuid of saved anchor to file
if (!PlayerPrefs.HasKey(NumUuidsPlayerPref))
{
PlayerPrefs.SetInt(NumUuidsPlayerPref, 0);
}
int playerNumUuids = PlayerPrefs.GetInt(NumUuidsPlayerPref);
PlayerPrefs.SetString("uuid" + playerNumUuids, uuid.ToString());
PlayerPrefs.SetInt(NumUuidsPlayerPref, ++playerNumUuids);
}
/// <summary>
/// UI callback for the anchor menu's Hide button
/// </summary>
public void OnHideButtonPressed()
{
Destroy(gameObject);
}
/// <summary>
/// UI callback for the anchor menu's Erase button
/// </summary>
public void OnEraseButtonPressed()
{
if (!_spatialAnchor) return;
_spatialAnchor.Erase((anchor, success) =>
{
if (success)
{
_saveIcon.SetActive(false);
}
});
}
#endregion // UI Event Listeners
#region Public Methods
public bool ShowSaveIcon
{
set => _saveIcon.SetActive(value);
}
/// <summary>
/// Handles interaction when anchor is hovered
/// </summary>
public void OnHoverStart()
{
if (_isHovered)
{
return;
}
_isHovered = true;
// Yellow highlight
foreach (MeshRenderer renderer in _renderers)
{
renderer.material.SetColor("_EmissionColor", Color.yellow);
}
_labelImage.color = _labelHighlightColor;
}
/// <summary>
/// Handles interaction when anchor is no longer hovered
/// </summary>
public void OnHoverEnd()
{
if (!_isHovered)
{
return;
}
_isHovered = false;
// Go back to normal
foreach (MeshRenderer renderer in _renderers)
{
renderer.material.SetColor("_EmissionColor", Color.clear);
}
if (_isSelected)
{
_labelImage.color = _labelSelectedColor;
}
else
{
_labelImage.color = _labelBaseColor;
}
}
/// <summary>
/// Handles interaction when anchor is selected
/// </summary>
public void OnSelect()
{
if (_isSelected)
{
// Hide Anchor menu on deselect
_anchorMenu.SetActive(false);
_isSelected = false;
_selectedButton = null;
if (_isHovered)
{
_labelImage.color = _labelHighlightColor;
}
else
{
_labelImage.color = _labelBaseColor;
}
}
else
{
// Show Anchor Menu on select
_anchorMenu.SetActive(true);
_isSelected = true;
_menuIndex = -1;
NavigateToIndexInMenu(true);
if (_isHovered)
{
_labelImage.color = _labelHighlightColor;
}
else
{
_labelImage.color = _labelSelectedColor;
}
}
}
#endregion // Public Methods
#region Private Methods
private void BillboardPanel(Transform panel)
{
// The z axis of the panel faces away from the side that is rendered, therefore this code is actually looking away from the camera
panel.LookAt(
new Vector3(panel.position.x * 2 - Camera.main.transform.position.x,
panel.position.y * 2 - Camera.main.transform.position.y,
panel.position.z * 2 - Camera.main.transform.position.z), Vector3.up);
}
private void HandleMenuNavigation()
{
if (!_isSelected)
{
return;
}
if (OVRInput.GetDown(OVRInput.RawButton.RThumbstickUp))
{
NavigateToIndexInMenu(false);
}
if (OVRInput.GetDown(OVRInput.RawButton.RThumbstickDown))
{
NavigateToIndexInMenu(true);
}
if (OVRInput.GetDown(OVRInput.RawButton.RIndexTrigger))
{
_selectedButton.OnSubmit(null);
}
}
private void NavigateToIndexInMenu(bool moveNext)
{
if (moveNext)
{
_menuIndex++;
if (_menuIndex > _buttonList.Count - 1)
{
_menuIndex = 0;
}
}
else
{
_menuIndex--;
if (_menuIndex < 0)
{
_menuIndex = _buttonList.Count - 1;
}
}
if (_selectedButton)
{
_selectedButton.OnDeselect(null);
}
_selectedButton = _buttonList[_menuIndex];
_selectedButton.OnSelect(null);
}
#endregion // Private Methods
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 41d1cb331bd351f4d967860f51af129e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,3 @@
namespace Oculus.Deprecated
{
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0add13ce028c7d94c9a6ef8369573e0b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,3 @@
namespace Oculus.Deprecated
{
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 41eaaa4b02ccec843a6585b66e32ff1c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,3 @@
namespace Oculus.Deprecated
{
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: eb5a075e3decb0d49a881c4b110ec41b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,348 @@
// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Serialization;
using UnityEngine.UI;
/// <summary>
/// Manages UI of anchor sample.
/// </summary>
[RequireComponent(typeof(SpatialAnchorLoader))]
public class AnchorUIManager : MonoBehaviour
{
/// <summary>
/// Anchor UI manager singleton instance
/// </summary>
public static AnchorUIManager Instance;
/// <summary>
/// Anchor Mode switches between create and select
/// </summary>
public enum AnchorMode
{
Create,
Select
};
[SerializeField, FormerlySerializedAs("createModeButton_")]
private GameObject _createModeButton;
[SerializeField, FormerlySerializedAs("selectModeButton_")]
private GameObject _selectModeButton;
[SerializeField, FormerlySerializedAs("trackedDevice_")]
private Transform _trackedDevice;
private Transform _raycastOrigin;
private bool _drawRaycast = false;
[SerializeField, FormerlySerializedAs("lineRenderer_")]
private LineRenderer _lineRenderer;
private Anchor _hoveredAnchor;
private Anchor _selectedAnchor;
private AnchorMode _mode = AnchorMode.Select;
[SerializeField, FormerlySerializedAs("buttonList_")]
private List<Button> _buttonList;
private int _menuIndex = 0;
private Button _selectedButton;
[SerializeField]
private Anchor _anchorPrefab;
public Anchor AnchorPrefab => _anchorPrefab;
[SerializeField, FormerlySerializedAs("placementPreview_")]
private GameObject _placementPreview;
[SerializeField, FormerlySerializedAs("anchorPlacementTransform_")]
private Transform _anchorPlacementTransform;
private delegate void PrimaryPressDelegate();
private PrimaryPressDelegate _primaryPressDelegate;
private bool _isFocused = true;
#region Monobehaviour Methods
private void Awake()
{
if (Instance == null)
{
Instance = this;
}
else
{
Destroy(this);
}
}
private void Start()
{
_raycastOrigin = _trackedDevice;
// Start in select mode
_mode = AnchorMode.Select;
StartSelectMode();
_menuIndex = 0;
_selectedButton = _buttonList[0];
_selectedButton.OnSelect(null);
_lineRenderer.startWidth = 0.005f;
_lineRenderer.endWidth = 0.005f;
}
private void Update()
{
if (_drawRaycast)
{
ControllerRaycast();
}
if (_selectedAnchor == null)
{
// Refocus menu
_selectedButton.OnSelect(null);
_isFocused = true;
}
HandleMenuNavigation();
if (OVRInput.GetDown(OVRInput.RawButton.A))
{
_primaryPressDelegate?.Invoke();
}
}
#endregion // Monobehaviour Methods
#region Menu UI Callbacks
/// <summary>
/// Create mode button pressed UI callback. Referenced by the Create button in the menu.
/// </summary>
public void OnCreateModeButtonPressed()
{
ToggleCreateMode();
_createModeButton.SetActive(!_createModeButton.activeSelf);
_selectModeButton.SetActive(!_selectModeButton.activeSelf);
}
/// <summary>
/// Load anchors button pressed UI callback. Referenced by the Load Anchors button in the menu.
/// </summary>
public void OnLoadAnchorsButtonPressed()
{
GetComponent<SpatialAnchorLoader>().LoadAnchorsByUuid();
}
#endregion // Menu UI Callbacks
#region Mode Handling
private void ToggleCreateMode()
{
if (_mode == AnchorMode.Select)
{
_mode = AnchorMode.Create;
EndSelectMode();
StartPlacementMode();
}
else
{
_mode = AnchorMode.Select;
EndPlacementMode();
StartSelectMode();
}
}
private void StartPlacementMode()
{
ShowAnchorPreview();
_primaryPressDelegate = PlaceAnchor;
}
private void EndPlacementMode()
{
HideAnchorPreview();
_primaryPressDelegate = null;
}
private void StartSelectMode()
{
ShowRaycastLine();
_primaryPressDelegate = SelectAnchor;
}
private void EndSelectMode()
{
HideRaycastLine();
_primaryPressDelegate = null;
}
#endregion // Mode Handling
#region Private Methods
private void HandleMenuNavigation()
{
if (!_isFocused)
{
return;
}
if (OVRInput.GetDown(OVRInput.RawButton.RThumbstickUp))
{
NavigateToIndexInMenu(false);
}
if (OVRInput.GetDown(OVRInput.RawButton.RThumbstickDown))
{
NavigateToIndexInMenu(true);
}
if (OVRInput.GetDown(OVRInput.RawButton.RIndexTrigger))
{
_selectedButton.OnSubmit(null);
}
}
private void NavigateToIndexInMenu(bool moveNext)
{
if (moveNext)
{
_menuIndex++;
if (_menuIndex > _buttonList.Count - 1)
{
_menuIndex = 0;
}
}
else
{
_menuIndex--;
if (_menuIndex < 0)
{
_menuIndex = _buttonList.Count - 1;
}
}
_selectedButton.OnDeselect(null);
_selectedButton = _buttonList[_menuIndex];
_selectedButton.OnSelect(null);
}
private void ShowAnchorPreview()
{
_placementPreview.SetActive(true);
}
private void HideAnchorPreview()
{
_placementPreview.SetActive(false);
}
private void PlaceAnchor()
{
Instantiate(_anchorPrefab, _anchorPlacementTransform.position, _anchorPlacementTransform.rotation);
}
private void ShowRaycastLine()
{
_drawRaycast = true;
_lineRenderer.gameObject.SetActive(true);
}
private void HideRaycastLine()
{
_drawRaycast = false;
_lineRenderer.gameObject.SetActive(false);
}
private void ControllerRaycast()
{
Ray ray = new Ray(_raycastOrigin.position, _raycastOrigin.TransformDirection(Vector3.forward));
_lineRenderer.SetPosition(0, _raycastOrigin.position);
_lineRenderer.SetPosition(1,
_raycastOrigin.position + _raycastOrigin.TransformDirection(Vector3.forward) * 10f);
RaycastHit hit;
if (Physics.Raycast(ray, out hit, Mathf.Infinity))
{
Anchor anchorObject = hit.collider.GetComponent<Anchor>();
if (anchorObject != null)
{
_lineRenderer.SetPosition(1, hit.point);
HoverAnchor(anchorObject);
return;
}
}
UnhoverAnchor();
}
private void HoverAnchor(Anchor anchor)
{
_hoveredAnchor = anchor;
_hoveredAnchor.OnHoverStart();
}
private void UnhoverAnchor()
{
if (_hoveredAnchor == null)
{
return;
}
_hoveredAnchor.OnHoverEnd();
_hoveredAnchor = null;
}
private void SelectAnchor()
{
if (_hoveredAnchor != null)
{
if (_selectedAnchor != null)
{
// Deselect previous Anchor
_selectedAnchor.OnSelect();
_selectedAnchor = null;
}
// Select new Anchor
_selectedAnchor = _hoveredAnchor;
_selectedAnchor.OnSelect();
// Defocus menu
_selectedButton.OnDeselect(null);
_isFocused = false;
}
else
{
if (_selectedAnchor != null)
{
// Deselect previous Anchor
_selectedAnchor.OnSelect();
_selectedAnchor = null;
// Refocus menu
_selectedButton.OnSelect(null);
_isFocused = true;
}
}
}
#endregion // Private Methods
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9735d0f6df960334585926b5295e7d18
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,101 @@
// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
using System;
using UnityEngine;
/// <summary>
/// Demonstrates loading existing spatial anchors from storage.
/// </summary>
/// <remarks>
/// Loading existing anchors involves two asynchronous methods:
/// 1. Call <see cref="OVRSpatialAnchor.LoadUnboundAnchors"/>
/// 2. For each unbound anchor you wish to localize, invoke <see cref="OVRSpatialAnchor.UnboundAnchor.Localize"/>.
/// 3. Once localized, your callback will receive an <see cref="OVRSpatialAnchor.UnboundAnchor"/>. Instantiate an
/// <see cref="OVRSpatialAnchor"/> component and bind it to the `UnboundAnchor` by calling
/// <see cref="OVRSpatialAnchor.UnboundAnchor.BindTo"/>.
/// </remarks>
public class SpatialAnchorLoader : MonoBehaviour
{
[SerializeField]
OVRSpatialAnchor _anchorPrefab;
Action<OVRSpatialAnchor.UnboundAnchor, bool> _onLoadAnchor;
public void LoadAnchorsByUuid()
{
// Get number of saved anchor uuids
if (!PlayerPrefs.HasKey(Anchor.NumUuidsPlayerPref))
{
PlayerPrefs.SetInt(Anchor.NumUuidsPlayerPref, 0);
}
var playerUuidCount = PlayerPrefs.GetInt(Anchor.NumUuidsPlayerPref);
Log($"Attempting to load {playerUuidCount} saved anchors.");
if (playerUuidCount == 0)
return;
var uuids = new Guid[playerUuidCount];
for (int i = 0; i < playerUuidCount; ++i)
{
var uuidKey = "uuid" + i;
var currentUuid = PlayerPrefs.GetString(uuidKey);
Log("QueryAnchorByUuid: " + currentUuid);
uuids[i] = new Guid(currentUuid);
}
Load(new OVRSpatialAnchor.LoadOptions
{
Timeout = 0,
StorageLocation = OVRSpace.StorageLocation.Local,
Uuids = uuids
});
}
private void Awake()
{
_onLoadAnchor = OnLocalized;
}
private void Load(OVRSpatialAnchor.LoadOptions options) => OVRSpatialAnchor.LoadUnboundAnchors(options, anchors =>
{
if (anchors == null)
{
Log("Query failed.");
return;
}
foreach (var anchor in anchors)
{
if (anchor.Localized)
{
_onLoadAnchor(anchor, true);
}
else if (!anchor.Localizing)
{
anchor.Localize(_onLoadAnchor);
}
}
});
private void OnLocalized(OVRSpatialAnchor.UnboundAnchor unboundAnchor, bool success)
{
if (!success)
{
Log($"{unboundAnchor} Localization failed!");
return;
}
var pose = unboundAnchor.Pose;
var spatialAnchor = Instantiate(_anchorPrefab, pose.position, pose.rotation);
unboundAnchor.BindTo(spatialAnchor);
if (spatialAnchor.TryGetComponent<Anchor>(out var anchor))
{
// We just loaded it, so we know it exists in persistent storage.
anchor.ShowSaveIcon = true;
}
}
private static void Log(string message) => Debug.Log($"[SpatialAnchorsUnity]: {message}");
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 432567d157dd9b1478a34a3d58ae077c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,3 @@
namespace Oculus.Deprecated
{
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: aed24f56a57860947a021f1c69dcbb19
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 02ef9c7f02cc03a468df7f83d4a59b76
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.