Doorframe added - no peeking through hole yet :(

marcgauch 2023-12-15 21:04:52 +01:00
parent 7e3d43fd19
commit aa41a3c35c
414 changed files with 2503 additions and 7 deletions

8
Assets/Environment.meta Normal file
View File

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

View File

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

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: cb9041f474a9d52b99214d5b38b60842
folderAsset: yes
DefaultImporter:
externalObjects: {}
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: WoodDefault
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: 0, 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: 0.2, y: 1}
m_Offset: {x: 0.3, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: 445676a944b777b4fb0a6de641e0904e, type: 3}
m_Scale: {x: 0.2, y: 1}
m_Offset: {x: 0.3, 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
- _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}
m_BuildTextureStacks: []

View File

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

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 KiB

View File

@ -0,0 +1,96 @@
fileFormatVersion: 2
guid: 445676a944b777b4fb0a6de641e0904e
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

8
Assets/MultiToy.meta Normal file
View File

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

View File

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

View File

@ -0,0 +1,60 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
* All rights reserved.
*
* Licensed under the Oculus SDK License Agreement (the "License");
* you may not use the Oculus SDK except in compliance with the License,
* which is provided at the time of installation or download, or which
* otherwise accompanies this software in either electronic or hard copy form.
*
* You may obtain a copy of the License at
*
* https://developer.oculus.com/licenses/oculussdk/
*
* Unless required by applicable law or agreed to in writing, the Oculus SDK
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Shader "TheWorldBeyond/DepthOnly" {
Properties {
}
SubShader {
Tags{"RenderType" = "Transparent"} LOD 100
// First Pass: render outside shell of hand, as depth object
Pass {
ColorMask 0 Blend SrcAlpha OneMinusSrcAlpha CGPROGRAM
#pragma vertex vert
#pragma fragment frag
// make fog work
#pragma multi_compile_fog
#include "UnityCG.cginc"
struct appdata {
float4 vertex : POSITION;
};
struct v2f {
UNITY_FOG_COORDS(1)
float4 vertex : SV_POSITION;
};
v2f vert(appdata v) {
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
UNITY_TRANSFER_FOG(o, o.vertex);
return o;
}
fixed4 frag(v2f i) : SV_Target {
//clip(mask.r - 0.5);
return float4(0,0,0,0);
}
ENDCG
}
}
}

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 5503f53848f6a474590eee706a3cdfc0
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:

8
Assets/SampleAssets.meta Normal file
View File

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

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 KiB

View File

@ -0,0 +1,98 @@
fileFormatVersion: 2
guid: a5a259446533d16419fa0d43c95aac8c
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@ -0,0 +1,98 @@
fileFormatVersion: 2
guid: 3cbf237e8407b4140b0acb352d76a9e0
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 676 KiB

View File

@ -0,0 +1,98 @@
fileFormatVersion: 2
guid: 8356ed00494120a4c91db393fe73b5e8
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 0
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 1
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,126 @@
%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: WoodenDoor
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _ALPHATEST_ON _METALLICGLOSSMAP _NORMALMAP
m_LightmapFlags: 6
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 1
m_CustomRenderQueue: 2450
stringTagMap:
RenderType: TransparentCutout
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 2800000, guid: a5a259446533d16419fa0d43c95aac8c, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 2800000, guid: 8356ed00494120a4c91db393fe73b5e8, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: a5a259446533d16419fa0d43c95aac8c, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 2800000, guid: 3cbf237e8407b4140b0acb352d76a9e0, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _AlphaClip: 1
- _Blend: 0
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 0
- _Cutoff: 0.6
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 0.84
- _Glossiness: 0
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 1
- _OcclusionStrength: 1
- _Parallax: 0.02
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 1
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Surface: 0
- _UVSec: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
--- !u!114 &7134288276288446231
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: 5

View File

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

Binary file not shown.

View File

