├── .gitignore ├── Assets ├── Scenes.meta ├── Scenes │ ├── FreeCam.cs │ ├── FreeCam.cs.meta │ ├── Materials.meta │ ├── Materials │ │ ├── dirty+concrete-4096x4096.mat │ │ └── dirty+concrete-4096x4096.mat.meta │ ├── SampleScene.meta │ ├── SampleScene.unity │ ├── SampleScene.unity.meta │ ├── SampleScene │ │ ├── LightingData.asset │ │ ├── LightingData.asset.meta │ │ ├── Lightmap-0_comp_dir.png │ │ ├── Lightmap-0_comp_dir.png.meta │ │ ├── Lightmap-0_comp_light.exr │ │ ├── Lightmap-0_comp_light.exr.meta │ │ ├── ReflectionProbe-0.exr │ │ ├── ReflectionProbe-0.exr.meta │ │ ├── ReflectionProbe-1.exr │ │ └── ReflectionProbe-1.exr.meta │ ├── dirty+concrete-4096x4096.png │ ├── dirty+concrete-4096x4096.png.meta │ ├── dt_brick_cr.jpg │ └── dt_brick_cr.jpg.meta ├── UnityPortals.meta └── UnityPortals │ ├── Portal.cs │ ├── Portal.cs.meta │ ├── Portal.prefab │ ├── Portal.prefab.meta │ ├── PortalCullBack.mat │ ├── PortalCullBack.mat.meta │ ├── PortalCullBack.shader │ ├── PortalCullBack.shader.meta │ ├── PortalCullFront.mat │ ├── PortalCullFront.mat.meta │ ├── PortalCullFront.shader │ └── PortalCullFront.shader.meta ├── LICENSE ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset └── UnityConnectSettings.asset └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything 2 | /* 3 | /*/ 4 | 5 | # Inverse ignore some stuff 6 | !/Assets/ 7 | !/ProjectSettings/ 8 | !README.md 9 | !LICENSE 10 | !/UnityPackage/ 11 | !.gitignore 12 | 13 | # OS Stuff 14 | .DS_Store 15 | ._* 16 | .Spotlight-V100 17 | .Trashes 18 | ehthumbs.db 19 | Thumbs.db 20 | $RECYCLE.BIN/ 21 | Desktop.ini -------------------------------------------------------------------------------- /Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f704ae4b4f98ae41a0bce26658850c1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/FreeCam.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class FreeCam : MonoBehaviour { 6 | 7 | private Vector3 euler=Vector3.zero; 8 | void Update () 9 | { 10 | euler = transform.localEulerAngles; 11 | if (euler.x > 89) euler.x -= 360; 12 | if (euler.z > 189) euler.z -= 360; 13 | euler.y += Input.GetAxis("Mouse X"); 14 | euler.x -= Input.GetAxis("Mouse Y"); 15 | euler.x = Mathf.Clamp(euler.x, -89, 89); 16 | euler.z = Mathf.Lerp(euler.z, 0, Time.deltaTime * 4f); 17 | transform.localEulerAngles = euler; 18 | Vector2 move = Vector2.zero; 19 | float speed = Input.GetKey(KeyCode.LeftShift) ? 6f : 2f; 20 | move.y -= Input.GetKey(KeyCode.S) ? 1 : 0; 21 | move.y += Input.GetKey(KeyCode.W) ? 1 : 0; 22 | move.x -= Input.GetKey(KeyCode.A) ? 1 : 0; 23 | move.x += Input.GetKey(KeyCode.D) ? 1 : 0; 24 | transform.position += transform.forward * move.y*Time.deltaTime* speed; 25 | transform.position += transform.right * move.x*Time.deltaTime* speed; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Assets/Scenes/FreeCam.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7f54ec9b977e56b44a95f2cefae68b50 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scenes/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 935960d4e3ce62a4483b727a24a21ed6 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/Materials/dirty+concrete-4096x4096.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: dirty+concrete-4096x4096 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: _DETAIL_MULX2 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 2800000, guid: 7e2a4e4948b06984496fd78e17e84039, type: 3} 27 | m_Scale: {x: 8, y: 8} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 2800000, guid: 2bb4f6e042f3baf42b55c7c547db2710, type: 3} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0.5 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 1, g: 1, b: 1, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /Assets/Scenes/Materials/dirty+concrete-4096x4096.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 54b978b75d58413468960e07b7220a3f 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/SampleScene.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4b83db8496fcad8449320cbe73a12dd3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/SampleScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 99c9720ab356a0642a771bea13969a05 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Scenes/SampleScene/LightingData.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bodhid/UnityPortals/c1c6a05e94681e0654c318693396cb4c2a7ef9d2/Assets/Scenes/SampleScene/LightingData.asset -------------------------------------------------------------------------------- /Assets/Scenes/SampleScene/LightingData.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 44882a7d03a385d4cacb9a5e87db49c2 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 25800000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/SampleScene/Lightmap-0_comp_dir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bodhid/UnityPortals/c1c6a05e94681e0654c318693396cb4c2a7ef9d2/Assets/Scenes/SampleScene/Lightmap-0_comp_dir.png -------------------------------------------------------------------------------- /Assets/Scenes/SampleScene/Lightmap-0_comp_dir.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2594b1ca97c01444da258931b7aa6395 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 7 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 1 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: 1 35 | aniso: 3 36 | mipBias: 0 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 2 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: 79 | vertices: [] 80 | indices: 81 | edges: [] 82 | weights: [] 83 | spritePackingTag: 84 | pSDRemoveMatte: 0 85 | pSDShowRemoveMatteOption: 0 86 | userData: 87 | assetBundleName: 88 | assetBundleVariant: 89 | -------------------------------------------------------------------------------- /Assets/Scenes/SampleScene/Lightmap-0_comp_light.exr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bodhid/UnityPortals/c1c6a05e94681e0654c318693396cb4c2a7ef9d2/Assets/Scenes/SampleScene/Lightmap-0_comp_light.exr -------------------------------------------------------------------------------- /Assets/Scenes/SampleScene/Lightmap-0_comp_light.exr.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 174db85b3266dcd4a8dc30eadf7a305b 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 7 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 1 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: 1 35 | aniso: 3 36 | mipBias: 0 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 0 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 6 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 2 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: 79 | vertices: [] 80 | indices: 81 | edges: [] 82 | weights: [] 83 | spritePackingTag: 84 | pSDRemoveMatte: 0 85 | pSDShowRemoveMatteOption: 0 86 | userData: 87 | assetBundleName: 88 | assetBundleVariant: 89 | -------------------------------------------------------------------------------- /Assets/Scenes/SampleScene/ReflectionProbe-0.exr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bodhid/UnityPortals/c1c6a05e94681e0654c318693396cb4c2a7ef9d2/Assets/Scenes/SampleScene/ReflectionProbe-0.exr -------------------------------------------------------------------------------- /Assets/Scenes/SampleScene/ReflectionProbe-0.exr.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a7245fce98b01c746b77a9f522369b54 3 | TextureImporter: 4 | fileIDToRecycleName: 5 | 8900000: generatedCubemap 6 | externalObjects: {} 7 | serializedVersion: 7 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapsPreserveCoverage: 0 16 | alphaTestReferenceValue: 0.5 17 | mipMapFadeDistanceStart: 1 18 | mipMapFadeDistanceEnd: 3 19 | bumpmap: 20 | convertToNormalMap: 0 21 | externalNormalMap: 0 22 | heightScale: 0.25 23 | normalMapFilter: 0 24 | isReadable: 0 25 | streamingMipmaps: 0 26 | streamingMipmapsPriority: 0 27 | grayScaleToAlpha: 0 28 | generateCubemap: 6 29 | cubemapConvolution: 1 30 | seamlessCubemap: 1 31 | textureFormat: 1 32 | maxTextureSize: 2048 33 | textureSettings: 34 | serializedVersion: 2 35 | filterMode: 2 36 | aniso: 0 37 | mipBias: 0 38 | wrapU: 1 39 | wrapV: 1 40 | wrapW: 1 41 | nPOTScale: 1 42 | lightmap: 0 43 | compressionQuality: 50 44 | spriteMode: 0 45 | spriteExtrude: 1 46 | spriteMeshType: 1 47 | alignment: 0 48 | spritePivot: {x: 0.5, y: 0.5} 49 | spritePixelsToUnits: 100 50 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 51 | spriteGenerateFallbackPhysicsShape: 1 52 | alphaUsage: 1 53 | alphaIsTransparency: 0 54 | spriteTessellationDetail: -1 55 | textureType: 0 56 | textureShape: 2 57 | singleChannelComponent: 0 58 | maxTextureSizeSet: 0 59 | compressionQualitySet: 0 60 | textureFormatSet: 0 61 | platformSettings: 62 | - serializedVersion: 2 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 2048 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 100 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | spriteSheet: 74 | serializedVersion: 2 75 | sprites: [] 76 | outline: [] 77 | physicsShape: [] 78 | bones: [] 79 | spriteID: 80 | vertices: [] 81 | indices: 82 | edges: [] 83 | weights: [] 84 | spritePackingTag: 85 | pSDRemoveMatte: 0 86 | pSDShowRemoveMatteOption: 0 87 | userData: 88 | assetBundleName: 89 | assetBundleVariant: 90 | -------------------------------------------------------------------------------- /Assets/Scenes/SampleScene/ReflectionProbe-1.exr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bodhid/UnityPortals/c1c6a05e94681e0654c318693396cb4c2a7ef9d2/Assets/Scenes/SampleScene/ReflectionProbe-1.exr -------------------------------------------------------------------------------- /Assets/Scenes/SampleScene/ReflectionProbe-1.exr.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a743b290ae5e23a4585fd64b80fc7edd 3 | TextureImporter: 4 | fileIDToRecycleName: 5 | 8900000: generatedCubemap 6 | externalObjects: {} 7 | serializedVersion: 7 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapsPreserveCoverage: 0 16 | alphaTestReferenceValue: 0.5 17 | mipMapFadeDistanceStart: 1 18 | mipMapFadeDistanceEnd: 3 19 | bumpmap: 20 | convertToNormalMap: 0 21 | externalNormalMap: 0 22 | heightScale: 0.25 23 | normalMapFilter: 0 24 | isReadable: 0 25 | streamingMipmaps: 0 26 | streamingMipmapsPriority: 0 27 | grayScaleToAlpha: 0 28 | generateCubemap: 6 29 | cubemapConvolution: 1 30 | seamlessCubemap: 1 31 | textureFormat: 1 32 | maxTextureSize: 2048 33 | textureSettings: 34 | serializedVersion: 2 35 | filterMode: 2 36 | aniso: 0 37 | mipBias: 0 38 | wrapU: 1 39 | wrapV: 1 40 | wrapW: 1 41 | nPOTScale: 1 42 | lightmap: 0 43 | compressionQuality: 50 44 | spriteMode: 0 45 | spriteExtrude: 1 46 | spriteMeshType: 1 47 | alignment: 0 48 | spritePivot: {x: 0.5, y: 0.5} 49 | spritePixelsToUnits: 100 50 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 51 | spriteGenerateFallbackPhysicsShape: 1 52 | alphaUsage: 1 53 | alphaIsTransparency: 0 54 | spriteTessellationDetail: -1 55 | textureType: 0 56 | textureShape: 2 57 | singleChannelComponent: 0 58 | maxTextureSizeSet: 0 59 | compressionQualitySet: 0 60 | textureFormatSet: 0 61 | platformSettings: 62 | - serializedVersion: 2 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 2048 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 100 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | spriteSheet: 74 | serializedVersion: 2 75 | sprites: [] 76 | outline: [] 77 | physicsShape: [] 78 | bones: [] 79 | spriteID: 80 | vertices: [] 81 | indices: 82 | edges: [] 83 | weights: [] 84 | spritePackingTag: 85 | pSDRemoveMatte: 0 86 | pSDShowRemoveMatteOption: 0 87 | userData: 88 | assetBundleName: 89 | assetBundleVariant: 90 | -------------------------------------------------------------------------------- /Assets/Scenes/dirty+concrete-4096x4096.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bodhid/UnityPortals/c1c6a05e94681e0654c318693396cb4c2a7ef9d2/Assets/Scenes/dirty+concrete-4096x4096.png -------------------------------------------------------------------------------- /Assets/Scenes/dirty+concrete-4096x4096.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2bb4f6e042f3baf42b55c7c547db2710 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 7 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: 2 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | - serializedVersion: 2 73 | buildTarget: Standalone 74 | maxTextureSize: 2048 75 | resizeAlgorithm: 0 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | androidETC2FallbackOverride: 0 83 | - serializedVersion: 2 84 | buildTarget: Android 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | androidETC2FallbackOverride: 0 94 | - serializedVersion: 2 95 | buildTarget: Windows Store Apps 96 | maxTextureSize: 2048 97 | resizeAlgorithm: 0 98 | textureFormat: -1 99 | textureCompression: 1 100 | compressionQuality: 50 101 | crunchedCompression: 0 102 | allowsAlphaSplitting: 0 103 | overridden: 0 104 | androidETC2FallbackOverride: 0 105 | - serializedVersion: 2 106 | buildTarget: WebGL 107 | maxTextureSize: 2048 108 | resizeAlgorithm: 0 109 | textureFormat: -1 110 | textureCompression: 1 111 | compressionQuality: 50 112 | crunchedCompression: 0 113 | allowsAlphaSplitting: 0 114 | overridden: 0 115 | androidETC2FallbackOverride: 0 116 | spriteSheet: 117 | serializedVersion: 2 118 | sprites: [] 119 | outline: [] 120 | physicsShape: [] 121 | bones: [] 122 | spriteID: 123 | vertices: [] 124 | indices: 125 | edges: [] 126 | weights: [] 127 | spritePackingTag: 128 | pSDRemoveMatte: 0 129 | pSDShowRemoveMatteOption: 0 130 | userData: 131 | assetBundleName: 132 | assetBundleVariant: 133 | -------------------------------------------------------------------------------- /Assets/Scenes/dt_brick_cr.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bodhid/UnityPortals/c1c6a05e94681e0654c318693396cb4c2a7ef9d2/Assets/Scenes/dt_brick_cr.jpg -------------------------------------------------------------------------------- /Assets/Scenes/dt_brick_cr.jpg.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7e2a4e4948b06984496fd78e17e84039 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 7 7 | mipmaps: 8 | mipMapMode: 1 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 1 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 4 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: 2 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | - serializedVersion: 2 73 | buildTarget: Standalone 74 | maxTextureSize: 2048 75 | resizeAlgorithm: 0 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | androidETC2FallbackOverride: 0 83 | - serializedVersion: 2 84 | buildTarget: Android 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | androidETC2FallbackOverride: 0 94 | - serializedVersion: 2 95 | buildTarget: Windows Store Apps 96 | maxTextureSize: 2048 97 | resizeAlgorithm: 0 98 | textureFormat: -1 99 | textureCompression: 1 100 | compressionQuality: 50 101 | crunchedCompression: 0 102 | allowsAlphaSplitting: 0 103 | overridden: 0 104 | androidETC2FallbackOverride: 0 105 | - serializedVersion: 2 106 | buildTarget: WebGL 107 | maxTextureSize: 2048 108 | resizeAlgorithm: 0 109 | textureFormat: -1 110 | textureCompression: 1 111 | compressionQuality: 50 112 | crunchedCompression: 0 113 | allowsAlphaSplitting: 0 114 | overridden: 0 115 | androidETC2FallbackOverride: 0 116 | spriteSheet: 117 | serializedVersion: 2 118 | sprites: [] 119 | outline: [] 120 | physicsShape: [] 121 | bones: [] 122 | spriteID: 123 | vertices: [] 124 | indices: 125 | edges: [] 126 | weights: [] 127 | spritePackingTag: 128 | pSDRemoveMatte: 0 129 | pSDShowRemoveMatteOption: 0 130 | userData: 131 | assetBundleName: 132 | assetBundleVariant: 133 | -------------------------------------------------------------------------------- /Assets/UnityPortals.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4ec4723b123d58642a8774e0bd2bba21 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/UnityPortals/Portal.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | public class Portal : MonoBehaviour 5 | { 6 | public Portal connection; 7 | private Camera[] cam; 8 | private Transform[] camParent; 9 | private RenderTexture[] buffer; 10 | private Material myMaterial; 11 | public MeshRenderer inside; 12 | private Material insideMaterial; 13 | private BoxCollider myCollider; 14 | [Range(1, 16)] 15 | public int portalRenderDepth = 8; 16 | [Range(0.5f, 1f)] 17 | public float downscaleFactor = 1; 18 | 19 | private int renderDepth = 8; 20 | private int portalDepth = 0; 21 | void Start() 22 | { 23 | insideMaterial = inside.material; 24 | myMaterial = GetComponent().material; 25 | myCollider = GetComponent(); 26 | 27 | InitializeBuffers(); 28 | } 29 | 30 | private void InitializeBuffers() 31 | { 32 | System.GC.Collect(); 33 | Resources.UnloadUnusedAssets(); 34 | camParent = new Transform[portalRenderDepth]; 35 | cam = new Camera[portalRenderDepth]; 36 | for (int i = 0; i < cam.Length; ++i) 37 | { 38 | camParent[i] = new GameObject("CamParent").transform; 39 | camParent[i].SetParent(transform); 40 | camParent[i].localPosition = Vector3.zero; 41 | GameObject portalCam = new GameObject("PortalCam"); 42 | cam[i] = portalCam.AddComponent(); 43 | portalCam.transform.SetParent(camParent[i]); 44 | portalCam.SetActive(false); 45 | } 46 | buffer = new RenderTexture[portalRenderDepth]; 47 | renderDepth = portalRenderDepth; 48 | } 49 | 50 | private void Update() 51 | { 52 | if (renderDepth != portalRenderDepth) InitializeBuffers(); 53 | portalDepth = -1; 54 | myMaterial.mainTexture = buffer[0]; 55 | insideMaterial.mainTexture = buffer[0]; 56 | } 57 | private void OnWillRenderObject() 58 | { 59 | if (portalDepth < renderDepth - 1) 60 | { 61 | portalDepth++; 62 | SetPortalBuffer(portalDepth); 63 | SetPortalCameraSettings(portalDepth); 64 | SetPortalCameraTransform(portalDepth); 65 | RenderPortal(portalDepth); 66 | } 67 | } 68 | private void SetPortalBuffer(int portalDepth) 69 | { 70 | RenderTexture.ReleaseTemporary(buffer[portalDepth]); 71 | float resolution = 1; 72 | for (int i = 0; i < portalDepth; ++i) resolution *= downscaleFactor; 73 | buffer[portalDepth] = RenderTexture.GetTemporary((int)( Screen.width* resolution), (int)(Screen.height* resolution), 32, RenderTextureFormat.ARGB32); 74 | } 75 | 76 | private void SetPortalCameraSettings(int portalDepth) 77 | { 78 | cam[portalDepth].CopyFrom(Camera.current); 79 | 80 | //Never render the other portal, this creates a messy loop 81 | int excludeLayer = (gameObject.layer == 11) ? 12 : 11; 82 | cam[portalDepth].cullingMask = ~(1 << excludeLayer); 83 | 84 | //Set znear for portalCamera 85 | 86 | Transform currentCameraTransform = Camera.current.transform; 87 | Vector3 closestPoint = myCollider.bounds.ClosestPoint(currentCameraTransform.position); 88 | Vector3 closestPointOnDepthBuffer = Vector3.Project(closestPoint - currentCameraTransform.position, currentCameraTransform.forward); 89 | cam[portalDepth].nearClipPlane = closestPointOnDepthBuffer.magnitude; 90 | } 91 | 92 | private void SetPortalCameraTransform(int portalDepth) 93 | { 94 | Transform currentCameraTransform = Camera.current.transform; 95 | camParent[portalDepth].position = transform.position; 96 | camParent[portalDepth].rotation = transform.rotation; 97 | cam[portalDepth].transform.position = currentCameraTransform.position; 98 | cam[portalDepth].transform.rotation = currentCameraTransform.rotation; 99 | camParent[portalDepth].position = connection.transform.position; 100 | camParent[portalDepth].eulerAngles = connection.transform.eulerAngles + new Vector3(0, 180, 0); 101 | } 102 | 103 | private void RenderPortal(int portalDepth) 104 | { 105 | cam[portalDepth].targetTexture = buffer[portalDepth]; 106 | Texture temp = myMaterial.mainTexture; 107 | myMaterial.mainTexture = (portalDepth == (renderDepth - 1)) ? (Texture2D.blackTexture) : ((Texture)buffer[portalDepth + 1]); 108 | cam[portalDepth].Render(); 109 | myMaterial.mainTexture = temp; 110 | } 111 | 112 | private void OnTriggerStay(Collider other) 113 | { 114 | //Teleport object that enters 115 | if (myCollider.bounds.Contains(other.transform.position)) 116 | { 117 | Transform otherTransform = other.transform; 118 | Transform otherParent = other.transform.parent; 119 | Transform myParent = transform.parent; 120 | Vector3 myPosition = transform.localPosition; 121 | Quaternion myRotation = transform.localRotation; 122 | otherTransform.SetParent(transform); 123 | transform.SetParent(connection.transform); 124 | transform.localEulerAngles = new Vector3(0, 180, 0); 125 | transform.localPosition = Vector3.zero; 126 | otherTransform.SetParent(otherParent); 127 | transform.SetParent(myParent); 128 | transform.localPosition = myPosition; 129 | transform.localRotation = myRotation; 130 | } 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /Assets/UnityPortals/Portal.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6084407492f81cf42ae97e43f18ffca0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/UnityPortals/Portal.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_SourcePrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1868935637352218} 13 | m_IsPrefabAsset: 1 14 | --- !u!1 &1108221564892590 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_CorrespondingSourceObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 6 20 | m_Component: 21 | - component: {fileID: 4040134950189662} 22 | - component: {fileID: 33851927543065574} 23 | - component: {fileID: 23627772385260724} 24 | m_Layer: 11 25 | m_Name: Inside 26 | m_TagString: Untagged 27 | m_Icon: {fileID: 0} 28 | m_NavMeshLayer: 0 29 | m_StaticEditorFlags: 0 30 | m_IsActive: 1 31 | --- !u!1 &1868935637352218 32 | GameObject: 33 | m_ObjectHideFlags: 0 34 | m_CorrespondingSourceObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | serializedVersion: 6 37 | m_Component: 38 | - component: {fileID: 4282351016392744} 39 | - component: {fileID: 33787565510494058} 40 | - component: {fileID: 23562660696775494} 41 | - component: {fileID: 114457204949028198} 42 | - component: {fileID: 65831289114802956} 43 | m_Layer: 11 44 | m_Name: Portal 45 | m_TagString: Untagged 46 | m_Icon: {fileID: 0} 47 | m_NavMeshLayer: 0 48 | m_StaticEditorFlags: 0 49 | m_IsActive: 1 50 | --- !u!4 &4040134950189662 51 | Transform: 52 | m_ObjectHideFlags: 1 53 | m_CorrespondingSourceObject: {fileID: 0} 54 | m_PrefabInternal: {fileID: 100100000} 55 | m_GameObject: {fileID: 1108221564892590} 56 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 57 | m_LocalPosition: {x: 0, y: 0, z: 0.125} 58 | m_LocalScale: {x: 1, y: 1, z: 0.25} 59 | m_Children: [] 60 | m_Father: {fileID: 4282351016392744} 61 | m_RootOrder: 0 62 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 63 | --- !u!4 &4282351016392744 64 | Transform: 65 | m_ObjectHideFlags: 1 66 | m_CorrespondingSourceObject: {fileID: 0} 67 | m_PrefabInternal: {fileID: 100100000} 68 | m_GameObject: {fileID: 1868935637352218} 69 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 70 | m_LocalPosition: {x: 0, y: 0.9, z: -1} 71 | m_LocalScale: {x: 1, y: 1.8, z: 1} 72 | m_Children: 73 | - {fileID: 4040134950189662} 74 | m_Father: {fileID: 0} 75 | m_RootOrder: 0 76 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 77 | --- !u!23 &23562660696775494 78 | MeshRenderer: 79 | m_ObjectHideFlags: 1 80 | m_CorrespondingSourceObject: {fileID: 0} 81 | m_PrefabInternal: {fileID: 100100000} 82 | m_GameObject: {fileID: 1868935637352218} 83 | m_Enabled: 1 84 | m_CastShadows: 1 85 | m_ReceiveShadows: 1 86 | m_DynamicOccludee: 1 87 | m_MotionVectors: 1 88 | m_LightProbeUsage: 1 89 | m_ReflectionProbeUsage: 1 90 | m_RenderingLayerMask: 4294967295 91 | m_Materials: 92 | - {fileID: 2100000, guid: 2f21a90cda681804bb7d3bf4e2bdb63d, type: 2} 93 | m_StaticBatchInfo: 94 | firstSubMesh: 0 95 | subMeshCount: 0 96 | m_StaticBatchRoot: {fileID: 0} 97 | m_ProbeAnchor: {fileID: 0} 98 | m_LightProbeVolumeOverride: {fileID: 0} 99 | m_ScaleInLightmap: 1 100 | m_PreserveUVs: 0 101 | m_IgnoreNormalsForChartDetection: 0 102 | m_ImportantGI: 0 103 | m_StitchLightmapSeams: 0 104 | m_SelectedEditorRenderState: 3 105 | m_MinimumChartSize: 4 106 | m_AutoUVMaxDistance: 0.5 107 | m_AutoUVMaxAngle: 89 108 | m_LightmapParameters: {fileID: 0} 109 | m_SortingLayerID: 0 110 | m_SortingLayer: 0 111 | m_SortingOrder: 0 112 | --- !u!23 &23627772385260724 113 | MeshRenderer: 114 | m_ObjectHideFlags: 1 115 | m_CorrespondingSourceObject: {fileID: 0} 116 | m_PrefabInternal: {fileID: 100100000} 117 | m_GameObject: {fileID: 1108221564892590} 118 | m_Enabled: 1 119 | m_CastShadows: 1 120 | m_ReceiveShadows: 1 121 | m_DynamicOccludee: 1 122 | m_MotionVectors: 1 123 | m_LightProbeUsage: 1 124 | m_ReflectionProbeUsage: 1 125 | m_RenderingLayerMask: 4294967295 126 | m_Materials: 127 | - {fileID: 2100000, guid: 25393f24cd8362b4dbdd601c01bc3316, type: 2} 128 | m_StaticBatchInfo: 129 | firstSubMesh: 0 130 | subMeshCount: 0 131 | m_StaticBatchRoot: {fileID: 0} 132 | m_ProbeAnchor: {fileID: 0} 133 | m_LightProbeVolumeOverride: {fileID: 0} 134 | m_ScaleInLightmap: 1 135 | m_PreserveUVs: 0 136 | m_IgnoreNormalsForChartDetection: 0 137 | m_ImportantGI: 0 138 | m_StitchLightmapSeams: 0 139 | m_SelectedEditorRenderState: 3 140 | m_MinimumChartSize: 4 141 | m_AutoUVMaxDistance: 0.5 142 | m_AutoUVMaxAngle: 89 143 | m_LightmapParameters: {fileID: 0} 144 | m_SortingLayerID: 0 145 | m_SortingLayer: 0 146 | m_SortingOrder: 0 147 | --- !u!33 &33787565510494058 148 | MeshFilter: 149 | m_ObjectHideFlags: 1 150 | m_CorrespondingSourceObject: {fileID: 0} 151 | m_PrefabInternal: {fileID: 100100000} 152 | m_GameObject: {fileID: 1868935637352218} 153 | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} 154 | --- !u!33 &33851927543065574 155 | MeshFilter: 156 | m_ObjectHideFlags: 1 157 | m_CorrespondingSourceObject: {fileID: 0} 158 | m_PrefabInternal: {fileID: 100100000} 159 | m_GameObject: {fileID: 1108221564892590} 160 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 161 | --- !u!65 &65831289114802956 162 | BoxCollider: 163 | m_ObjectHideFlags: 1 164 | m_CorrespondingSourceObject: {fileID: 0} 165 | m_PrefabInternal: {fileID: 100100000} 166 | m_GameObject: {fileID: 1868935637352218} 167 | m_Material: {fileID: 0} 168 | m_IsTrigger: 1 169 | m_Enabled: 1 170 | serializedVersion: 2 171 | m_Size: {x: 1, y: 1, z: 0.25} 172 | m_Center: {x: 0, y: 0, z: 0.125} 173 | --- !u!114 &114457204949028198 174 | MonoBehaviour: 175 | m_ObjectHideFlags: 1 176 | m_CorrespondingSourceObject: {fileID: 0} 177 | m_PrefabInternal: {fileID: 100100000} 178 | m_GameObject: {fileID: 1868935637352218} 179 | m_Enabled: 1 180 | m_EditorHideFlags: 0 181 | m_Script: {fileID: 11500000, guid: 6084407492f81cf42ae97e43f18ffca0, type: 3} 182 | m_Name: 183 | m_EditorClassIdentifier: 184 | connection: {fileID: 0} 185 | inside: {fileID: 23627772385260724} 186 | portalRenderDepth: 8 187 | downscaleFactor: 1 188 | -------------------------------------------------------------------------------- /Assets/UnityPortals/Portal.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 71180f3987591884bb755dd8412a9a0e 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/UnityPortals/PortalCullBack.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: PortalCullBack 10 | m_Shader: {fileID: 4800000, guid: edcdd07f26565414a9781fe7bfa3c33f, type: 3} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _MainTex: 22 | m_Texture: {fileID: 10305, guid: 0000000000000000f000000000000000, type: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | m_Floats: [] 26 | m_Colors: [] 27 | -------------------------------------------------------------------------------- /Assets/UnityPortals/PortalCullBack.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2f21a90cda681804bb7d3bf4e2bdb63d 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/UnityPortals/PortalCullBack.shader: -------------------------------------------------------------------------------- 1 | Shader "Unlit/PortalCullBack" 2 | { 3 | Properties 4 | { 5 | _MainTex ("Texture", 2D) = "white" {} 6 | } 7 | SubShader 8 | { 9 | Tags { "RenderType"="Opaque" "Queue"="Geometry+1" } 10 | LOD 100 11 | ztest Less 12 | cull back 13 | Offset -1, -1 14 | Pass 15 | { 16 | CGPROGRAM 17 | #pragma vertex vert 18 | #pragma fragment frag 19 | #include "UnityCG.cginc" 20 | 21 | struct appdata 22 | { 23 | float4 vertex : POSITION; 24 | }; 25 | 26 | struct v2f 27 | { 28 | float4 vertex : SV_POSITION; 29 | float4 screenPos : TEXCOORD0; 30 | }; 31 | 32 | sampler2D _MainTex; 33 | float4 _MainTex_ST; 34 | 35 | v2f vert (appdata v) 36 | { 37 | v2f o; 38 | o.vertex = UnityObjectToClipPos(v.vertex); 39 | o.screenPos = ComputeScreenPos(o.vertex); 40 | return o; 41 | } 42 | 43 | fixed4 frag (v2f i) : SV_Target 44 | { 45 | float2 uv = i.screenPos.xy / i.screenPos.w; 46 | fixed4 col = tex2D(_MainTex, uv); 47 | return col; 48 | } 49 | ENDCG 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Assets/UnityPortals/PortalCullBack.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: edcdd07f26565414a9781fe7bfa3c33f 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/UnityPortals/PortalCullFront.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: PortalCullFront 10 | m_Shader: {fileID: 4800000, guid: 1218a631ae164d942a802a89d5bf9420, type: 3} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _MainTex: 22 | m_Texture: {fileID: 10305, guid: 0000000000000000f000000000000000, type: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | m_Floats: [] 26 | m_Colors: [] 27 | -------------------------------------------------------------------------------- /Assets/UnityPortals/PortalCullFront.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 25393f24cd8362b4dbdd601c01bc3316 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/UnityPortals/PortalCullFront.shader: -------------------------------------------------------------------------------- 1 | Shader "Unlit/PortalCullFront" 2 | { 3 | Properties 4 | { 5 | _MainTex ("Texture", 2D) = "white" {} 6 | } 7 | SubShader 8 | { 9 | Tags { "RenderType"="Opaque" "Queue"="Geometry+1" } 10 | LOD 100 11 | ztest Less 12 | cull front 13 | Offset -1, -1 14 | Pass 15 | { 16 | CGPROGRAM 17 | #pragma vertex vert 18 | #pragma fragment frag 19 | #include "UnityCG.cginc" 20 | 21 | struct appdata 22 | { 23 | float4 vertex : POSITION; 24 | }; 25 | 26 | struct v2f 27 | { 28 | float4 vertex : SV_POSITION; 29 | float4 screenPos : TEXCOORD0; 30 | }; 31 | 32 | sampler2D _MainTex; 33 | float4 _MainTex_ST; 34 | 35 | v2f vert (appdata v) 36 | { 37 | v2f o; 38 | o.vertex = UnityObjectToClipPos(v.vertex); 39 | o.screenPos = ComputeScreenPos(o.vertex); 40 | return o; 41 | } 42 | 43 | fixed4 frag (v2f i) : SV_Target 44 | { 45 | float2 uv = i.screenPos.xy / i.screenPos.w; 46 | fixed4 col = tex2D(_MainTex, uv); 47 | return col; 48 | } 49 | ENDCG 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Assets/UnityPortals/PortalCullFront.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1218a631ae164d942a802a89d5bf9420 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Bodhi Donselaar 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 1024 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_AmbisonicDecoderPlugin: 16 | m_DisableAudio: 0 17 | m_VirtualizeEffects: 1 18 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 7 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 1 23 | m_ClothInterCollisionSettingsToggle: 0 24 | m_ContactPairsMode: 0 25 | m_BroadphaseType: 0 26 | m_WorldBounds: 27 | m_Center: {x: 0, y: 0, z: 0} 28 | m_Extent: {x: 250, y: 250, z: 250} 29 | m_WorldSubdivisions: 8 30 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/Scenes/SampleScene.unity 10 | guid: 99c9720ab356a0642a771bea13969a05 11 | m_configObjects: {} 12 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 7 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 2 10 | m_DefaultBehaviorMode: 0 11 | m_SpritePackerMode: 0 12 | m_SpritePackerPaddingPower: 1 13 | m_EtcTextureCompressorBehavior: 1 14 | m_EtcTextureFastCompressor: 1 15 | m_EtcTextureNormalCompressor: 2 16 | m_EtcTextureBestCompressor: 4 17 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd 18 | m_ProjectGenerationRootNamespace: 19 | m_UserGeneratedProjectSuffix: 20 | m_CollabEditorSettings: 21 | inProgressEnabled: 1 22 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 12 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | m_PreloadedShaders: [] 39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 40 | type: 0} 41 | m_CustomRenderPipeline: {fileID: 0} 42 | m_TransparencySortMode: 0 43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 44 | m_DefaultRenderingPath: 1 45 | m_DefaultMobileRenderingPath: 1 46 | m_TierSettings: [] 47 | m_LightmapStripping: 0 48 | m_FogStripping: 0 49 | m_InstancingStripping: 0 50 | m_LightmapKeepPlain: 1 51 | m_LightmapKeepDirCombined: 1 52 | m_LightmapKeepDynamicPlain: 1 53 | m_LightmapKeepDynamicDirCombined: 1 54 | m_LightmapKeepShadowMask: 1 55 | m_LightmapKeepSubtractive: 1 56 | m_FogKeepLinear: 1 57 | m_FogKeepExp: 1 58 | m_FogKeepExp2: 1 59 | m_AlbedoSwatchInfos: [] 60 | m_LightsUseLinearIntensity: 0 61 | m_LightsUseColorTemperature: 0 62 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_AutoSimulation: 1 23 | m_QueriesHitTriggers: 1 24 | m_QueriesStartInColliders: 1 25 | m_ChangeStopsCallbacks: 0 26 | m_CallbacksOnDisable: 1 27 | m_AutoSyncTransforms: 1 28 | m_AlwaysShowColliders: 0 29 | m_ShowColliderSleep: 1 30 | m_ShowColliderContacts: 0 31 | m_ShowColliderAABB: 0 32 | m_ContactArrowScale: 0.2 33 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 34 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 35 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 36 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 37 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 38 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | m_DefaultList: 7 | - type: 8 | m_NativeTypeID: 108 9 | m_ManagedTypePPtr: {fileID: 0} 10 | m_ManagedTypeFallback: 11 | defaultPresets: 12 | - m_Preset: {fileID: 2655988077585873504, guid: c1cf8506f04ef2c4a88b64b6c4202eea, 13 | type: 2} 14 | - type: 15 | m_NativeTypeID: 1020 16 | m_ManagedTypePPtr: {fileID: 0} 17 | m_ManagedTypeFallback: 18 | defaultPresets: 19 | - m_Preset: {fileID: 2655988077585873504, guid: 0cd792cc87e492d43b4e95b205fc5cc6, 20 | type: 2} 21 | - type: 22 | m_NativeTypeID: 1006 23 | m_ManagedTypePPtr: {fileID: 0} 24 | m_ManagedTypeFallback: 25 | defaultPresets: 26 | - m_Preset: {fileID: 2655988077585873504, guid: 7a99f8aa944efe94cb9bd74562b7d5f9, 27 | type: 2} 28 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 15 7 | productGUID: 04edebfb6cc7b454ab34d9bbee4f4877 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: Bodhi Donselaar 16 | productName: Portal 17 | defaultCursor: {fileID: 0} 18 | cursorHotspot: {x: 0, y: 0} 19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 20 | m_ShowUnitySplashScreen: 1 21 | m_ShowUnitySplashLogo: 1 22 | m_SplashScreenOverlayOpacity: 1 23 | m_SplashScreenAnimation: 1 24 | m_SplashScreenLogoStyle: 1 25 | m_SplashScreenDrawMode: 0 26 | m_SplashScreenBackgroundAnimationZoom: 1 27 | m_SplashScreenLogoAnimationZoom: 1 28 | m_SplashScreenBackgroundLandscapeAspect: 1 29 | m_SplashScreenBackgroundPortraitAspect: 1 30 | m_SplashScreenBackgroundLandscapeUvs: 31 | serializedVersion: 2 32 | x: 0 33 | y: 0 34 | width: 1 35 | height: 1 36 | m_SplashScreenBackgroundPortraitUvs: 37 | serializedVersion: 2 38 | x: 0 39 | y: 0 40 | width: 1 41 | height: 1 42 | m_SplashScreenLogos: [] 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1024 46 | defaultScreenHeight: 768 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 0 51 | m_MTRendering: 1 52 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 53 | iosShowActivityIndicatorOnLoading: -1 54 | androidShowActivityIndicatorOnLoading: -1 55 | iosAppInBackgroundBehavior: 0 56 | displayResolutionDialog: 1 57 | iosAllowHTTPDownload: 1 58 | allowedAutorotateToPortrait: 1 59 | allowedAutorotateToPortraitUpsideDown: 1 60 | allowedAutorotateToLandscapeRight: 1 61 | allowedAutorotateToLandscapeLeft: 1 62 | useOSAutorotation: 1 63 | use32BitDisplayBuffer: 1 64 | preserveFramebufferAlpha: 0 65 | disableDepthAndStencilBuffers: 0 66 | androidBlitType: 0 67 | defaultIsNativeResolution: 1 68 | macRetinaSupport: 1 69 | runInBackground: 1 70 | captureSingleScreen: 0 71 | muteOtherAudioSources: 0 72 | Prepare IOS For Recording: 0 73 | Force IOS Speakers When Recording: 0 74 | deferSystemGesturesMode: 0 75 | hideHomeButton: 0 76 | submitAnalytics: 1 77 | usePlayerLog: 1 78 | bakeCollisionMeshes: 0 79 | forceSingleInstance: 0 80 | resizableWindow: 0 81 | useMacAppStoreValidation: 0 82 | macAppStoreCategory: public.app-category.games 83 | gpuSkinning: 1 84 | graphicsJobs: 0 85 | xboxPIXTextureCapture: 0 86 | xboxEnableAvatar: 0 87 | xboxEnableKinect: 0 88 | xboxEnableKinectAutoTracking: 0 89 | xboxEnableFitness: 0 90 | visibleInBackground: 1 91 | allowFullscreenSwitch: 1 92 | graphicsJobMode: 0 93 | fullscreenMode: 1 94 | xboxSpeechDB: 0 95 | xboxEnableHeadOrientation: 0 96 | xboxEnableGuest: 0 97 | xboxEnablePIXSampling: 0 98 | metalFramebufferOnly: 0 99 | n3dsDisableStereoscopicView: 0 100 | n3dsEnableSharedListOpt: 1 101 | n3dsEnableVSync: 0 102 | xboxOneResolution: 0 103 | xboxOneSResolution: 0 104 | xboxOneXResolution: 3 105 | xboxOneMonoLoggingLevel: 0 106 | xboxOneLoggingLevel: 1 107 | xboxOneDisableEsram: 0 108 | xboxOnePresentImmediateThreshold: 0 109 | switchQueueCommandMemory: 0 110 | videoMemoryForVertexBuffers: 0 111 | psp2PowerMode: 0 112 | psp2AcquireBGM: 1 113 | vulkanEnableSetSRGBWrite: 0 114 | vulkanUseSWCommandBuffers: 0 115 | m_SupportedAspectRatios: 116 | 4:3: 1 117 | 5:4: 1 118 | 16:10: 1 119 | 16:9: 1 120 | Others: 1 121 | bundleVersion: 0.1 122 | preloadedAssets: [] 123 | metroInputSource: 0 124 | wsaTransparentSwapchain: 0 125 | m_HolographicPauseOnTrackingLoss: 1 126 | xboxOneDisableKinectGpuReservation: 0 127 | xboxOneEnable7thCore: 0 128 | isWsaHolographicRemotingEnabled: 0 129 | vrSettings: 130 | cardboard: 131 | depthFormat: 0 132 | enableTransitionView: 0 133 | daydream: 134 | depthFormat: 0 135 | useSustainedPerformanceMode: 0 136 | enableVideoLayer: 0 137 | useProtectedVideoMemory: 0 138 | minimumSupportedHeadTracking: 0 139 | maximumSupportedHeadTracking: 1 140 | hololens: 141 | depthFormat: 1 142 | depthBufferSharingEnabled: 0 143 | oculus: 144 | sharedDepthBuffer: 0 145 | dashSupport: 0 146 | enable360StereoCapture: 0 147 | protectGraphicsMemory: 0 148 | useHDRDisplay: 0 149 | m_ColorGamuts: 00000000 150 | targetPixelDensity: 30 151 | resolutionScalingMode: 0 152 | androidSupportedAspectRatio: 1 153 | androidMaxAspectRatio: 2.1 154 | applicationIdentifier: {} 155 | buildNumber: {} 156 | AndroidBundleVersionCode: 1 157 | AndroidMinSdkVersion: 16 158 | AndroidTargetSdkVersion: 0 159 | AndroidPreferredInstallLocation: 1 160 | aotOptions: 161 | stripEngineCode: 1 162 | iPhoneStrippingLevel: 0 163 | iPhoneScriptCallOptimization: 0 164 | ForceInternetPermission: 0 165 | ForceSDCardPermission: 0 166 | CreateWallpaper: 0 167 | APKExpansionFiles: 0 168 | keepLoadedShadersAlive: 0 169 | StripUnusedMeshComponents: 1 170 | VertexChannelCompressionMask: 4054 171 | iPhoneSdkVersion: 988 172 | iOSTargetOSVersionString: 8.0 173 | tvOSSdkVersion: 0 174 | tvOSRequireExtendedGameController: 0 175 | tvOSTargetOSVersionString: 9.0 176 | uIPrerenderedIcon: 0 177 | uIRequiresPersistentWiFi: 0 178 | uIRequiresFullScreen: 1 179 | uIStatusBarHidden: 1 180 | uIExitOnSuspend: 0 181 | uIStatusBarStyle: 0 182 | iPhoneSplashScreen: {fileID: 0} 183 | iPhoneHighResSplashScreen: {fileID: 0} 184 | iPhoneTallHighResSplashScreen: {fileID: 0} 185 | iPhone47inSplashScreen: {fileID: 0} 186 | iPhone55inPortraitSplashScreen: {fileID: 0} 187 | iPhone55inLandscapeSplashScreen: {fileID: 0} 188 | iPhone58inPortraitSplashScreen: {fileID: 0} 189 | iPhone58inLandscapeSplashScreen: {fileID: 0} 190 | iPadPortraitSplashScreen: {fileID: 0} 191 | iPadHighResPortraitSplashScreen: {fileID: 0} 192 | iPadLandscapeSplashScreen: {fileID: 0} 193 | iPadHighResLandscapeSplashScreen: {fileID: 0} 194 | appleTVSplashScreen: {fileID: 0} 195 | appleTVSplashScreen2x: {fileID: 0} 196 | tvOSSmallIconLayers: [] 197 | tvOSSmallIconLayers2x: [] 198 | tvOSLargeIconLayers: [] 199 | tvOSLargeIconLayers2x: [] 200 | tvOSTopShelfImageLayers: [] 201 | tvOSTopShelfImageLayers2x: [] 202 | tvOSTopShelfImageWideLayers: [] 203 | tvOSTopShelfImageWideLayers2x: [] 204 | iOSLaunchScreenType: 0 205 | iOSLaunchScreenPortrait: {fileID: 0} 206 | iOSLaunchScreenLandscape: {fileID: 0} 207 | iOSLaunchScreenBackgroundColor: 208 | serializedVersion: 2 209 | rgba: 0 210 | iOSLaunchScreenFillPct: 100 211 | iOSLaunchScreenSize: 100 212 | iOSLaunchScreenCustomXibPath: 213 | iOSLaunchScreeniPadType: 0 214 | iOSLaunchScreeniPadImage: {fileID: 0} 215 | iOSLaunchScreeniPadBackgroundColor: 216 | serializedVersion: 2 217 | rgba: 0 218 | iOSLaunchScreeniPadFillPct: 100 219 | iOSLaunchScreeniPadSize: 100 220 | iOSLaunchScreeniPadCustomXibPath: 221 | iOSUseLaunchScreenStoryboard: 0 222 | iOSLaunchScreenCustomStoryboardPath: 223 | iOSDeviceRequirements: [] 224 | iOSURLSchemes: [] 225 | iOSBackgroundModes: 0 226 | iOSMetalForceHardShadows: 0 227 | metalEditorSupport: 1 228 | metalAPIValidation: 1 229 | iOSRenderExtraFrameOnPause: 0 230 | appleDeveloperTeamID: 231 | iOSManualSigningProvisioningProfileID: 232 | tvOSManualSigningProvisioningProfileID: 233 | iOSManualSigningProvisioningProfileType: 0 234 | tvOSManualSigningProvisioningProfileType: 0 235 | appleEnableAutomaticSigning: 0 236 | iOSRequireARKit: 0 237 | appleEnableProMotion: 0 238 | vulkanEditorSupport: 0 239 | clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea 240 | templatePackageId: com.unity.3d@1.0.2 241 | templateDefaultScene: Assets/Scenes/SampleScene.unity 242 | AndroidTargetArchitectures: 5 243 | AndroidSplashScreenScale: 0 244 | androidSplashScreen: {fileID: 0} 245 | AndroidKeystoreName: 246 | AndroidKeyaliasName: 247 | AndroidBuildApkPerCpuArchitecture: 0 248 | AndroidTVCompatibility: 1 249 | AndroidIsGame: 1 250 | AndroidEnableTango: 0 251 | androidEnableBanner: 1 252 | androidUseLowAccuracyLocation: 0 253 | m_AndroidBanners: 254 | - width: 320 255 | height: 180 256 | banner: {fileID: 0} 257 | androidGamepadSupportLevel: 0 258 | resolutionDialogBanner: {fileID: 0} 259 | m_BuildTargetIcons: [] 260 | m_BuildTargetPlatformIcons: [] 261 | m_BuildTargetBatching: 262 | - m_BuildTarget: Standalone 263 | m_StaticBatching: 1 264 | m_DynamicBatching: 0 265 | - m_BuildTarget: tvOS 266 | m_StaticBatching: 1 267 | m_DynamicBatching: 0 268 | - m_BuildTarget: Android 269 | m_StaticBatching: 1 270 | m_DynamicBatching: 0 271 | - m_BuildTarget: iPhone 272 | m_StaticBatching: 1 273 | m_DynamicBatching: 0 274 | - m_BuildTarget: WebGL 275 | m_StaticBatching: 0 276 | m_DynamicBatching: 0 277 | m_BuildTargetGraphicsAPIs: 278 | - m_BuildTarget: AndroidPlayer 279 | m_APIs: 0b00000015000000 280 | m_Automatic: 1 281 | - m_BuildTarget: iOSSupport 282 | m_APIs: 10000000 283 | m_Automatic: 1 284 | - m_BuildTarget: AppleTVSupport 285 | m_APIs: 10000000 286 | m_Automatic: 0 287 | - m_BuildTarget: WebGLSupport 288 | m_APIs: 0b000000 289 | m_Automatic: 1 290 | - m_BuildTarget: WindowsStandaloneSupport 291 | m_APIs: 02000000 292 | m_Automatic: 0 293 | m_BuildTargetVRSettings: 294 | - m_BuildTarget: Standalone 295 | m_Enabled: 0 296 | m_Devices: 297 | - Oculus 298 | - OpenVR 299 | m_BuildTargetEnableVuforiaSettings: [] 300 | openGLRequireES31: 0 301 | openGLRequireES31AEP: 0 302 | m_TemplateCustomTags: {} 303 | mobileMTRendering: 304 | Android: 1 305 | iPhone: 1 306 | tvOS: 1 307 | m_BuildTargetGroupLightmapEncodingQuality: [] 308 | m_BuildTargetGroupLightmapSettings: [] 309 | playModeTestRunnerEnabled: 0 310 | runPlayModeTestAsEditModeTest: 0 311 | actionOnDotNetUnhandledException: 1 312 | enableInternalProfiler: 0 313 | logObjCUncaughtExceptions: 1 314 | enableCrashReportAPI: 0 315 | cameraUsageDescription: 316 | locationUsageDescription: 317 | microphoneUsageDescription: 318 | switchNetLibKey: 319 | switchSocketMemoryPoolSize: 6144 320 | switchSocketAllocatorPoolSize: 128 321 | switchSocketConcurrencyLimit: 14 322 | switchScreenResolutionBehavior: 2 323 | switchUseCPUProfiler: 0 324 | switchApplicationID: 0x01004b9000490000 325 | switchNSODependencies: 326 | switchTitleNames_0: 327 | switchTitleNames_1: 328 | switchTitleNames_2: 329 | switchTitleNames_3: 330 | switchTitleNames_4: 331 | switchTitleNames_5: 332 | switchTitleNames_6: 333 | switchTitleNames_7: 334 | switchTitleNames_8: 335 | switchTitleNames_9: 336 | switchTitleNames_10: 337 | switchTitleNames_11: 338 | switchTitleNames_12: 339 | switchTitleNames_13: 340 | switchTitleNames_14: 341 | switchPublisherNames_0: 342 | switchPublisherNames_1: 343 | switchPublisherNames_2: 344 | switchPublisherNames_3: 345 | switchPublisherNames_4: 346 | switchPublisherNames_5: 347 | switchPublisherNames_6: 348 | switchPublisherNames_7: 349 | switchPublisherNames_8: 350 | switchPublisherNames_9: 351 | switchPublisherNames_10: 352 | switchPublisherNames_11: 353 | switchPublisherNames_12: 354 | switchPublisherNames_13: 355 | switchPublisherNames_14: 356 | switchIcons_0: {fileID: 0} 357 | switchIcons_1: {fileID: 0} 358 | switchIcons_2: {fileID: 0} 359 | switchIcons_3: {fileID: 0} 360 | switchIcons_4: {fileID: 0} 361 | switchIcons_5: {fileID: 0} 362 | switchIcons_6: {fileID: 0} 363 | switchIcons_7: {fileID: 0} 364 | switchIcons_8: {fileID: 0} 365 | switchIcons_9: {fileID: 0} 366 | switchIcons_10: {fileID: 0} 367 | switchIcons_11: {fileID: 0} 368 | switchIcons_12: {fileID: 0} 369 | switchIcons_13: {fileID: 0} 370 | switchIcons_14: {fileID: 0} 371 | switchSmallIcons_0: {fileID: 0} 372 | switchSmallIcons_1: {fileID: 0} 373 | switchSmallIcons_2: {fileID: 0} 374 | switchSmallIcons_3: {fileID: 0} 375 | switchSmallIcons_4: {fileID: 0} 376 | switchSmallIcons_5: {fileID: 0} 377 | switchSmallIcons_6: {fileID: 0} 378 | switchSmallIcons_7: {fileID: 0} 379 | switchSmallIcons_8: {fileID: 0} 380 | switchSmallIcons_9: {fileID: 0} 381 | switchSmallIcons_10: {fileID: 0} 382 | switchSmallIcons_11: {fileID: 0} 383 | switchSmallIcons_12: {fileID: 0} 384 | switchSmallIcons_13: {fileID: 0} 385 | switchSmallIcons_14: {fileID: 0} 386 | switchManualHTML: 387 | switchAccessibleURLs: 388 | switchLegalInformation: 389 | switchMainThreadStackSize: 1048576 390 | switchPresenceGroupId: 391 | switchLogoHandling: 0 392 | switchReleaseVersion: 0 393 | switchDisplayVersion: 1.0.0 394 | switchStartupUserAccount: 0 395 | switchTouchScreenUsage: 0 396 | switchSupportedLanguagesMask: 0 397 | switchLogoType: 0 398 | switchApplicationErrorCodeCategory: 399 | switchUserAccountSaveDataSize: 0 400 | switchUserAccountSaveDataJournalSize: 0 401 | switchApplicationAttribute: 0 402 | switchCardSpecSize: -1 403 | switchCardSpecClock: -1 404 | switchRatingsMask: 0 405 | switchRatingsInt_0: 0 406 | switchRatingsInt_1: 0 407 | switchRatingsInt_2: 0 408 | switchRatingsInt_3: 0 409 | switchRatingsInt_4: 0 410 | switchRatingsInt_5: 0 411 | switchRatingsInt_6: 0 412 | switchRatingsInt_7: 0 413 | switchRatingsInt_8: 0 414 | switchRatingsInt_9: 0 415 | switchRatingsInt_10: 0 416 | switchRatingsInt_11: 0 417 | switchLocalCommunicationIds_0: 418 | switchLocalCommunicationIds_1: 419 | switchLocalCommunicationIds_2: 420 | switchLocalCommunicationIds_3: 421 | switchLocalCommunicationIds_4: 422 | switchLocalCommunicationIds_5: 423 | switchLocalCommunicationIds_6: 424 | switchLocalCommunicationIds_7: 425 | switchParentalControl: 0 426 | switchAllowsScreenshot: 1 427 | switchAllowsVideoCapturing: 1 428 | switchAllowsRuntimeAddOnContentInstall: 0 429 | switchDataLossConfirmation: 0 430 | switchSupportedNpadStyles: 3 431 | switchNativeFsCacheSize: 32 432 | switchIsHoldTypeHorizontal: 0 433 | switchSupportedNpadCount: 8 434 | switchSocketConfigEnabled: 0 435 | switchTcpInitialSendBufferSize: 32 436 | switchTcpInitialReceiveBufferSize: 64 437 | switchTcpAutoSendBufferSizeMax: 256 438 | switchTcpAutoReceiveBufferSizeMax: 256 439 | switchUdpSendBufferSize: 9 440 | switchUdpReceiveBufferSize: 42 441 | switchSocketBufferEfficiency: 4 442 | switchSocketInitializeEnabled: 1 443 | switchNetworkInterfaceManagerInitializeEnabled: 1 444 | switchPlayerConnectionEnabled: 1 445 | ps4NPAgeRating: 12 446 | ps4NPTitleSecret: 447 | ps4NPTrophyPackPath: 448 | ps4ParentalLevel: 11 449 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 450 | ps4Category: 0 451 | ps4MasterVersion: 01.00 452 | ps4AppVersion: 01.00 453 | ps4AppType: 0 454 | ps4ParamSfxPath: 455 | ps4VideoOutPixelFormat: 0 456 | ps4VideoOutInitialWidth: 1920 457 | ps4VideoOutBaseModeInitialWidth: 1920 458 | ps4VideoOutReprojectionRate: 60 459 | ps4PronunciationXMLPath: 460 | ps4PronunciationSIGPath: 461 | ps4BackgroundImagePath: 462 | ps4StartupImagePath: 463 | ps4StartupImagesFolder: 464 | ps4IconImagesFolder: 465 | ps4SaveDataImagePath: 466 | ps4SdkOverride: 467 | ps4BGMPath: 468 | ps4ShareFilePath: 469 | ps4ShareOverlayImagePath: 470 | ps4PrivacyGuardImagePath: 471 | ps4NPtitleDatPath: 472 | ps4RemotePlayKeyAssignment: -1 473 | ps4RemotePlayKeyMappingDir: 474 | ps4PlayTogetherPlayerCount: 0 475 | ps4EnterButtonAssignment: 1 476 | ps4ApplicationParam1: 0 477 | ps4ApplicationParam2: 0 478 | ps4ApplicationParam3: 0 479 | ps4ApplicationParam4: 0 480 | ps4DownloadDataSize: 0 481 | ps4GarlicHeapSize: 2048 482 | ps4ProGarlicHeapSize: 2560 483 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 484 | ps4pnSessions: 1 485 | ps4pnPresence: 1 486 | ps4pnFriends: 1 487 | ps4pnGameCustomData: 1 488 | playerPrefsSupport: 0 489 | enableApplicationExit: 0 490 | restrictedAudioUsageRights: 0 491 | ps4UseResolutionFallback: 0 492 | ps4ReprojectionSupport: 0 493 | ps4UseAudio3dBackend: 0 494 | ps4SocialScreenEnabled: 0 495 | ps4ScriptOptimizationLevel: 0 496 | ps4Audio3dVirtualSpeakerCount: 14 497 | ps4attribCpuUsage: 0 498 | ps4PatchPkgPath: 499 | ps4PatchLatestPkgPath: 500 | ps4PatchChangeinfoPath: 501 | ps4PatchDayOne: 0 502 | ps4attribUserManagement: 0 503 | ps4attribMoveSupport: 0 504 | ps4attrib3DSupport: 0 505 | ps4attribShareSupport: 0 506 | ps4attribExclusiveVR: 0 507 | ps4disableAutoHideSplash: 0 508 | ps4videoRecordingFeaturesUsed: 0 509 | ps4contentSearchFeaturesUsed: 0 510 | ps4attribEyeToEyeDistanceSettingVR: 0 511 | ps4IncludedModules: [] 512 | monoEnv: 513 | psp2Splashimage: {fileID: 0} 514 | psp2NPTrophyPackPath: 515 | psp2NPSupportGBMorGJP: 0 516 | psp2NPAgeRating: 12 517 | psp2NPTitleDatPath: 518 | psp2NPCommsID: 519 | psp2NPCommunicationsID: 520 | psp2NPCommsPassphrase: 521 | psp2NPCommsSig: 522 | psp2ParamSfxPath: 523 | psp2ManualPath: 524 | psp2LiveAreaGatePath: 525 | psp2LiveAreaBackroundPath: 526 | psp2LiveAreaPath: 527 | psp2LiveAreaTrialPath: 528 | psp2PatchChangeInfoPath: 529 | psp2PatchOriginalPackage: 530 | psp2PackagePassword: F69AzBlax3CF3EDNhm3soLBPh71Yexui 531 | psp2KeystoneFile: 532 | psp2MemoryExpansionMode: 0 533 | psp2DRMType: 0 534 | psp2StorageType: 0 535 | psp2MediaCapacity: 0 536 | psp2DLCConfigPath: 537 | psp2ThumbnailPath: 538 | psp2BackgroundPath: 539 | psp2SoundPath: 540 | psp2TrophyCommId: 541 | psp2TrophyPackagePath: 542 | psp2PackagedResourcesPath: 543 | psp2SaveDataQuota: 10240 544 | psp2ParentalLevel: 1 545 | psp2ShortTitle: Not Set 546 | psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF 547 | psp2Category: 0 548 | psp2MasterVersion: 01.00 549 | psp2AppVersion: 01.00 550 | psp2TVBootMode: 0 551 | psp2EnterButtonAssignment: 2 552 | psp2TVDisableEmu: 0 553 | psp2AllowTwitterDialog: 1 554 | psp2Upgradable: 0 555 | psp2HealthWarning: 0 556 | psp2UseLibLocation: 0 557 | psp2InfoBarOnStartup: 0 558 | psp2InfoBarColor: 0 559 | psp2ScriptOptimizationLevel: 0 560 | splashScreenBackgroundSourceLandscape: {fileID: 0} 561 | splashScreenBackgroundSourcePortrait: {fileID: 0} 562 | spritePackerPolicy: 563 | webGLMemorySize: 256 564 | webGLExceptionSupport: 1 565 | webGLNameFilesAsHashes: 0 566 | webGLDataCaching: 1 567 | webGLDebugSymbols: 0 568 | webGLEmscriptenArgs: 569 | webGLModulesDirectory: 570 | webGLTemplate: APPLICATION:Default 571 | webGLAnalyzeBuildSize: 0 572 | webGLUseEmbeddedResources: 0 573 | webGLCompressionFormat: 1 574 | webGLLinkerTarget: 1 575 | scriptingDefineSymbols: {} 576 | platformArchitecture: {} 577 | scriptingBackend: {} 578 | il2cppCompilerConfiguration: {} 579 | incrementalIl2cppBuild: {} 580 | allowUnsafeCode: 0 581 | additionalIl2CppArgs: 582 | scriptingRuntimeVersion: 0 583 | apiCompatibilityLevelPerPlatform: {} 584 | m_RenderingPath: 1 585 | m_MobileRenderingPath: 1 586 | metroPackageName: Template_3D 587 | metroPackageVersion: 588 | metroCertificatePath: 589 | metroCertificatePassword: 590 | metroCertificateSubject: 591 | metroCertificateIssuer: 592 | metroCertificateNotAfter: 0000000000000000 593 | metroApplicationDescription: Template_3D 594 | wsaImages: {} 595 | metroTileShortName: 596 | metroTileShowName: 0 597 | metroMediumTileShowName: 0 598 | metroLargeTileShowName: 0 599 | metroWideTileShowName: 0 600 | metroDefaultTileSize: 1 601 | metroTileForegroundText: 2 602 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 603 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 604 | a: 1} 605 | metroSplashScreenUseBackgroundColor: 0 606 | platformCapabilities: {} 607 | metroFTAName: 608 | metroFTAFileTypes: [] 609 | metroProtocolName: 610 | metroCompilationOverrides: 1 611 | n3dsUseExtSaveData: 0 612 | n3dsCompressStaticMem: 1 613 | n3dsExtSaveDataNumber: 0x12345 614 | n3dsStackSize: 131072 615 | n3dsTargetPlatform: 2 616 | n3dsRegion: 7 617 | n3dsMediaSize: 0 618 | n3dsLogoStyle: 3 619 | n3dsTitle: GameName 620 | n3dsProductCode: 621 | n3dsApplicationId: 0xFF3FF 622 | XboxOneProductId: 623 | XboxOneUpdateKey: 624 | XboxOneSandboxId: 625 | XboxOneContentId: 626 | XboxOneTitleId: 627 | XboxOneSCId: 628 | XboxOneGameOsOverridePath: 629 | XboxOnePackagingOverridePath: 630 | XboxOneAppManifestOverridePath: 631 | XboxOneVersion: 1.0.0.0 632 | XboxOnePackageEncryption: 0 633 | XboxOnePackageUpdateGranularity: 2 634 | XboxOneDescription: 635 | XboxOneLanguage: 636 | - enus 637 | XboxOneCapability: [] 638 | XboxOneGameRating: {} 639 | XboxOneIsContentPackage: 0 640 | XboxOneEnableGPUVariability: 0 641 | XboxOneSockets: {} 642 | XboxOneSplashScreen: {fileID: 0} 643 | XboxOneAllowedProductIds: [] 644 | XboxOnePersistentLocalStorageSize: 0 645 | XboxOneXTitleMemory: 8 646 | xboxOneScriptCompiler: 0 647 | vrEditorSettings: 648 | daydream: 649 | daydreamIconForeground: {fileID: 0} 650 | daydreamIconBackground: {fileID: 0} 651 | cloudServicesEnabled: 652 | UNet: 1 653 | facebookSdkVersion: 7.9.4 654 | apiCompatibilityLevel: 2 655 | cloudProjectId: 656 | projectName: 657 | organizationId: 658 | cloudEnabled: 0 659 | enableNativePlatformBackendsForNewInputSystem: 0 660 | disableOldInputManagerSupport: 0 661 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2018.2.9f1 2 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 4 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | blendWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | particleRaycastBudget: 4 33 | asyncUploadTimeSlice: 2 34 | asyncUploadBufferSize: 4 35 | resolutionScalingFixedDPIFactor: 1 36 | excludedTargetPlatforms: [] 37 | - serializedVersion: 2 38 | name: Low 39 | pixelLightCount: 0 40 | shadows: 0 41 | shadowResolution: 0 42 | shadowProjection: 1 43 | shadowCascades: 1 44 | shadowDistance: 20 45 | shadowNearPlaneOffset: 3 46 | shadowCascade2Split: 0.33333334 47 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 48 | shadowmaskMode: 0 49 | blendWeights: 2 50 | textureQuality: 0 51 | anisotropicTextures: 0 52 | antiAliasing: 0 53 | softParticles: 0 54 | softVegetation: 0 55 | realtimeReflectionProbes: 0 56 | billboardsFaceCameraPosition: 0 57 | vSyncCount: 0 58 | lodBias: 0.4 59 | maximumLODLevel: 0 60 | particleRaycastBudget: 16 61 | asyncUploadTimeSlice: 2 62 | asyncUploadBufferSize: 4 63 | resolutionScalingFixedDPIFactor: 1 64 | excludedTargetPlatforms: [] 65 | - serializedVersion: 2 66 | name: Medium 67 | pixelLightCount: 1 68 | shadows: 1 69 | shadowResolution: 0 70 | shadowProjection: 1 71 | shadowCascades: 1 72 | shadowDistance: 20 73 | shadowNearPlaneOffset: 3 74 | shadowCascade2Split: 0.33333334 75 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 76 | shadowmaskMode: 0 77 | blendWeights: 2 78 | textureQuality: 0 79 | anisotropicTextures: 1 80 | antiAliasing: 0 81 | softParticles: 0 82 | softVegetation: 0 83 | realtimeReflectionProbes: 0 84 | billboardsFaceCameraPosition: 0 85 | vSyncCount: 1 86 | lodBias: 0.7 87 | maximumLODLevel: 0 88 | particleRaycastBudget: 64 89 | asyncUploadTimeSlice: 2 90 | asyncUploadBufferSize: 4 91 | resolutionScalingFixedDPIFactor: 1 92 | excludedTargetPlatforms: [] 93 | - serializedVersion: 2 94 | name: High 95 | pixelLightCount: 2 96 | shadows: 2 97 | shadowResolution: 1 98 | shadowProjection: 1 99 | shadowCascades: 2 100 | shadowDistance: 40 101 | shadowNearPlaneOffset: 3 102 | shadowCascade2Split: 0.33333334 103 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 104 | shadowmaskMode: 1 105 | blendWeights: 2 106 | textureQuality: 0 107 | anisotropicTextures: 1 108 | antiAliasing: 2 109 | softParticles: 0 110 | softVegetation: 1 111 | realtimeReflectionProbes: 1 112 | billboardsFaceCameraPosition: 1 113 | vSyncCount: 1 114 | lodBias: 1 115 | maximumLODLevel: 0 116 | particleRaycastBudget: 256 117 | asyncUploadTimeSlice: 2 118 | asyncUploadBufferSize: 4 119 | resolutionScalingFixedDPIFactor: 1 120 | excludedTargetPlatforms: [] 121 | - serializedVersion: 2 122 | name: Very High 123 | pixelLightCount: 3 124 | shadows: 2 125 | shadowResolution: 2 126 | shadowProjection: 1 127 | shadowCascades: 2 128 | shadowDistance: 40 129 | shadowNearPlaneOffset: 3 130 | shadowCascade2Split: 0.33333334 131 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 132 | shadowmaskMode: 1 133 | blendWeights: 4 134 | textureQuality: 0 135 | anisotropicTextures: 1 136 | antiAliasing: 4 137 | softParticles: 1 138 | softVegetation: 1 139 | realtimeReflectionProbes: 1 140 | billboardsFaceCameraPosition: 1 141 | vSyncCount: 1 142 | lodBias: 1.5 143 | maximumLODLevel: 0 144 | particleRaycastBudget: 1024 145 | asyncUploadTimeSlice: 2 146 | asyncUploadBufferSize: 4 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Ultra 151 | pixelLightCount: 4 152 | shadows: 2 153 | shadowResolution: 2 154 | shadowProjection: 1 155 | shadowCascades: 4 156 | shadowDistance: 150 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 1 164 | antiAliasing: 4 165 | softParticles: 1 166 | softVegetation: 1 167 | realtimeReflectionProbes: 1 168 | billboardsFaceCameraPosition: 1 169 | vSyncCount: 1 170 | lodBias: 2 171 | maximumLODLevel: 0 172 | particleRaycastBudget: 4096 173 | asyncUploadTimeSlice: 2 174 | asyncUploadBufferSize: 4 175 | resolutionScalingFixedDPIFactor: 1 176 | excludedTargetPlatforms: [] 177 | m_PerPlatformDefaultQuality: 178 | Android: 2 179 | Nintendo 3DS: 5 180 | Nintendo Switch: 5 181 | PS4: 5 182 | PSP2: 2 183 | Standalone: 5 184 | Tizen: 2 185 | WebGL: 3 186 | WiiU: 5 187 | Windows Store Apps: 5 188 | XboxOne: 5 189 | iPhone: 2 190 | tvOS: 2 191 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - PostProcessing 17 | - 18 | - 19 | - Portal1 20 | - Portal2 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.1 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | m_Enabled: 0 7 | m_TestMode: 0 8 | m_TestEventUrl: 9 | m_TestConfigUrl: 10 | m_TestInitMode: 0 11 | CrashReportingSettings: 12 | m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes 13 | m_NativeEventUrl: https://perf-events.cloud.unity3d.com/symbolicate 14 | m_Enabled: 0 15 | m_CaptureEditorExceptions: 1 16 | UnityPurchasingSettings: 17 | m_Enabled: 0 18 | m_TestMode: 0 19 | UnityAnalyticsSettings: 20 | m_Enabled: 0 21 | m_InitializeOnStartup: 1 22 | m_TestMode: 0 23 | m_TestEventUrl: 24 | m_TestConfigUrl: 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # UnityPortals ![alt text](https://i.postimg.cc/xdyHc6nN/wheatley.png) 2 | 3 | Working portal system in Unity. Camera can seamlessly move through them. 4 | The portal object has a MonoBehaviour that renders a cached camera before rendering itself using MonoBehaviour's "OnWillRenderObject", this creates a chain reaction of layers until a fixed amount is reached. 5 | This amount can be anything from 1 to 16, or if you feel like destroying your memory you could ofcourse set it higher than that. 6 | 7 | It is also not limited to only 2 portals. You can create as many pairs as you want, just link them together in their inspectors. 8 | However they seem to sneakily steal each other's temporary buffers when having more than 2 pairs. 9 | 10 | You can throw any rigidbody through the portals, in the example scene is a ball you can roll through it. Only it slowly becomes an egg after a few times, weirdest glitch ever. If you make Portal a rigidbody and throw it through it's connecting portal, your PC might explode. 11 | 12 | Can be a bit glitchy when using certain rotations, still working on that 13 | ![alt text](https://i.postimg.cc/VLRw6MbZ/portal1.jpg) 14 | --------------------------------------------------------------------------------