@ -0,0 +1,107 @@
fileFormatVersion: 2
guid: a6f477e205b263442ab640d944ccc0bf
ModelImporter:
serializedVersion: 20200
internalIDToNameTable: []
externalObjects:
- first:
type: UnityEngine:Material
assembly: UnityEngine.CoreModule
name: WoodenDoor
second: {fileID: 2100000, guid: f533c2041ded8f745987b3813b597c63, type: 2}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
referencedClips: []
importAnimation: 1
humanDescription:
serializedVersion: 3
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
globalScale: 1
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
autoGenerateAvatarMappingIfUnspecified: 1
animationType: 2
humanoidOversampling: 1
avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,154 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &5851587379785867944
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5851587379785867947}
m_Layer: 0
m_Name: Pivot
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5851587379785867947
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5851587379785867944}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: -0.072, z: 0.005}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6250920163326946216}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &6770153141546365202
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6250920163326946216}
- component: {fileID: 6994197218746098701}
- component: {fileID: 5112876513816088775}
- component: {fileID: 5851587380371273081}
- component: {fileID: 5907767801389773114}
m_Layer: 0
m_Name: woodenDoor
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6250920163326946216
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6770153141546365202}
serializedVersion: 2
m_LocalRotation: {x: -0.00000008146035, y: 0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 5851587379785867947}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &6994197218746098701
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6770153141546365202}
m_Mesh: {fileID: 2619086233303812490, guid: a6f477e205b263442ab640d944ccc0bf, type: 3}
--- !u!23 &5112876513816088775
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6770153141546365202}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: f533c2041ded8f745987b3813b597c63, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!114 &5851587380371273081
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6770153141546365202}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 39b243a9b1035c94e9f75c4e11283893, type: 3}
m_Name:
m_EditorClassIdentifier:
ScalingX: 0
PaddingX: 0
PaddingXMax: 0
ScalingY: 0
PaddingY: 0
PaddingYMax: 0
ScalingZ: 3
PaddingZ: 0
PaddingZMax: 0
_pivotTransform: {fileID: 5851587379785867947}
--- !u!114 &5907767801389773114
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6770153141546365202}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a48b1ff00ac4da5a89f220d6bb52400b, type: 3}
m_Name:
m_EditorClassIdentifier:
dimensionPadding: {x: 0.26, y: 0.2, z: 0}

View File

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

View File

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

View File

@ -0,0 +1,564 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4350422998566360405
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 670190173264333139}
- component: {fileID: 102490448831091297}
m_Layer: 9
m_Name: VirtualDoor
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &670190173264333139
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4350422998566360405}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 4300361411138007567}
- {fileID: 2254094838793822308}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &102490448831091297
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4350422998566360405}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8ab3ec25e32ce0c4380714d75e39cb05, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &5210420177463922023
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2254094838793822308}
m_Layer: 9
m_Name: Frame
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2254094838793822308
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5210420177463922023}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 5179997299626413875}
- {fileID: 6403568453869614007}
- {fileID: 7824025505715048045}
- {fileID: 6781042694564301543}
m_Father: {fileID: 670190173264333139}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &5382722647332067511
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5179997299626413875}
- component: {fileID: 3889149280781031042}
- component: {fileID: 1204458581578236672}
m_Layer: 0
m_Name: FloorFade
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5179997299626413875
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5382722647332067511}
serializedVersion: 2
m_LocalRotation: {x: 0.7070457, y: -0, z: -0, w: 0.707168}
m_LocalPosition: {x: 0, y: -0.466, z: 0.232}
m_LocalScale: {x: 1.2694, y: 0.5, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2254094838793822308}
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!33 &3889149280781031042
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5382722647332067511}
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &1204458581578236672
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5382722647332067511}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 63aecff510df543d0b1012291f4c2828, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &6582028934885393355
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6781042694564301543}
- component: {fileID: 2558904432892420134}
- component: {fileID: 3384261006988491839}
- component: {fileID: 3965947921762148040}
m_Layer: 0
m_Name: Cube (2)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!4 &6781042694564301543
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6582028934885393355}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0.7071068, w: -0.7071068}
m_LocalPosition: {x: 0, y: 0.55, z: -0.02}
m_LocalScale: {x: 0.10000001, y: 1.2499999, z: 0.12000003}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2254094838793822308}
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 90}
--- !u!33 &2558904432892420134
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6582028934885393355}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &3384261006988491839
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6582028934885393355}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: de24ca2ab57184b92a0a60b7dae403df, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!65 &3965947921762148040
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6582028934885393355}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &6733509573060874094
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4300361411138007567}
- component: {fileID: 56595018460018838}
- component: {fileID: 5168781885901884559}
m_Layer: 0
m_Name: DepthOccluder
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4300361411138007567
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6733509573060874094}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 1, z: 0, w: 0}
m_LocalPosition: {x: 0, y: 0, z: 0.02}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 670190173264333139}
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}
--- !u!33 &56595018460018838
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6733509573060874094}
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &5168781885901884559
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6733509573060874094}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 792587fe8ae364266b7774b781495242, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &8344869181022216833
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7824025505715048045}
- component: {fileID: 8144164036281908609}
- component: {fileID: 6875276624439050383}
- component: {fileID: 1907062995798060362}
m_Layer: 0
m_Name: Cube (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!4 &7824025505715048045
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8344869181022216833}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.55, y: 0, z: -0.02}
m_LocalScale: {x: 0.1, y: 1, z: 0.1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2254094838793822308}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &8144164036281908609
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8344869181022216833}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &6875276624439050383
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8344869181022216833}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: de24ca2ab57184b92a0a60b7dae403df, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!65 &1907062995798060362
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8344869181022216833}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &8698999019212160965
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6403568453869614007}
- component: {fileID: 8912151316422240320}
- component: {fileID: 9208325784631691718}
- component: {fileID: 6935143110281172229}
m_Layer: 0
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!4 &6403568453869614007
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8698999019212160965}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0.55, y: 0, z: -0.02}
m_LocalScale: {x: 0.1, y: 1, z: 0.1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2254094838793822308}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &8912151316422240320
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8698999019212160965}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &9208325784631691718
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8698999019212160965}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: de24ca2ab57184b92a0a60b7dae403df, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!65 &6935143110281172229
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8698999019212160965}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}

View File

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

View File

@ -3604,11 +3604,57 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 241809610} m_Father: {fileID: 241809610}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &782628375
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 782628378}
- component: {fileID: 782628377}
m_Layer: 0
m_Name: World
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &782628376 stripped --- !u!4 &782628376 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: 4453513310108136, guid: 835e735ca71bf78459fb2cababd74112, type: 3} m_CorrespondingSourceObject: {fileID: 4453513310108136, guid: 835e735ca71bf78459fb2cababd74112, type: 3}
m_PrefabInstance: {fileID: 1939419979} m_PrefabInstance: {fileID: 1939419979}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!114 &782628377
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 782628375}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 74eeb9aab72ea70ca8b5b378c35b7ef4, type: 3}
m_Name:
m_EditorClassIdentifier:
_sceneManager: {fileID: 1782670464}
_doorPrefab: {fileID: 5851587380371273081, guid: f51945cfbba19ea45a193b1ef476b7f2, type: 3}
--- !u!4 &782628378
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 782628375}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -1.3995762, y: 0.22418404, z: 4.471058}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &791046371 --- !u!1001 &791046371
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -6365,7 +6411,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 747806495401477012, guid: c813208e672e3074bbe118e1a9ee94fd, type: 3} - target: {fileID: 747806495401477012, guid: c813208e672e3074bbe118e1a9ee94fd, type: 3}
propertyPath: PrefabOverrides.Array.size propertyPath: PrefabOverrides.Array.size
value: 5 value: 6
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 747806495401477012, guid: c813208e672e3074bbe118e1a9ee94fd, type: 3} - target: {fileID: 747806495401477012, guid: c813208e672e3074bbe118e1a9ee94fd, type: 3}
propertyPath: PrefabOverrides.Array.data[0].Prefab propertyPath: PrefabOverrides.Array.data[0].Prefab
@ -6386,11 +6432,11 @@ PrefabInstance:
- target: {fileID: 747806495401477012, guid: c813208e672e3074bbe118e1a9ee94fd, type: 3} - target: {fileID: 747806495401477012, guid: c813208e672e3074bbe118e1a9ee94fd, type: 3}
propertyPath: PrefabOverrides.Array.data[4].Prefab propertyPath: PrefabOverrides.Array.data[4].Prefab
value: value:
objectReference: {fileID: 3685766024578757413, guid: 5af880326f63b099fa3411bbb738df9f, type: 3} objectReference: {fileID: 3685766024578757413, guid: 00f12700905120bd8a9ac57cf4832751, type: 3}
- target: {fileID: 747806495401477012, guid: c813208e672e3074bbe118e1a9ee94fd, type: 3} - target: {fileID: 747806495401477012, guid: c813208e672e3074bbe118e1a9ee94fd, type: 3}
propertyPath: PrefabOverrides.Array.data[5].Prefab propertyPath: PrefabOverrides.Array.data[5].Prefab
value: value:
objectReference: {fileID: 3685766024578757413, guid: 00f12700905120bd8a9ac57cf4832751, type: 3} objectReference: {fileID: 102490448831091297, guid: 1c364474c162a4787ac58cb716b754d3, type: 3}
- target: {fileID: 747806495401477012, guid: c813208e672e3074bbe118e1a9ee94fd, type: 3} - target: {fileID: 747806495401477012, guid: c813208e672e3074bbe118e1a9ee94fd, type: 3}
propertyPath: PrefabOverrides.Array.data[0].ClassificationLabel propertyPath: PrefabOverrides.Array.data[0].ClassificationLabel
value: FLOOR value: FLOOR
@ -6413,7 +6459,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 747806495401477012, guid: c813208e672e3074bbe118e1a9ee94fd, type: 3} - target: {fileID: 747806495401477012, guid: c813208e672e3074bbe118e1a9ee94fd, type: 3}
propertyPath: PrefabOverrides.Array.data[5].ClassificationLabel propertyPath: PrefabOverrides.Array.data[5].ClassificationLabel
value: WALL_FACE value: DOOR_FRAME
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 747806495401477012, guid: c813208e672e3074bbe118e1a9ee94fd, type: 3} - target: {fileID: 747806495401477012, guid: c813208e672e3074bbe118e1a9ee94fd, type: 3}
propertyPath: PrefabOverrides.Array.data[0]._editorClassificationIndex propertyPath: PrefabOverrides.Array.data[0]._editorClassificationIndex
@ -6437,7 +6483,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 747806495401477012, guid: c813208e672e3074bbe118e1a9ee94fd, type: 3} - target: {fileID: 747806495401477012, guid: c813208e672e3074bbe118e1a9ee94fd, type: 3}
propertyPath: PrefabOverrides.Array.data[5]._editorClassificationIndex propertyPath: PrefabOverrides.Array.data[5]._editorClassificationIndex
value: 2 value: 5
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 747806495401477014, guid: c813208e672e3074bbe118e1a9ee94fd, type: 3} - target: {fileID: 747806495401477014, guid: c813208e672e3074bbe118e1a9ee94fd, type: 3}
propertyPath: m_Name propertyPath: m_Name
@ -7129,6 +7175,17 @@ PrefabInstance:
m_AddedGameObjects: [] m_AddedGameObjects: []
m_AddedComponents: [] m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2e0c303eba3dd9ff98017eff31e6159f, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 2e0c303eba3dd9ff98017eff31e6159f, type: 3}
--- !u!114 &1782670464 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 747806495401477012, guid: c813208e672e3074bbe118e1a9ee94fd, type: 3}
m_PrefabInstance: {fileID: 1503720117}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f2253d75e3ddc644b8153409c62dd74e, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1793346144 --- !u!1 &1793346144
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -8314,10 +8371,10 @@ AudioSource:
SceneRoots: SceneRoots:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_Roots: m_Roots:
- {fileID: 223974229}
- {fileID: 1503720117} - {fileID: 1503720117}
- {fileID: 1467388725}
- {fileID: 1368183232} - {fileID: 1368183232}
- {fileID: 223974229}
- {fileID: 1467388725}
- {fileID: 1729297213} - {fileID: 1729297213}
- {fileID: 2106522548} - {fileID: 2106522548}
- {fileID: 335587134} - {fileID: 335587134}
@ -8332,3 +8389,4 @@ SceneRoots:
- {fileID: 791046371} - {fileID: 791046371}
- {fileID: 1313920920} - {fileID: 1313920920}
- {fileID: 2055102416} - {fileID: 2055102416}
- {fileID: 782628378}

8
Assets/Scripts.meta Normal file
View File

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

View File

@ -0,0 +1,26 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
* All rights reserved.
*
* Licensed under the Oculus SDK License Agreement (the "License");
* you may not use the Oculus SDK except in compliance with the License,
* which is provided at the time of installation or download, or which
* otherwise accompanies this software in either electronic or hard copy form.
*
* You may obtain a copy of the License at
*
* https://developer.oculus.com/licenses/oculussdk/
*
* Unless required by applicable law or agreed to in writing, the Oculus SDK
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using UnityEngine;
public class ResizablePadding : MonoBehaviour
{
public Vector3 dimensionPadding = Vector3.zero;
}

View File

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

View File

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

View File

@ -0,0 +1,140 @@
using System;
using UnityEngine;
[ExecuteInEditMode]
public class SimpleResizable : MonoBehaviour
{
public Vector3 PivotPosition => _pivotTransform.position; //Vector3.zero;
[Space(15)] public Method ScalingX;
[Range(0, 0.5f)] public float PaddingX;
[Range(-0.5f, 0)] public float PaddingXMax;
[Space(15)] public Method ScalingY;
[Range(0, 0.5f)] public float PaddingY;
[Range(-0.5f, 0)] public float PaddingYMax;
[Space(15)] public Method ScalingZ;
[Range(0, 0.5f)] public float PaddingZ;
[Range(-0.5f, 0)] public float PaddingZMax;
public enum Method
{
Adapt,
AdaptWithAsymmetricalPadding,
Scale,
None
}
public Vector3 NewSize {get; set; }
public Vector3 DefaultSize {get; private set; }
public Mesh Mesh { get; private set; }
private Bounds _bounds;
[SerializeField] private Transform _pivotTransform;
private void Awake()
{
Mesh = GetComponent<MeshFilter>().sharedMesh;
DefaultSize = Mesh.bounds.size;
if(!_pivotTransform)
_pivotTransform = transform.Find("Pivot");
}
#if UNITY_EDITOR
private void OnEnable()
{
DefaultSize = Mesh.bounds.size;
NewSize = DefaultSize;
}
private void OnDrawGizmos()
{
if (!_pivotTransform) return;
Gizmos.color = Color.red;
float lineSize = 0.1f;
Vector3 startX = _pivotTransform.position + Vector3.left * lineSize * 0.5f;
Vector3 startY = _pivotTransform.position + Vector3.down * lineSize * 0.5f;
Vector3 startZ = _pivotTransform.position + Vector3.back * lineSize * 0.5f;
Gizmos.DrawRay(startX, Vector3.right * lineSize);
Gizmos.DrawRay(startY, Vector3.up * lineSize);
Gizmos.DrawRay(startZ, Vector3.forward * lineSize);
}
void OnDrawGizmosSelected()
{
DefaultSize = Mesh.bounds.size;
if (GetComponent<MeshFilter>().sharedMesh == null)
{
// The furniture piece was not customized yet, nothing to do here
return;
}
_bounds = GetComponent<MeshFilter>().sharedMesh.bounds;
Gizmos.matrix = transform.localToWorldMatrix;
Vector3 newCenter = _bounds.center;
Gizmos.color = new Color(1, 0, 0, 0.5f);
switch (ScalingX)
{
case Method.Adapt:
Gizmos.DrawWireCube(newCenter, new Vector3(NewSize.x * PaddingX * 2, NewSize.y, NewSize.z));
break;
case Method.AdaptWithAsymmetricalPadding:
Gizmos.DrawWireCube(newCenter + new Vector3(
NewSize.x * PaddingX, 0, 0), new Vector3(0, NewSize.y, NewSize.z));
Gizmos.DrawWireCube(newCenter + new Vector3(
NewSize.x * PaddingXMax, 0, 0), new Vector3(0, NewSize.y, NewSize.z));
break;
case Method.None:
Gizmos.DrawWireCube(newCenter, NewSize);
break;
}
Gizmos.color = new Color(0, 1, 0, 0.5f);
switch (ScalingY)
{
case Method.Adapt:
Gizmos.DrawWireCube(newCenter, new Vector3(NewSize.x, NewSize.y * PaddingY * 2, NewSize.z));
break;
case Method.AdaptWithAsymmetricalPadding:
Gizmos.DrawWireCube(newCenter + new Vector3(0, NewSize.y * PaddingY, 0),
new Vector3(NewSize.x, 0, NewSize.z));
Gizmos.DrawWireCube(newCenter + new Vector3(0, NewSize.y * PaddingYMax, 0),
new Vector3(NewSize.x, 0, NewSize.z));
break;
case Method.None:
Gizmos.DrawWireCube(newCenter, NewSize);
break;
}
Gizmos.color = new Color(0, 0, 1, 0.5f);
switch (ScalingZ)
{
case Method.Adapt:
Gizmos.DrawWireCube(newCenter, new Vector3(NewSize.x, NewSize.y, NewSize.z * PaddingZ * 2));
break;
case Method.AdaptWithAsymmetricalPadding:
Gizmos.DrawWireCube(newCenter + new Vector3(0, 0, NewSize.z * PaddingZ),
new Vector3(NewSize.x, NewSize.y, 0));
Gizmos.DrawWireCube(newCenter + new Vector3(0, 0, NewSize.z * PaddingZMax),
new Vector3(NewSize.x, NewSize.y, 0));
break;
case Method.None:
Gizmos.DrawWireCube(newCenter, NewSize);
break;
}
Gizmos.color = new Color(0, 1, 1, 1);
Gizmos.DrawWireCube(newCenter, NewSize);
}
#endif
}

View File

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

View File

@ -0,0 +1,163 @@
using UnityEngine;
public class SimpleResizer
{
public void CreateResizedObject(Vector3 newSize, GameObject parent, SimpleResizable sourcePrefab)
{
MarcsWebLogger.Log($"CRO: 1");
var prefab = MonoBehaviour.Instantiate(sourcePrefab.gameObject, Vector3.zero, Quaternion.identity);
MarcsWebLogger.Log($"CRO: 2");
prefab.name = sourcePrefab.name;
var resizable = prefab.GetComponent<SimpleResizable>();
resizable.NewSize = newSize;
MarcsWebLogger.Log($"CRO: 3");
if (resizable == null)
{
Debug.LogError("Resizable component missing.");
return;
}
MarcsWebLogger.Log($"CRO: 4");
var resizedMesh = ProcessVertices(resizable, newSize);
MarcsWebLogger.Log($"CRO: 5");
MeshFilter mf = prefab.GetComponent<MeshFilter>();
mf.sharedMesh = resizedMesh;
MarcsWebLogger.Log($"CRO: 6");
mf.sharedMesh.RecalculateBounds();
MarcsWebLogger.Log($"CRO: 7");
// child it after creation so the bounds math plays nicely
prefab.transform.parent = parent.transform;
prefab.transform.localPosition = Vector3.zero;
prefab.transform.localRotation = Quaternion.identity;
MarcsWebLogger.Log($"CRO: 8");
// cleanup
MonoBehaviour.Destroy(resizable);
MarcsWebLogger.Log($"CRO: 9");
}
#region PRIVATE METHODS
private Mesh ProcessVertices(SimpleResizable resizable, Vector3 newSize)
{
MarcsWebLogger.Log($"PV: 1a");
Mesh originalMesh = resizable.Mesh;
MarcsWebLogger.Log($"PV: 1b");
Vector3 originalBounds = originalMesh.bounds.size;
MarcsWebLogger.Log($"PV: 1c");
// Force scaling if newSize is smaller than the original mesh
SimpleResizable.Method methodX = (originalBounds.x < newSize.x)
? resizable.ScalingX
: SimpleResizable.Method.Scale;
MarcsWebLogger.Log($"PV: 1d");
SimpleResizable.Method methodY = (originalBounds.y < newSize.y)
? resizable.ScalingY
: SimpleResizable.Method.Scale;
MarcsWebLogger.Log($"PV: 1e");
SimpleResizable.Method methodZ = (originalBounds.z < newSize.z)
? resizable.ScalingZ
: SimpleResizable.Method.Scale;
MarcsWebLogger.Log($"PV: 1f");
Vector3[] resizedVertices = originalMesh.vertices;
MarcsWebLogger.Log($"PV: 2");
float pivotX = (1 / resizable.DefaultSize.x) * resizable.PivotPosition.x;
float pivotY = (1 / resizable.DefaultSize.y) * resizable.PivotPosition.y;
float pivotZ = (1 / resizable.DefaultSize.z) * resizable.PivotPosition.z;
for (int i = 0; i < resizedVertices.Length; i++)
{
Vector3 vertexPosition = resizedVertices[i];
vertexPosition.x = CalculateNewVertexPosition(
methodX,
vertexPosition.x,
originalBounds.x,
newSize.x,
resizable.PaddingX,
resizable.PaddingXMax,
pivotX);
vertexPosition.y = CalculateNewVertexPosition(
methodY,
vertexPosition.y,
originalBounds.y,
newSize.y,
resizable.PaddingY,
resizable.PaddingYMax,
pivotY);
vertexPosition.z = CalculateNewVertexPosition(
methodZ,
vertexPosition.z,
originalBounds.z,
newSize.z,
resizable.PaddingZ,
resizable.PaddingZMax,
pivotZ);
resizedVertices[i] = vertexPosition;
}
MarcsWebLogger.Log($"PV: 4");
Mesh clonedMesh = MonoBehaviour.Instantiate(originalMesh);
clonedMesh.vertices = resizedVertices;
MarcsWebLogger.Log($"PV: 5");
return clonedMesh;
}
private float CalculateNewVertexPosition(
SimpleResizable.Method resizeMethod,
float currentPosition,
float currentSize,
float newSize,
float padding,
float paddingMax,
float pivot)
{
float resizedRatio = currentSize / 2
* (newSize / 2 * (1 / (currentSize / 2)))
- currentSize / 2;
switch (resizeMethod)
{
case SimpleResizable.Method.Adapt:
if (Mathf.Abs(currentPosition) >= padding)
currentPosition = resizedRatio * Mathf.Sign(currentPosition) + currentPosition;
break;
case SimpleResizable.Method.AdaptWithAsymmetricalPadding:
if (currentPosition >= padding)
currentPosition = resizedRatio * Mathf.Sign(currentPosition) + currentPosition;
if (currentPosition <= paddingMax)
currentPosition = resizedRatio * Mathf.Sign(currentPosition) + currentPosition;
break;
case SimpleResizable.Method.Scale:
currentPosition = newSize / (currentSize / currentPosition);
break;
case SimpleResizable.Method.None:
break;
}
float pivotPos = newSize * (-pivot);
currentPosition += pivotPos;
return currentPosition;
}
#endregion
}

View File

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

View File

@ -0,0 +1,90 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// HEAVILY INSPIRED by SampleVIrutalFrame.cs from the Unity TheWorldBeyond Project.
public class WorldScript : MonoBehaviour
{
public OVRSceneManager _sceneManager;
public SimpleResizable _doorPrefab;
void Awake()
{
#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN || UNITY_ANDROID
OVRManager.eyeFovPremultipliedAlphaModeEnabled = false;
#endif
_sceneManager.SceneModelLoadedSuccessfully += InitializeRoom;
}
void InitializeRoom()
{
MarcsWebLogger.Log("Wordscript initialize");
OVRSceneAnchor[] sceneAnchors = FindObjectsOfType<OVRSceneAnchor>();
MarcsWebLogger.Log($"found {sceneAnchors.Length} sceneAnchors");
if (sceneAnchors == null) return;
List<Transform> windows = new List<Transform>();
for (int i = 0; i < sceneAnchors.Length; i++)
{
OVRSceneAnchor instance = sceneAnchors[i];
OVRSemanticClassification classification = instance.GetComponent<OVRSemanticClassification>();
if (classification.Contains(OVRSceneManager.Classification.WallArt))
{
MarcsWebLogger.Log($"found a window at pos: {instance.transform.position}, rot: {instance.transform.rotation}");
}
else if (classification.Contains(OVRSceneManager.Classification.DoorFrame))
{
MarcsWebLogger.Log($"1 DOOR at pos: {instance.transform.position}, rot: {instance.transform.rotation}");
windows.Add(instance.transform);
MarcsWebLogger.Log($"2 DOOR at pos: {instance.transform.position}, rot: {instance.transform.rotation}");
SimpleResizer resizer = new SimpleResizer();
MarcsWebLogger.Log($"3 DOOR at pos: {instance.transform.position}, rot: {instance.transform.rotation}");
SimpleResizable prefab = classification.Contains(OVRSceneManager.Classification.DoorFrame) ? _doorPrefab : _doorPrefab;
MarcsWebLogger.Log($"4 DOOR at pos: {instance.transform.position}, rot: {instance.transform.rotation}");
Vector3 dimensions = instance.transform.GetChild(0).localScale;
// the Resizer scales the mesh so that the bounds are flush with the window extents
// in this case, we want the mesh frame to extend "outside" of the extents, so we adjust it
// as well, the vines on the door also require special treatment
MarcsWebLogger.Log($"5 DOOR at pos: {instance.transform.position}, rot: {instance.transform.rotation}");
if (prefab.GetComponent<ResizablePadding>())
{
MarcsWebLogger.Log($"6 DOOR at pos: {instance.transform.position}, rot: {instance.transform.rotation}");
dimensions += prefab.GetComponent<ResizablePadding>().dimensionPadding;
}
MarcsWebLogger.Log($"7 DOOR at pos: {instance.transform.position}, rot: {instance.transform.rotation}");
MarcsWebLogger.Log($"7 DOOR 0: {resizer == null}");
MarcsWebLogger.Log($"7 DOOR 1: {dimensions == null}");
MarcsWebLogger.Log($"7 DOOR 2: {sceneAnchors[i].gameObject == null}");
MarcsWebLogger.Log($"7 DOOR 3: {prefab == null}");
try
{
resizer.CreateResizedObject(dimensions, sceneAnchors[i].gameObject, prefab);
}
catch (Exception e)
{
MarcsWebLogger.Log(e.StackTrace.ToString().Substring(0, 200));
}
MarcsWebLogger.Log($"8 DOOR at pos: {instance.transform.position}, rot: {instance.transform.rotation}");
}
}
}
}

View File

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

8
Assets/Terrain.meta Normal file
View File

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

Some files were not shown because too many files have changed in this diff Show More