├── .gitignore ├── .gitmodules ├── Assets ├── DepthConfig.cs ├── DepthConfig.cs.meta ├── GPUPointCloudRenderer.cs ├── GPUPointCloudRenderer.cs.meta ├── Materials.meta ├── Materials │ ├── PointCloud.mat │ └── PointCloud.mat.meta ├── Plugins.meta ├── Plugins │ ├── x86_64.meta │ └── x86_64 │ │ ├── libunhvd.so │ │ └── libunhvd.so.meta ├── PointCloudRenderer.cs ├── PointCloudRenderer.cs.meta ├── RawImageVideoRenderer.cs ├── RawImageVideoRenderer.cs.meta ├── Scenes.meta ├── Scenes │ ├── SampleScene.unity │ └── SampleScene.unity.meta ├── Shaders.meta ├── Shaders │ ├── VertexColor.shader │ ├── VertexColor.shader.meta │ └── hardware-depth-unprojector.meta ├── UI.meta ├── UI │ ├── FPSDisplay.cs │ ├── FPSDisplay.cs.meta │ ├── MouseRts.cs │ └── MouseRts.cs.meta ├── UNHVD.cs ├── UNHVD.cs.meta ├── VideoRenderer.cs └── VideoRenderer.cs.meta ├── LICENSE ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── PackageManagerSettings.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityConnectSettings.asset ├── VFXManager.asset └── XRSettings.asset └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | [Ll]ibrary/ 2 | [Tt]emp/ 3 | [Oo]bj/ 4 | [Bb]uild/ 5 | [Bb]uilds/ 6 | Assets/AssetStoreTools* 7 | 8 | # Visual Studio cache directory 9 | .vs/ 10 | 11 | # Autogenerated VS/MD/Consulo solution and project files 12 | ExportedObj/ 13 | .consulo/ 14 | *.csproj 15 | *.unityproj 16 | *.sln 17 | *.suo 18 | *.tmp 19 | *.user 20 | *.userprefs 21 | *.pidb 22 | *.booproj 23 | *.svd 24 | *.pdb 25 | *.opendb 26 | 27 | # Unity3D generated meta files 28 | *.pidb.meta 29 | *.pdb.meta 30 | 31 | # Unity3D Generated File On Crash Reports 32 | sysinfo.txt 33 | 34 | # Builds 35 | *.apk 36 | *.unitypackage 37 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "PluginsSource/unhvd-native"] 2 | path = PluginsSource/unhvd-native 3 | url = https://github.com/bmegli/unhvd-native.git 4 | [submodule "Assets/Shaders/hardware-depth-unprojector"] 5 | path = Assets/Shaders/hardware-depth-unprojector 6 | url = https://github.com/bmegli/hardware-depth-unprojector.git 7 | -------------------------------------------------------------------------------- /Assets/DepthConfig.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Unity Network Hardware Video Decoder 3 | * 4 | * Copyright 2020 (C) Bartosz Meglicki 5 | * 6 | * This Source Code Form is subject to the terms of the Mozilla Public 7 | * License, v. 2.0. If a copy of the MPL was not distributed with this 8 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | * 10 | */ 11 | 12 | using System.Collections; 13 | using System.Collections.Generic; 14 | using UnityEngine; 15 | 16 | public class DepthConfig 17 | { 18 | public float ppx; 19 | public float ppy; 20 | public float fx; 21 | public float fy; 22 | public float depth_unit; 23 | public float min_margin; 24 | public float max_margin; 25 | } 26 | -------------------------------------------------------------------------------- /Assets/DepthConfig.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8582154584543482fb5efcabf5245c89 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/GPUPointCloudRenderer.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Unity Network Hardware Video Decoder 3 | * 4 | * Copyright 2020 (C) Bartosz Meglicki 5 | * 6 | * This Source Code Form is subject to the terms of the Mozilla Public 7 | * License, v. 2.0. If a copy of the MPL was not distributed with this 8 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | * 10 | */ 11 | 12 | using System; 13 | using UnityEngine; 14 | using UnityEngine.Rendering; 15 | using Unity.Collections; 16 | 17 | public class GPUPointCloudRenderer : MonoBehaviour 18 | { 19 | public string device = "/dev/dri/renderD128"; 20 | public string ip = ""; 21 | public ushort port = 9768; 22 | 23 | public ComputeShader unprojectionShader; 24 | public Shader pointCloudShader; 25 | 26 | private IntPtr unhvd; 27 | 28 | private UNHVD.unhvd_frame[] frame = new UNHVD.unhvd_frame[] 29 | { 30 | new UNHVD.unhvd_frame{ data=new System.IntPtr[3], linesize=new int[3] }, 31 | new UNHVD.unhvd_frame{ data=new System.IntPtr[3], linesize=new int[3] } 32 | }; 33 | 34 | private Texture2D depthTexture; //uint16 depth map filled with data from native side 35 | private Texture2D colorTexture; //rgb0 color map filled with data from native side 36 | 37 | private ComputeBuffer vertexBuffer; 38 | private ComputeBuffer argsBuffer; 39 | 40 | private Material material; 41 | 42 | void Awake() 43 | { 44 | //Application.targetFrameRate = 30; 45 | 46 | UNHVD.unhvd_net_config net_config = new UNHVD.unhvd_net_config{ip=this.ip, port=this.port, timeout_ms=500 }; 47 | UNHVD.unhvd_hw_config[] hw_config = new UNHVD.unhvd_hw_config[] 48 | { 49 | new UNHVD.unhvd_hw_config{hardware="vaapi", codec="hevc", device=this.device, pixel_format="p010le", width=848, height=480, profile=2}, 50 | new UNHVD.unhvd_hw_config{hardware="vaapi", codec="hevc", device=this.device, pixel_format="rgb0", width=848, height=480, profile=1} 51 | }; 52 | 53 | IntPtr nullPtr = IntPtr.Zero; 54 | 55 | unhvd = UNHVD.unhvd_init (ref net_config, hw_config, hw_config.Length, IntPtr.Zero); 56 | 57 | if (unhvd == IntPtr.Zero) 58 | { 59 | Debug.Log("failed to initialize UNHVD"); 60 | gameObject.SetActive (false); 61 | return; 62 | } 63 | 64 | argsBuffer = new ComputeBuffer( 4, sizeof( int ), ComputeBufferType.IndirectArguments ); 65 | //vertex count per instance, instance count, start vertex location, start instance location 66 | //see https://docs.unity3d.com/2019.4/Documentation/ScriptReference/Graphics.DrawProceduralIndirectNow.html 67 | argsBuffer.SetData( new int[] { 0, 1, 0, 0 } ); 68 | 69 | //For depth config explanation see: 70 | //https://github.com/bmegli/unity-network-hardware-video-decoder/wiki/Point-clouds-configuration 71 | 72 | //For D435 at 848x480 the MinZ is ~16.8cm, in our result unit min_margin is 0.168 73 | //max_margin is arbitrarilly set 74 | DepthConfig dc = new DepthConfig {ppx = 421.353f, ppy=240.93f, fx=426.768f, fy=426.768f, depth_unit = 0.0001f, min_margin = 0.168f, max_margin = 0.01f}; 75 | //DepthConfig dc = new DepthConfig {ppx = 421.353f, ppy=240.93f, fx=426.768f, fy=426.768f, depth_unit = 0.0000390625f, min_margin = 0.168f, max_margin = 0.01f}; 76 | 77 | //sample config for D455 848x480 with depth units resulting in 2.5 mm precision and 2.5575 m range, MinZ at 848x480 is 350 mm, for depth, depth + ir, depth aligned color 78 | //DepthConfig dc = new DepthConfig{ppx = 426.33f, ppy=239.446f, fx=422.768f, fy=422.768f, depth_unit = 0.0000390625f, min_margin = 0.35f, max_margin = 0.01f}; 79 | 80 | SetDepthConfig(dc); 81 | } 82 | 83 | void SetDepthConfig(DepthConfig dc) 84 | { 85 | //The depth texture values will be normalied in the shader, 16 bit to [0, 1] 86 | float maxDistance = dc.depth_unit * 0xffff; 87 | //Normalize also valid ranges 88 | float minValidDistance = dc.min_margin / maxDistance; 89 | //Our depth encoding uses P010LE format for depth texture which uses 10 MSB of 16 bits (0xffc0 is 10 "1" and 6 "0") 90 | float maxValidDistance = (dc.depth_unit * 0xffc0 - dc.max_margin) / maxDistance; 91 | //The multiplier renormalizes [0, 1] to real world units again and is part of unprojection 92 | float[] unprojectionMultiplier = {maxDistance / dc.fx, maxDistance / dc.fy, maxDistance}; 93 | 94 | unprojectionShader.SetFloats("UnprojectionMultiplier", unprojectionMultiplier); 95 | unprojectionShader.SetFloat("PPX", dc.ppx); 96 | unprojectionShader.SetFloat("PPY", dc.ppy); 97 | unprojectionShader.SetFloat("MinDistance", minValidDistance); 98 | unprojectionShader.SetFloat("MaxDistance", maxValidDistance); 99 | } 100 | 101 | void OnDestroy() 102 | { 103 | UNHVD.unhvd_close (unhvd); 104 | 105 | if(vertexBuffer != null) 106 | vertexBuffer.Release(); 107 | 108 | if(argsBuffer != null) 109 | argsBuffer.Release(); 110 | 111 | if (material != null) 112 | { 113 | if (Application.isPlaying) 114 | Destroy(material); 115 | else 116 | DestroyImmediate(material); 117 | } 118 | } 119 | 120 | void LateUpdate () 121 | { 122 | bool updateNeeded = false; 123 | 124 | if (UNHVD.unhvd_get_frame_begin(unhvd, frame) == 0) 125 | updateNeeded = PrepareTextures(); 126 | 127 | if (UNHVD.unhvd_get_frame_end (unhvd) != 0) 128 | Debug.LogWarning ("Failed to get UNHVD frame data"); 129 | 130 | if(!updateNeeded) 131 | return; 132 | 133 | depthTexture.Apply (false); 134 | colorTexture.Apply (false); 135 | 136 | vertexBuffer.SetCounterValue(0); 137 | unprojectionShader.Dispatch(0, frame[0].width/8, frame[0].height/8, 1); 138 | ComputeBuffer.CopyCount(vertexBuffer, argsBuffer, 0); 139 | } 140 | 141 | private bool PrepareTextures() 142 | { 143 | if(frame[0].data[0] == IntPtr.Zero) 144 | return false; 145 | 146 | Adapt(); 147 | 148 | depthTexture.LoadRawTextureData (frame[0].data[0], frame[0].linesize[0] * frame[0].height); 149 | 150 | if(frame[1].data[0] == IntPtr.Zero) 151 | return true; //only depth data is also ok 152 | 153 | colorTexture.LoadRawTextureData (frame[1].data[0], frame[1].linesize[0] * frame[1].height); 154 | 155 | return true; 156 | } 157 | 158 | private void Adapt() 159 | { 160 | //adapt to incoming stream if something changed 161 | if(depthTexture == null || depthTexture.width != frame[0].width || depthTexture.height != frame[0].height) 162 | { 163 | depthTexture = new Texture2D (frame[0].width, frame[0].height, TextureFormat.R16, false); 164 | unprojectionShader.SetTexture(0, "depthTexture", depthTexture); 165 | 166 | vertexBuffer = new ComputeBuffer(frame[0].width*frame[0].height, 2 * sizeof(float)*4, ComputeBufferType.Append); 167 | unprojectionShader.SetBuffer(0, "vertices", vertexBuffer); 168 | } 169 | 170 | if(colorTexture == null || colorTexture.width != frame[1].width || colorTexture.height != frame[1].height) 171 | { 172 | if(frame[1].data[0] != IntPtr.Zero) 173 | colorTexture = new Texture2D (frame[1].width, frame[1].height, TextureFormat.RGBA32, false); 174 | else 175 | { //in case only depth data is coming prepare dummy color texture 176 | colorTexture = new Texture2D (frame[0].width, frame[0].height, TextureFormat.RGBA32, false); 177 | uint[] data = new uint[frame[0].width * frame[0].height]; 178 | for(int i=0;i 5 | * 6 | * This Source Code Form is subject to the terms of the Mozilla Public 7 | * License, v. 2.0. If a copy of the MPL was not distributed with this 8 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | * 10 | */ 11 | 12 | using System; 13 | using UnityEngine; 14 | using UnityEngine.Rendering; 15 | using Unity.Collections; 16 | using Unity.Collections.LowLevel.Unsafe; 17 | 18 | [RequireComponent(typeof(MeshFilter), typeof(MeshRenderer))] 19 | public class PointCloudRenderer : MonoBehaviour 20 | { 21 | public string device = "/dev/dri/renderD128"; 22 | public string ip = ""; 23 | public ushort port = 9768; 24 | 25 | private IntPtr unhvd; 26 | private UNHVD.unhvd_frame frame = new UNHVD.unhvd_frame{ data=new System.IntPtr[3], linesize=new int[3] }; 27 | private UNHVD.unhvd_point_cloud point_cloud = new UNHVD.unhvd_point_cloud {data = System.IntPtr.Zero, size=0, used=0}; 28 | 29 | private Mesh mesh; 30 | 31 | void Awake() 32 | { 33 | UNHVD.unhvd_net_config net_config = new UNHVD.unhvd_net_config{ip=this.ip, port=this.port, timeout_ms=500 }; 34 | UNHVD.unhvd_hw_config[] hw_config = new UNHVD.unhvd_hw_config[] 35 | { 36 | new UNHVD.unhvd_hw_config{hardware="vaapi", codec="hevc", device=this.device, pixel_format="p010le", width=848, height=480, profile=2}, 37 | new UNHVD.unhvd_hw_config{hardware="vaapi", codec="hevc", device=this.device, pixel_format="rgb0", width=848, height=480, profile=1} 38 | }; 39 | 40 | //For depth config explanation see: 41 | //https://github.com/bmegli/unity-network-hardware-video-decoder/wiki/Point-clouds-configuration 42 | 43 | //For MinZ formula see BKMs_Tuning_RealSense_D4xx_Cam.pdf 44 | //For D435 at 848x480 the MinZ is ~16.8cm, in our result unit min_margin is 0.168 45 | //max_margin is arbitrarilly set 46 | 47 | DepthConfig dc = new DepthConfig {ppx = 421.353f, ppy=240.93f, fx=426.768f, fy=426.768f, depth_unit = 0.0001f, min_margin = 0.168f, max_margin = 0.01f }; 48 | //DepthConfig dc = new DepthConfig {ppx = 421.353f, ppy=240.93f, fx=426.768f, fy=426.768f, depth_unit = 0.0000390625f, min_margin = 0.168f, max_margin = 0.01f}; 49 | //DepthConfig dc - new DepthConfig {ppx = 421.353f, ppy=240.93f, fx=426.768f, fy=426.768f, depth_unit = 0.00003125f, min_margin = 0.168f, max_margin = 0.01f}; 50 | 51 | //sample config for depth + color, depth aligned to 848x480 color (so we use color intrinsics, not depth intrinsics) 52 | //DepthConfig dc = new DepthConfig{ppx = 425.038f, ppy=249.114f, fx=618.377f, fy=618.411f, depth_unit = 0.0001f, min_margin = 0.168f, max_margin = 0.01f}; 53 | 54 | //sample config for L515 640x480 with depth units resulting in 2.5 mm precision and 2.5575 m range (alignment to depth) 55 | //DepthConfig dc = new DepthConfig{ppx = 358.781f, ppy=246.297f, fx=470.941f, fy=470.762f, depth_unit = 0.0000390625f, min_margin = 0.19f, max_margin = 0.01f}; 56 | 57 | //sample config for L515 1280x720 with depth units resulting in 2.5 mm precision and 2.5575 m range (alignment to color) 58 | //DepthConfig dc = new DepthConfig{ppx = 647.881f, ppy=368.939f, fx=906.795f, fy=906.768f, depth_unit = 0.0000390625f, min_margin = 0.19f, max_margin = 0.01f}; 59 | //DepthConfig dc = new DepthConfig{ppx = 647.881f, ppy=368.939f, fx=906.795f, fy=906.768f, depth_unit = 0.000250f, min_margin = 0.19f, max_margin = 0.01f}; 60 | 61 | //sample config for D455 848x480 with depth units resulting in 2.5 mm precision and 2.5575 m range, MinZ at 848x480 is 350 mm, for depth, depth + ir, depth aligned color 62 | //DepthConfig dc = new DepthConfig{ppx = 426.33f, ppy=239.446f, fx=422.768f, fy=422.768f, depth_unit = 0.0000390625f, min_margin = 0.35f, max_margin = 0.01f}; 63 | //as above, alignment to color, distortion model ignored 64 | //DepthConfig dc = new DepthConfig{ppx = 419.278f, ppy=244.24f, fx=419.909f, fy=418.804f, depth_unit = 0.0000390625f, min_margin = 0.35f, max_margin = 0.01f}; 65 | 66 | UNHVD.unhvd_depth_config depth_config = new UNHVD.unhvd_depth_config{ppx = dc.ppx, ppy = dc.ppy, fx = dc.fx, fy = dc.fy, depth_unit = dc.depth_unit, min_margin = dc.min_margin, max_margin = dc.max_margin}; 67 | 68 | unhvd=UNHVD.unhvd_init (ref net_config, hw_config, hw_config.Length, ref depth_config); 69 | 70 | if (unhvd == IntPtr.Zero) 71 | { 72 | Debug.Log ("failed to initialize UNHVD"); 73 | gameObject.SetActive (false); 74 | } 75 | } 76 | void OnDestroy() 77 | { 78 | UNHVD.unhvd_close (unhvd); 79 | } 80 | 81 | private void PrepareMesh(int size) 82 | { 83 | if(mesh == null) 84 | mesh = new Mesh(); 85 | 86 | if(mesh.vertexCount == size) 87 | return; 88 | 89 | mesh.MarkDynamic(); 90 | 91 | //we don't want to recalculate bounds for half million dynamic points so just set wide bounds 92 | mesh.bounds = new Bounds(new Vector3(0, 0, 0), new Vector3(10, 10, 10)); 93 | 94 | //make Unity internal mesh data match our native mesh data (separate streams for position and colors) 95 | VertexAttributeDescriptor[] layout = new[] 96 | { 97 | new VertexAttributeDescriptor(UnityEngine.Rendering.VertexAttribute.Position, VertexAttributeFormat.Float32, 3, 0), 98 | new VertexAttributeDescriptor(UnityEngine.Rendering.VertexAttribute.Color, VertexAttributeFormat.UNorm8, 4, 1), 99 | }; 100 | 101 | mesh.SetVertexBufferParams(size, layout); 102 | 103 | mesh.indexFormat = UnityEngine.Rendering.IndexFormat.UInt32; 104 | int[] indices = new int[size]; 105 | for(int i=0;i().mesh = mesh; 111 | } 112 | 113 | void LateUpdate () 114 | { 115 | if (UNHVD.unhvd_get_point_cloud_begin(unhvd, ref point_cloud) == 0) 116 | { 117 | PrepareMesh(point_cloud.size); 118 | 119 | //possible optimization - only render non-zero points (point_cloud.used) 120 | unsafe 121 | { 122 | NativeArray pc = NativeArrayUnsafeUtility.ConvertExistingDataToNativeArray(point_cloud.data.ToPointer(), point_cloud.size, Allocator.None); 123 | NativeArray colors = NativeArrayUnsafeUtility.ConvertExistingDataToNativeArray(point_cloud.colors.ToPointer(), point_cloud.size, Allocator.None); 124 | #if ENABLE_UNITY_COLLECTIONS_CHECKS 125 | NativeArrayUnsafeUtility.SetAtomicSafetyHandle(ref pc, AtomicSafetyHandle.Create()); 126 | NativeArrayUnsafeUtility.SetAtomicSafetyHandle(ref colors, AtomicSafetyHandle.Create()); 127 | #endif 128 | mesh.SetVertexBufferData(pc, 0, 0, point_cloud.size, 0, MeshUpdateFlags.DontNotifyMeshUsers | MeshUpdateFlags.DontRecalculateBounds); 129 | mesh.SetVertexBufferData(colors, 0, 0, point_cloud.size, 1, MeshUpdateFlags.DontNotifyMeshUsers | MeshUpdateFlags.DontRecalculateBounds); 130 | } 131 | } 132 | 133 | if (UNHVD.unhvd_get_point_cloud_end (unhvd) != 0) 134 | Debug.LogWarning ("Failed to get UNHVD point cloud data"); 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /Assets/PointCloudRenderer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eebbb98d8203c62a98e8d5a14b6a6ceb 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/RawImageVideoRenderer.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Unity Network Hardware Video Decoder 3 | * 4 | * Copyright 2019 (C) Bartosz Meglicki 5 | * 6 | * This Source Code Form is subject to the terms of the Mozilla Public 7 | * License, v. 2.0. If a copy of the MPL was not distributed with this 8 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | * 10 | */ 11 | 12 | using System; 13 | using UnityEngine; 14 | using UnityEngine.UI; //RawImage 15 | 16 | public class RawImageVideoRenderer : MonoBehaviour 17 | { 18 | public string device = "/dev/dri/renderD128"; 19 | public string ip = ""; 20 | public ushort port = 9766; 21 | 22 | private IntPtr unhvd; 23 | private UNHVD.unhvd_frame frame = new UNHVD.unhvd_frame{ data=new System.IntPtr[3], linesize=new int[3] }; 24 | private Texture2D videoTexture; 25 | 26 | void Awake() 27 | { 28 | UNHVD.unhvd_hw_config hw_config = new UNHVD.unhvd_hw_config{hardware="vaapi", codec="h264", device=this.device, pixel_format="bgr0", width=0, height=0, profile=0}; 29 | UNHVD.unhvd_net_config net_config = new UNHVD.unhvd_net_config{ip=this.ip, port=this.port, timeout_ms=500 }; 30 | 31 | unhvd=UNHVD.unhvd_init (ref net_config, ref hw_config); 32 | 33 | if (unhvd == IntPtr.Zero) 34 | { 35 | Debug.Log ("failed to initialize UNHVD"); 36 | gameObject.SetActive (false); 37 | } 38 | 39 | } 40 | void OnDestroy() 41 | { 42 | UNHVD.unhvd_close (unhvd); 43 | } 44 | 45 | private void AdaptTexture() 46 | { 47 | if(videoTexture== null || videoTexture.width != frame.width || videoTexture.height != frame.height) 48 | { 49 | videoTexture = new Texture2D (frame.width, frame.height, TextureFormat.BGRA32, false); 50 | GetComponent ().texture = videoTexture; 51 | } 52 | } 53 | 54 | // Update is called once per frame 55 | void LateUpdate () 56 | { 57 | if (UNHVD.unhvd_get_frame_begin(unhvd, ref frame) == 0) 58 | { 59 | AdaptTexture (); 60 | videoTexture.LoadRawTextureData (frame.data[0], frame.width*frame.height*4); 61 | videoTexture.Apply (false); 62 | } 63 | 64 | if (UNHVD.unhvd_get_frame_end (unhvd) != 0) 65 | Debug.LogWarning ("Failed to get UNHVD frame data"); 66 | } 67 | } -------------------------------------------------------------------------------- /Assets/RawImageVideoRenderer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 12effc58cbb744b51ba7e080578fcc88 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f704ae4b4f98ae41a0bce26658850c1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/SampleScene.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 47 | m_GIWorkflowMode: 0 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 10 60 | m_AtlasSize: 512 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 256 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 256 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 2 83 | m_PVRDenoiserTypeDirect: 0 84 | m_PVRDenoiserTypeIndirect: 0 85 | m_PVRDenoiserTypeAO: 0 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 0 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_UseShadowmask: 1 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | debug: 122 | m_Flags: 0 123 | m_NavMeshData: {fileID: 0} 124 | --- !u!1 &170076733 125 | GameObject: 126 | m_ObjectHideFlags: 0 127 | m_CorrespondingSourceObject: {fileID: 0} 128 | m_PrefabInstance: {fileID: 0} 129 | m_PrefabAsset: {fileID: 0} 130 | serializedVersion: 6 131 | m_Component: 132 | - component: {fileID: 170076735} 133 | - component: {fileID: 170076734} 134 | m_Layer: 0 135 | m_Name: Directional Light 136 | m_TagString: Untagged 137 | m_Icon: {fileID: 0} 138 | m_NavMeshLayer: 0 139 | m_StaticEditorFlags: 0 140 | m_IsActive: 1 141 | --- !u!108 &170076734 142 | Light: 143 | m_ObjectHideFlags: 0 144 | m_CorrespondingSourceObject: {fileID: 0} 145 | m_PrefabInstance: {fileID: 0} 146 | m_PrefabAsset: {fileID: 0} 147 | m_GameObject: {fileID: 170076733} 148 | m_Enabled: 1 149 | serializedVersion: 10 150 | m_Type: 1 151 | m_Shape: 0 152 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 153 | m_Intensity: 1 154 | m_Range: 10 155 | m_SpotAngle: 30 156 | m_InnerSpotAngle: 21.802082 157 | m_CookieSize: 10 158 | m_Shadows: 159 | m_Type: 2 160 | m_Resolution: -1 161 | m_CustomResolution: -1 162 | m_Strength: 1 163 | m_Bias: 0.05 164 | m_NormalBias: 0.4 165 | m_NearPlane: 0.2 166 | m_CullingMatrixOverride: 167 | e00: 1 168 | e01: 0 169 | e02: 0 170 | e03: 0 171 | e10: 0 172 | e11: 1 173 | e12: 0 174 | e13: 0 175 | e20: 0 176 | e21: 0 177 | e22: 1 178 | e23: 0 179 | e30: 0 180 | e31: 0 181 | e32: 0 182 | e33: 1 183 | m_UseCullingMatrixOverride: 0 184 | m_Cookie: {fileID: 0} 185 | m_DrawHalo: 0 186 | m_Flare: {fileID: 0} 187 | m_RenderMode: 0 188 | m_CullingMask: 189 | serializedVersion: 2 190 | m_Bits: 4294967295 191 | m_RenderingLayerMask: 1 192 | m_Lightmapping: 1 193 | m_LightShadowCasterMode: 0 194 | m_AreaSize: {x: 1, y: 1} 195 | m_BounceIntensity: 1 196 | m_ColorTemperature: 6570 197 | m_UseColorTemperature: 0 198 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 199 | m_UseBoundingSphereOverride: 0 200 | m_ShadowRadius: 0 201 | m_ShadowAngle: 0 202 | --- !u!4 &170076735 203 | Transform: 204 | m_ObjectHideFlags: 0 205 | m_CorrespondingSourceObject: {fileID: 0} 206 | m_PrefabInstance: {fileID: 0} 207 | m_PrefabAsset: {fileID: 0} 208 | m_GameObject: {fileID: 170076733} 209 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 210 | m_LocalPosition: {x: 0, y: 3, z: 0} 211 | m_LocalScale: {x: 1, y: 1, z: 1} 212 | m_Children: [] 213 | m_Father: {fileID: 0} 214 | m_RootOrder: 1 215 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 216 | --- !u!1 &202402595 217 | GameObject: 218 | m_ObjectHideFlags: 0 219 | m_CorrespondingSourceObject: {fileID: 0} 220 | m_PrefabInstance: {fileID: 0} 221 | m_PrefabAsset: {fileID: 0} 222 | serializedVersion: 6 223 | m_Component: 224 | - component: {fileID: 202402599} 225 | - component: {fileID: 202402598} 226 | - component: {fileID: 202402597} 227 | - component: {fileID: 202402596} 228 | - component: {fileID: 202402600} 229 | m_Layer: 0 230 | m_Name: VideoQuad 231 | m_TagString: Untagged 232 | m_Icon: {fileID: 0} 233 | m_NavMeshLayer: 0 234 | m_StaticEditorFlags: 0 235 | m_IsActive: 0 236 | --- !u!64 &202402596 237 | MeshCollider: 238 | m_ObjectHideFlags: 0 239 | m_CorrespondingSourceObject: {fileID: 0} 240 | m_PrefabInstance: {fileID: 0} 241 | m_PrefabAsset: {fileID: 0} 242 | m_GameObject: {fileID: 202402595} 243 | m_Material: {fileID: 0} 244 | m_IsTrigger: 0 245 | m_Enabled: 1 246 | serializedVersion: 4 247 | m_Convex: 0 248 | m_CookingOptions: 30 249 | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} 250 | --- !u!23 &202402597 251 | MeshRenderer: 252 | m_ObjectHideFlags: 0 253 | m_CorrespondingSourceObject: {fileID: 0} 254 | m_PrefabInstance: {fileID: 0} 255 | m_PrefabAsset: {fileID: 0} 256 | m_GameObject: {fileID: 202402595} 257 | m_Enabled: 1 258 | m_CastShadows: 1 259 | m_ReceiveShadows: 1 260 | m_DynamicOccludee: 1 261 | m_MotionVectors: 1 262 | m_LightProbeUsage: 1 263 | m_ReflectionProbeUsage: 1 264 | m_RayTracingMode: 2 265 | m_RenderingLayerMask: 4294967295 266 | m_RendererPriority: 0 267 | m_Materials: 268 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} 269 | m_StaticBatchInfo: 270 | firstSubMesh: 0 271 | subMeshCount: 0 272 | m_StaticBatchRoot: {fileID: 0} 273 | m_ProbeAnchor: {fileID: 0} 274 | m_LightProbeVolumeOverride: {fileID: 0} 275 | m_ScaleInLightmap: 1 276 | m_ReceiveGI: 1 277 | m_PreserveUVs: 0 278 | m_IgnoreNormalsForChartDetection: 0 279 | m_ImportantGI: 0 280 | m_StitchLightmapSeams: 0 281 | m_SelectedEditorRenderState: 3 282 | m_MinimumChartSize: 4 283 | m_AutoUVMaxDistance: 0.5 284 | m_AutoUVMaxAngle: 89 285 | m_LightmapParameters: {fileID: 0} 286 | m_SortingLayerID: 0 287 | m_SortingLayer: 0 288 | m_SortingOrder: 0 289 | --- !u!33 &202402598 290 | MeshFilter: 291 | m_ObjectHideFlags: 0 292 | m_CorrespondingSourceObject: {fileID: 0} 293 | m_PrefabInstance: {fileID: 0} 294 | m_PrefabAsset: {fileID: 0} 295 | m_GameObject: {fileID: 202402595} 296 | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} 297 | --- !u!4 &202402599 298 | Transform: 299 | m_ObjectHideFlags: 0 300 | m_CorrespondingSourceObject: {fileID: 0} 301 | m_PrefabInstance: {fileID: 0} 302 | m_PrefabAsset: {fileID: 0} 303 | m_GameObject: {fileID: 202402595} 304 | m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} 305 | m_LocalPosition: {x: 0, y: 0, z: 0} 306 | m_LocalScale: {x: 1, y: 1, z: 1} 307 | m_Children: [] 308 | m_Father: {fileID: 0} 309 | m_RootOrder: 4 310 | m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} 311 | --- !u!114 &202402600 312 | MonoBehaviour: 313 | m_ObjectHideFlags: 0 314 | m_CorrespondingSourceObject: {fileID: 0} 315 | m_PrefabInstance: {fileID: 0} 316 | m_PrefabAsset: {fileID: 0} 317 | m_GameObject: {fileID: 202402595} 318 | m_Enabled: 1 319 | m_EditorHideFlags: 0 320 | m_Script: {fileID: 11500000, guid: eddd23561246c49debbd0c2e4ad8fa63, type: 3} 321 | m_Name: 322 | m_EditorClassIdentifier: 323 | device: /dev/dri/renderD128 324 | ip: 325 | port: 9766 326 | --- !u!1 &232426158 327 | GameObject: 328 | m_ObjectHideFlags: 0 329 | m_CorrespondingSourceObject: {fileID: 0} 330 | m_PrefabInstance: {fileID: 0} 331 | m_PrefabAsset: {fileID: 0} 332 | serializedVersion: 6 333 | m_Component: 334 | - component: {fileID: 232426162} 335 | - component: {fileID: 232426161} 336 | - component: {fileID: 232426160} 337 | - component: {fileID: 232426159} 338 | m_Layer: 5 339 | m_Name: Canvas 340 | m_TagString: Untagged 341 | m_Icon: {fileID: 0} 342 | m_NavMeshLayer: 0 343 | m_StaticEditorFlags: 0 344 | m_IsActive: 1 345 | --- !u!114 &232426159 346 | MonoBehaviour: 347 | m_ObjectHideFlags: 0 348 | m_CorrespondingSourceObject: {fileID: 0} 349 | m_PrefabInstance: {fileID: 0} 350 | m_PrefabAsset: {fileID: 0} 351 | m_GameObject: {fileID: 232426158} 352 | m_Enabled: 1 353 | m_EditorHideFlags: 0 354 | m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} 355 | m_Name: 356 | m_EditorClassIdentifier: 357 | m_IgnoreReversedGraphics: 1 358 | m_BlockingObjects: 0 359 | m_BlockingMask: 360 | serializedVersion: 2 361 | m_Bits: 4294967295 362 | --- !u!114 &232426160 363 | MonoBehaviour: 364 | m_ObjectHideFlags: 0 365 | m_CorrespondingSourceObject: {fileID: 0} 366 | m_PrefabInstance: {fileID: 0} 367 | m_PrefabAsset: {fileID: 0} 368 | m_GameObject: {fileID: 232426158} 369 | m_Enabled: 1 370 | m_EditorHideFlags: 0 371 | m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} 372 | m_Name: 373 | m_EditorClassIdentifier: 374 | m_UiScaleMode: 0 375 | m_ReferencePixelsPerUnit: 100 376 | m_ScaleFactor: 1 377 | m_ReferenceResolution: {x: 800, y: 600} 378 | m_ScreenMatchMode: 0 379 | m_MatchWidthOrHeight: 0 380 | m_PhysicalUnit: 3 381 | m_FallbackScreenDPI: 96 382 | m_DefaultSpriteDPI: 96 383 | m_DynamicPixelsPerUnit: 1 384 | --- !u!223 &232426161 385 | Canvas: 386 | m_ObjectHideFlags: 0 387 | m_CorrespondingSourceObject: {fileID: 0} 388 | m_PrefabInstance: {fileID: 0} 389 | m_PrefabAsset: {fileID: 0} 390 | m_GameObject: {fileID: 232426158} 391 | m_Enabled: 1 392 | serializedVersion: 3 393 | m_RenderMode: 0 394 | m_Camera: {fileID: 0} 395 | m_PlaneDistance: 100 396 | m_PixelPerfect: 0 397 | m_ReceivesEvents: 1 398 | m_OverrideSorting: 0 399 | m_OverridePixelPerfect: 0 400 | m_SortingBucketNormalizedSize: 0 401 | m_AdditionalShaderChannelsFlag: 0 402 | m_SortingLayerID: 0 403 | m_SortingOrder: 0 404 | m_TargetDisplay: 0 405 | --- !u!224 &232426162 406 | RectTransform: 407 | m_ObjectHideFlags: 0 408 | m_CorrespondingSourceObject: {fileID: 0} 409 | m_PrefabInstance: {fileID: 0} 410 | m_PrefabAsset: {fileID: 0} 411 | m_GameObject: {fileID: 232426158} 412 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 413 | m_LocalPosition: {x: 0, y: 0, z: 0} 414 | m_LocalScale: {x: 0, y: 0, z: 0} 415 | m_Children: 416 | - {fileID: 1469442499} 417 | m_Father: {fileID: 0} 418 | m_RootOrder: 2 419 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 420 | m_AnchorMin: {x: 0, y: 0} 421 | m_AnchorMax: {x: 0, y: 0} 422 | m_AnchoredPosition: {x: 0, y: 0} 423 | m_SizeDelta: {x: 0, y: 0} 424 | m_Pivot: {x: 0, y: 0} 425 | --- !u!1 &282840810 426 | GameObject: 427 | m_ObjectHideFlags: 0 428 | m_CorrespondingSourceObject: {fileID: 0} 429 | m_PrefabInstance: {fileID: 0} 430 | m_PrefabAsset: {fileID: 0} 431 | serializedVersion: 6 432 | m_Component: 433 | - component: {fileID: 282840814} 434 | - component: {fileID: 282840813} 435 | - component: {fileID: 282840811} 436 | - component: {fileID: 282840812} 437 | m_Layer: 0 438 | m_Name: Main Camera 439 | m_TagString: MainCamera 440 | m_Icon: {fileID: 0} 441 | m_NavMeshLayer: 0 442 | m_StaticEditorFlags: 0 443 | m_IsActive: 1 444 | --- !u!81 &282840811 445 | AudioListener: 446 | m_ObjectHideFlags: 0 447 | m_CorrespondingSourceObject: {fileID: 0} 448 | m_PrefabInstance: {fileID: 0} 449 | m_PrefabAsset: {fileID: 0} 450 | m_GameObject: {fileID: 282840810} 451 | m_Enabled: 1 452 | --- !u!114 &282840812 453 | MonoBehaviour: 454 | m_ObjectHideFlags: 0 455 | m_CorrespondingSourceObject: {fileID: 0} 456 | m_PrefabInstance: {fileID: 0} 457 | m_PrefabAsset: {fileID: 0} 458 | m_GameObject: {fileID: 282840810} 459 | m_Enabled: 1 460 | m_EditorHideFlags: 0 461 | m_Script: {fileID: 11500000, guid: 28b87dba6f94f72c1ba3a86dfa4481d4, type: 3} 462 | m_Name: 463 | m_EditorClassIdentifier: 464 | LevelArea: 100 465 | ScrollArea: 25 466 | ScrollSpeed: 25 467 | DragSpeed: 25 468 | ZoomSpeed: 25 469 | ZoomMin: -1 470 | ZoomMax: 100 471 | PanSpeed: 50 472 | PanAngleMin: 25 473 | PanAngleMax: 80 474 | RotationSpeed: 100 475 | TouchRotationMinMagSquared: 1 476 | TouchRotationMinAngle: 0.1 477 | UpDownScale: 0.03 478 | RotateScale: 0.5 479 | MoveScale: 0.5 480 | TouchUpDownScale: 0.15 481 | TouchRotateScale: 0.015 482 | TouchMoveScale: 1 483 | --- !u!20 &282840813 484 | Camera: 485 | m_ObjectHideFlags: 0 486 | m_CorrespondingSourceObject: {fileID: 0} 487 | m_PrefabInstance: {fileID: 0} 488 | m_PrefabAsset: {fileID: 0} 489 | m_GameObject: {fileID: 282840810} 490 | m_Enabled: 1 491 | serializedVersion: 2 492 | m_ClearFlags: 2 493 | m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0} 494 | m_projectionMatrixMode: 1 495 | m_GateFitMode: 2 496 | m_FOVAxisMode: 0 497 | m_SensorSize: {x: 36, y: 24} 498 | m_LensShift: {x: 0, y: 0} 499 | m_FocalLength: 50 500 | m_NormalizedViewPortRect: 501 | serializedVersion: 2 502 | x: 0 503 | y: 0 504 | width: 1 505 | height: 1 506 | near clip plane: 0.1 507 | far clip plane: 1000 508 | field of view: 60 509 | orthographic: 0 510 | orthographic size: 5 511 | m_Depth: -1 512 | m_CullingMask: 513 | serializedVersion: 2 514 | m_Bits: 4294967295 515 | m_RenderingPath: -1 516 | m_TargetTexture: {fileID: 0} 517 | m_TargetDisplay: 0 518 | m_TargetEye: 3 519 | m_HDR: 1 520 | m_AllowMSAA: 1 521 | m_AllowDynamicResolution: 0 522 | m_ForceIntoRT: 1 523 | m_OcclusionCulling: 1 524 | m_StereoConvergence: 10 525 | m_StereoSeparation: 0.022 526 | --- !u!4 &282840814 527 | Transform: 528 | m_ObjectHideFlags: 0 529 | m_CorrespondingSourceObject: {fileID: 0} 530 | m_PrefabInstance: {fileID: 0} 531 | m_PrefabAsset: {fileID: 0} 532 | m_GameObject: {fileID: 282840810} 533 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 534 | m_LocalPosition: {x: 0, y: 0.5, z: -0.5} 535 | m_LocalScale: {x: 1, y: 1, z: 1} 536 | m_Children: [] 537 | m_Father: {fileID: 0} 538 | m_RootOrder: 0 539 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 540 | --- !u!1 &433776887 541 | GameObject: 542 | m_ObjectHideFlags: 0 543 | m_CorrespondingSourceObject: {fileID: 0} 544 | m_PrefabInstance: {fileID: 0} 545 | m_PrefabAsset: {fileID: 0} 546 | serializedVersion: 6 547 | m_Component: 548 | - component: {fileID: 433776891} 549 | - component: {fileID: 433776890} 550 | - component: {fileID: 433776889} 551 | - component: {fileID: 433776888} 552 | m_Layer: 0 553 | m_Name: PointCloud 554 | m_TagString: Untagged 555 | m_Icon: {fileID: 0} 556 | m_NavMeshLayer: 0 557 | m_StaticEditorFlags: 0 558 | m_IsActive: 0 559 | --- !u!114 &433776888 560 | MonoBehaviour: 561 | m_ObjectHideFlags: 0 562 | m_CorrespondingSourceObject: {fileID: 0} 563 | m_PrefabInstance: {fileID: 0} 564 | m_PrefabAsset: {fileID: 0} 565 | m_GameObject: {fileID: 433776887} 566 | m_Enabled: 1 567 | m_EditorHideFlags: 0 568 | m_Script: {fileID: 11500000, guid: eebbb98d8203c62a98e8d5a14b6a6ceb, type: 3} 569 | m_Name: 570 | m_EditorClassIdentifier: 571 | device: /dev/dri/renderD128 572 | ip: 573 | port: 9768 574 | --- !u!23 &433776889 575 | MeshRenderer: 576 | m_ObjectHideFlags: 0 577 | m_CorrespondingSourceObject: {fileID: 0} 578 | m_PrefabInstance: {fileID: 0} 579 | m_PrefabAsset: {fileID: 0} 580 | m_GameObject: {fileID: 433776887} 581 | m_Enabled: 1 582 | m_CastShadows: 1 583 | m_ReceiveShadows: 1 584 | m_DynamicOccludee: 1 585 | m_MotionVectors: 1 586 | m_LightProbeUsage: 1 587 | m_ReflectionProbeUsage: 1 588 | m_RayTracingMode: 2 589 | m_RenderingLayerMask: 1 590 | m_RendererPriority: 0 591 | m_Materials: 592 | - {fileID: 2100000, guid: 22f3c03f683fa7c3d8a8cd71bd14e318, type: 2} 593 | m_StaticBatchInfo: 594 | firstSubMesh: 0 595 | subMeshCount: 0 596 | m_StaticBatchRoot: {fileID: 0} 597 | m_ProbeAnchor: {fileID: 0} 598 | m_LightProbeVolumeOverride: {fileID: 0} 599 | m_ScaleInLightmap: 1 600 | m_ReceiveGI: 1 601 | m_PreserveUVs: 0 602 | m_IgnoreNormalsForChartDetection: 0 603 | m_ImportantGI: 0 604 | m_StitchLightmapSeams: 1 605 | m_SelectedEditorRenderState: 3 606 | m_MinimumChartSize: 4 607 | m_AutoUVMaxDistance: 0.5 608 | m_AutoUVMaxAngle: 89 609 | m_LightmapParameters: {fileID: 0} 610 | m_SortingLayerID: 0 611 | m_SortingLayer: 0 612 | m_SortingOrder: 0 613 | --- !u!33 &433776890 614 | MeshFilter: 615 | m_ObjectHideFlags: 0 616 | m_CorrespondingSourceObject: {fileID: 0} 617 | m_PrefabInstance: {fileID: 0} 618 | m_PrefabAsset: {fileID: 0} 619 | m_GameObject: {fileID: 433776887} 620 | m_Mesh: {fileID: 0} 621 | --- !u!4 &433776891 622 | Transform: 623 | m_ObjectHideFlags: 0 624 | m_CorrespondingSourceObject: {fileID: 0} 625 | m_PrefabInstance: {fileID: 0} 626 | m_PrefabAsset: {fileID: 0} 627 | m_GameObject: {fileID: 433776887} 628 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 629 | m_LocalPosition: {x: 0, y: 0, z: 0} 630 | m_LocalScale: {x: 1, y: 1, z: 1} 631 | m_Children: [] 632 | m_Father: {fileID: 0} 633 | m_RootOrder: 5 634 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 635 | --- !u!1 &688259384 636 | GameObject: 637 | m_ObjectHideFlags: 0 638 | m_CorrespondingSourceObject: {fileID: 0} 639 | m_PrefabInstance: {fileID: 0} 640 | m_PrefabAsset: {fileID: 0} 641 | serializedVersion: 6 642 | m_Component: 643 | - component: {fileID: 688259386} 644 | - component: {fileID: 688259385} 645 | m_Layer: 0 646 | m_Name: FPSDisplay 647 | m_TagString: Untagged 648 | m_Icon: {fileID: 0} 649 | m_NavMeshLayer: 0 650 | m_StaticEditorFlags: 0 651 | m_IsActive: 1 652 | --- !u!114 &688259385 653 | MonoBehaviour: 654 | m_ObjectHideFlags: 0 655 | m_CorrespondingSourceObject: {fileID: 0} 656 | m_PrefabInstance: {fileID: 0} 657 | m_PrefabAsset: {fileID: 0} 658 | m_GameObject: {fileID: 688259384} 659 | m_Enabled: 1 660 | m_EditorHideFlags: 0 661 | m_Script: {fileID: 11500000, guid: d88208428a0b7e6d798b1321c177de84, type: 3} 662 | m_Name: 663 | m_EditorClassIdentifier: 664 | --- !u!4 &688259386 665 | Transform: 666 | m_ObjectHideFlags: 0 667 | m_CorrespondingSourceObject: {fileID: 0} 668 | m_PrefabInstance: {fileID: 0} 669 | m_PrefabAsset: {fileID: 0} 670 | m_GameObject: {fileID: 688259384} 671 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 672 | m_LocalPosition: {x: 0, y: 0, z: 0} 673 | m_LocalScale: {x: 1, y: 1, z: 1} 674 | m_Children: [] 675 | m_Father: {fileID: 0} 676 | m_RootOrder: 7 677 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 678 | --- !u!1 &785509537 679 | GameObject: 680 | m_ObjectHideFlags: 0 681 | m_CorrespondingSourceObject: {fileID: 0} 682 | m_PrefabInstance: {fileID: 0} 683 | m_PrefabAsset: {fileID: 0} 684 | serializedVersion: 6 685 | m_Component: 686 | - component: {fileID: 785509538} 687 | - component: {fileID: 785509540} 688 | - component: {fileID: 785509539} 689 | - component: {fileID: 785509541} 690 | m_Layer: 5 691 | m_Name: RawImage 692 | m_TagString: Untagged 693 | m_Icon: {fileID: 0} 694 | m_NavMeshLayer: 0 695 | m_StaticEditorFlags: 0 696 | m_IsActive: 0 697 | --- !u!224 &785509538 698 | RectTransform: 699 | m_ObjectHideFlags: 0 700 | m_CorrespondingSourceObject: {fileID: 0} 701 | m_PrefabInstance: {fileID: 0} 702 | m_PrefabAsset: {fileID: 0} 703 | m_GameObject: {fileID: 785509537} 704 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 705 | m_LocalPosition: {x: 0, y: 0, z: 0} 706 | m_LocalScale: {x: 1, y: 1, z: 1} 707 | m_Children: [] 708 | m_Father: {fileID: 1469442499} 709 | m_RootOrder: 0 710 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 711 | m_AnchorMin: {x: 1, y: 1} 712 | m_AnchorMax: {x: 1, y: 1} 713 | m_AnchoredPosition: {x: -320, y: -180} 714 | m_SizeDelta: {x: 640, y: 360} 715 | m_Pivot: {x: 0.5, y: 0.5} 716 | --- !u!114 &785509539 717 | MonoBehaviour: 718 | m_ObjectHideFlags: 0 719 | m_CorrespondingSourceObject: {fileID: 0} 720 | m_PrefabInstance: {fileID: 0} 721 | m_PrefabAsset: {fileID: 0} 722 | m_GameObject: {fileID: 785509537} 723 | m_Enabled: 1 724 | m_EditorHideFlags: 0 725 | m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3} 726 | m_Name: 727 | m_EditorClassIdentifier: 728 | m_Material: {fileID: 0} 729 | m_Color: {r: 1, g: 1, b: 1, a: 1} 730 | m_RaycastTarget: 1 731 | m_Maskable: 1 732 | m_OnCullStateChanged: 733 | m_PersistentCalls: 734 | m_Calls: [] 735 | m_Texture: {fileID: 0} 736 | m_UVRect: 737 | serializedVersion: 2 738 | x: 0 739 | y: 0 740 | width: 1 741 | height: -1 742 | --- !u!222 &785509540 743 | CanvasRenderer: 744 | m_ObjectHideFlags: 0 745 | m_CorrespondingSourceObject: {fileID: 0} 746 | m_PrefabInstance: {fileID: 0} 747 | m_PrefabAsset: {fileID: 0} 748 | m_GameObject: {fileID: 785509537} 749 | m_CullTransparentMesh: 0 750 | --- !u!114 &785509541 751 | MonoBehaviour: 752 | m_ObjectHideFlags: 0 753 | m_CorrespondingSourceObject: {fileID: 0} 754 | m_PrefabInstance: {fileID: 0} 755 | m_PrefabAsset: {fileID: 0} 756 | m_GameObject: {fileID: 785509537} 757 | m_Enabled: 1 758 | m_EditorHideFlags: 0 759 | m_Script: {fileID: 11500000, guid: 12effc58cbb744b51ba7e080578fcc88, type: 3} 760 | m_Name: 761 | m_EditorClassIdentifier: 762 | device: /dev/dri/renderD128 763 | ip: 764 | port: 9767 765 | --- !u!1 &1469442498 766 | GameObject: 767 | m_ObjectHideFlags: 0 768 | m_CorrespondingSourceObject: {fileID: 0} 769 | m_PrefabInstance: {fileID: 0} 770 | m_PrefabAsset: {fileID: 0} 771 | serializedVersion: 6 772 | m_Component: 773 | - component: {fileID: 1469442499} 774 | m_Layer: 5 775 | m_Name: CameraView 776 | m_TagString: Untagged 777 | m_Icon: {fileID: 0} 778 | m_NavMeshLayer: 0 779 | m_StaticEditorFlags: 0 780 | m_IsActive: 1 781 | --- !u!224 &1469442499 782 | RectTransform: 783 | m_ObjectHideFlags: 0 784 | m_CorrespondingSourceObject: {fileID: 0} 785 | m_PrefabInstance: {fileID: 0} 786 | m_PrefabAsset: {fileID: 0} 787 | m_GameObject: {fileID: 1469442498} 788 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 789 | m_LocalPosition: {x: 0, y: 0, z: 0} 790 | m_LocalScale: {x: 1, y: 1, z: 1} 791 | m_Children: 792 | - {fileID: 785509538} 793 | m_Father: {fileID: 232426162} 794 | m_RootOrder: 0 795 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 796 | m_AnchorMin: {x: 0, y: 0} 797 | m_AnchorMax: {x: 1, y: 1} 798 | m_AnchoredPosition: {x: 0, y: 0} 799 | m_SizeDelta: {x: 0, y: 0} 800 | m_Pivot: {x: 0.5, y: 0.5} 801 | --- !u!1 &1660498836 802 | GameObject: 803 | m_ObjectHideFlags: 0 804 | m_CorrespondingSourceObject: {fileID: 0} 805 | m_PrefabInstance: {fileID: 0} 806 | m_PrefabAsset: {fileID: 0} 807 | serializedVersion: 6 808 | m_Component: 809 | - component: {fileID: 1660498839} 810 | - component: {fileID: 1660498838} 811 | - component: {fileID: 1660498837} 812 | m_Layer: 0 813 | m_Name: EventSystem 814 | m_TagString: Untagged 815 | m_Icon: {fileID: 0} 816 | m_NavMeshLayer: 0 817 | m_StaticEditorFlags: 0 818 | m_IsActive: 1 819 | --- !u!114 &1660498837 820 | MonoBehaviour: 821 | m_ObjectHideFlags: 0 822 | m_CorrespondingSourceObject: {fileID: 0} 823 | m_PrefabInstance: {fileID: 0} 824 | m_PrefabAsset: {fileID: 0} 825 | m_GameObject: {fileID: 1660498836} 826 | m_Enabled: 1 827 | m_EditorHideFlags: 0 828 | m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} 829 | m_Name: 830 | m_EditorClassIdentifier: 831 | m_HorizontalAxis: Horizontal 832 | m_VerticalAxis: Vertical 833 | m_SubmitButton: Submit 834 | m_CancelButton: Cancel 835 | m_InputActionsPerSecond: 10 836 | m_RepeatDelay: 0.5 837 | m_ForceModuleActive: 0 838 | --- !u!114 &1660498838 839 | MonoBehaviour: 840 | m_ObjectHideFlags: 0 841 | m_CorrespondingSourceObject: {fileID: 0} 842 | m_PrefabInstance: {fileID: 0} 843 | m_PrefabAsset: {fileID: 0} 844 | m_GameObject: {fileID: 1660498836} 845 | m_Enabled: 1 846 | m_EditorHideFlags: 0 847 | m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} 848 | m_Name: 849 | m_EditorClassIdentifier: 850 | m_FirstSelected: {fileID: 0} 851 | m_sendNavigationEvents: 1 852 | m_DragThreshold: 10 853 | --- !u!4 &1660498839 854 | Transform: 855 | m_ObjectHideFlags: 0 856 | m_CorrespondingSourceObject: {fileID: 0} 857 | m_PrefabInstance: {fileID: 0} 858 | m_PrefabAsset: {fileID: 0} 859 | m_GameObject: {fileID: 1660498836} 860 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 861 | m_LocalPosition: {x: 0, y: 0, z: 0} 862 | m_LocalScale: {x: 1, y: 1, z: 1} 863 | m_Children: [] 864 | m_Father: {fileID: 0} 865 | m_RootOrder: 3 866 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 867 | --- !u!1 &1869987317 868 | GameObject: 869 | m_ObjectHideFlags: 0 870 | m_CorrespondingSourceObject: {fileID: 0} 871 | m_PrefabInstance: {fileID: 0} 872 | m_PrefabAsset: {fileID: 0} 873 | serializedVersion: 6 874 | m_Component: 875 | - component: {fileID: 1869987319} 876 | - component: {fileID: 1869987318} 877 | m_Layer: 0 878 | m_Name: GPUPointCloud 879 | m_TagString: Untagged 880 | m_Icon: {fileID: 0} 881 | m_NavMeshLayer: 0 882 | m_StaticEditorFlags: 0 883 | m_IsActive: 0 884 | --- !u!114 &1869987318 885 | MonoBehaviour: 886 | m_ObjectHideFlags: 0 887 | m_CorrespondingSourceObject: {fileID: 0} 888 | m_PrefabInstance: {fileID: 0} 889 | m_PrefabAsset: {fileID: 0} 890 | m_GameObject: {fileID: 1869987317} 891 | m_Enabled: 1 892 | m_EditorHideFlags: 0 893 | m_Script: {fileID: 11500000, guid: ccafc0d6535658682b48be914454d9a3, type: 3} 894 | m_Name: 895 | m_EditorClassIdentifier: 896 | device: /dev/dri/renderD128 897 | ip: 898 | port: 9768 899 | unprojectionShader: {fileID: 7200000, guid: ab6e61c487f87741790f1e0f63c8c9c2, type: 3} 900 | pointCloudShader: {fileID: 4800000, guid: 92c9447d6f5c0ef7591ec70801039484, type: 3} 901 | --- !u!4 &1869987319 902 | Transform: 903 | m_ObjectHideFlags: 0 904 | m_CorrespondingSourceObject: {fileID: 0} 905 | m_PrefabInstance: {fileID: 0} 906 | m_PrefabAsset: {fileID: 0} 907 | m_GameObject: {fileID: 1869987317} 908 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 909 | m_LocalPosition: {x: 0, y: 0, z: 0} 910 | m_LocalScale: {x: 1, y: 1, z: 1} 911 | m_Children: [] 912 | m_Father: {fileID: 0} 913 | m_RootOrder: 6 914 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 915 | -------------------------------------------------------------------------------- /Assets/Scenes/SampleScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 99c9720ab356a0642a771bea13969a05 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d6987037576f36ce2908a6ccb387b09b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Shaders/VertexColor.shader: -------------------------------------------------------------------------------- 1 | // Original code source: 2 | // http://www.kamend.com/2014/05/rendering-a-point-cloud-inside-unity/ 3 | // Modifications: 4 | // - point size varying with distance 5 | 6 | Shader "Custom/VertexColor" { 7 | SubShader { 8 | Pass { 9 | LOD 200 10 | 11 | CGPROGRAM 12 | #pragma vertex vert 13 | #pragma fragment frag 14 | 15 | #include "UnityCG.cginc" 16 | 17 | struct VertexInput { 18 | float4 v : POSITION; 19 | float4 color: COLOR; 20 | }; 21 | 22 | struct VertexOutput { 23 | float4 pos : SV_POSITION; 24 | float4 col : COLOR; 25 | float size : PSIZE; 26 | }; 27 | 28 | VertexOutput vert(VertexInput v) { 29 | 30 | VertexOutput o; 31 | o.pos = UnityObjectToClipPos(v.v); 32 | o.col = float4(v.color.r, v.color.g, v.color.b , 1.0f); 33 | o.size = 1.0; //disable size computation for now 34 | return o; 35 | } 36 | 37 | float4 frag(VertexOutput o) : COLOR { 38 | return o.col; 39 | } 40 | 41 | ENDCG 42 | } 43 | } 44 | } 45 | 46 | -------------------------------------------------------------------------------- /Assets/Shaders/VertexColor.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b760375f5078cab4d86a9040061dfa3b 3 | timeCreated: 1468774493 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/hardware-depth-unprojector.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4c5bd41ce16cb4d44bef42c93a4d241a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/UI.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ff5038162afa43a9fa25ecac7e8f4832 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/UI/FPSDisplay.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class FPSDisplay : MonoBehaviour 5 | { 6 | float deltaTime = 0.0f; 7 | 8 | void Update() 9 | { 10 | deltaTime += (Time.unscaledDeltaTime - deltaTime) * 0.1f; 11 | } 12 | 13 | void OnGUI() 14 | { 15 | int w = Screen.width, h = Screen.height; 16 | 17 | GUIStyle style = new GUIStyle(); 18 | 19 | Rect rect = new Rect(0, 0, w, h * 2 / 100); 20 | style.alignment = TextAnchor.UpperLeft; 21 | style.fontSize = h * 2 / 100; 22 | style.normal.textColor = new Color (0.5f, 0.5f, 0.9f, 1.0f); 23 | float msec = deltaTime * 1000.0f; 24 | float fps = 1.0f / deltaTime; 25 | string text = string.Format("{0:0.0} ms ({1:0.} fps)", msec, fps); 26 | GUI.Label(rect, text, style); 27 | } 28 | } -------------------------------------------------------------------------------- /Assets/UI/FPSDisplay.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d88208428a0b7e6d798b1321c177de84 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/UI/MouseRts.cs: -------------------------------------------------------------------------------- 1 | // A modified version of script from: 2 | // http://www.andrejeworutzki.de/game-developement/unity-realtime-strategy-camera/ 3 | 4 | using UnityEngine; 5 | using UnityEngine.EventSystems; 6 | 7 | public class MouseRts : MonoBehaviour 8 | { 9 | public int LevelArea = 100; 10 | 11 | public int ScrollArea = 25; 12 | public int ScrollSpeed = 25; 13 | public int DragSpeed = 25; 14 | 15 | public int ZoomSpeed = 25; 16 | public float ZoomMin = 0.5f; 17 | public int ZoomMax = 100; 18 | 19 | public int PanSpeed = 50; 20 | public int PanAngleMin = 25; 21 | public int PanAngleMax = 80; 22 | 23 | public int RotationSpeed=100; 24 | 25 | public float TouchRotationMinMagSquared = 1f; 26 | public float TouchRotationMinAngle = 0.1f; 27 | 28 | #if UNITY_STANDALONE 29 | #else 30 | private bool touchRotating = false; 31 | #endif 32 | private Vector2 touchRotationStart = Vector2.zero; 33 | 34 | public float UpDownScale = 0.03f; 35 | public float RotateScale = 0.5f; 36 | public float MoveScale = 0.5f; 37 | 38 | public float TouchUpDownScale = 0.15f; 39 | public float TouchRotateScale = 0.015f; 40 | public float TouchMoveScale = 1f; 41 | private float yrotation; 42 | 43 | public void Start() 44 | { 45 | Cursor.visible=false; 46 | yrotation = transform.eulerAngles.y; 47 | } 48 | 49 | void Update() 50 | { 51 | Vector3 translation = Vector3.zero; 52 | 53 | // Zoom in or out 54 | float zoomDelta = CameraUpDown (); 55 | 56 | if (zoomDelta!=0.0f) 57 | translation -= Vector3.up * ZoomSpeed * zoomDelta; 58 | 59 | float xrotation = transform.eulerAngles.x - zoomDelta * PanSpeed; 60 | xrotation = Mathf.Clamp(xrotation, PanAngleMin, PanAngleMax); 61 | 62 | yrotation += CameraRotation() * RotationSpeed; 63 | 64 | transform.eulerAngles = new Vector3(0, yrotation, 0); 65 | 66 | translation += CameraMovement() * DragSpeed; 67 | 68 | // Keep camera within level and zoom area 69 | Vector3 desiredPosition = transform.position + transform.TransformDirection(translation); 70 | 71 | desiredPosition.x = Mathf.Clamp(desiredPosition.x, -LevelArea, LevelArea); 72 | desiredPosition.y = Mathf.Clamp(desiredPosition.y, ZoomMin, ZoomMax); 73 | desiredPosition.z = Mathf.Clamp(desiredPosition.z, -LevelArea, LevelArea); 74 | 75 | // Finally move camera parallel to world axis 76 | transform.position = desiredPosition; 77 | transform.eulerAngles = new Vector3(xrotation, yrotation, 0); 78 | } 79 | 80 | private float CameraUpDown() 81 | { 82 | float delta=0f; 83 | 84 | #if UNITY_STANDALONE 85 | delta = -Input.GetAxis("Mouse ScrollWheel")*Time.deltaTime; 86 | #else 87 | if (Input.touchCount == 2) 88 | { 89 | if (EventSystem.current.IsPointerOverGameObject (0) || EventSystem.current.IsPointerOverGameObject (1)) 90 | return delta; 91 | 92 | Touch touchZero = Input.GetTouch(0); 93 | Touch touchOne = Input.GetTouch(1); 94 | 95 | Vector2 touchZeroPrevPos = touchZero.position - touchZero.deltaPosition; 96 | Vector2 touchOnePrevPos = touchOne.position - touchOne.deltaPosition; 97 | 98 | float prevTouchDeltaMag = (touchZeroPrevPos - touchOnePrevPos).magnitude; 99 | float touchDeltaMag = (touchZero.position - touchOne.position).magnitude; 100 | 101 | float deltaMagnitudeDiff = (touchDeltaMag - prevTouchDeltaMag)/Mathf.Sqrt(Screen.width*Screen.width + Screen.height*Screen.height); 102 | 103 | delta += deltaMagnitudeDiff * TouchUpDownScale; 104 | } 105 | 106 | #endif 107 | 108 | //delta += Input.GetAxis("CameraUpDown") * UpDownScale * Time.deltaTime; 109 | 110 | return delta; 111 | } 112 | 113 | private float CameraRotation() 114 | { 115 | float yrotation = 0.0f; 116 | #if UNITY_STANDALONE 117 | if (Input.GetMouseButton(1) && !EventSystem.current.IsPointerOverGameObject()) // RMB 118 | yrotation = Input.GetAxis("Mouse X") * Time.deltaTime; 119 | #else 120 | if (Input.touchCount == 2) 121 | { 122 | if (EventSystem.current.IsPointerOverGameObject (0) || EventSystem.current.IsPointerOverGameObject (1)) 123 | return yrotation; 124 | 125 | if (!touchRotating) 126 | { 127 | touchRotationStart = Input.touches [1].position - Input.touches [0].position; 128 | touchRotating = touchRotationStart.sqrMagnitude > TouchRotationMinMagSquared; 129 | } 130 | else 131 | { 132 | Vector2 currVector = Input.touches [1].position - Input.touches [0].position; 133 | float angleOffset = Vector2.Angle(touchRotationStart, currVector); 134 | 135 | if (angleOffset > TouchRotationMinAngle) 136 | { 137 | Vector3 LR = Vector3.Cross(touchRotationStart, currVector); 138 | // z > 0 left rotation, z < 0 right rotation 139 | yrotation -= Mathf.Sign(LR.z) * angleOffset * TouchRotateScale; 140 | 141 | touchRotationStart = currVector; 142 | } 143 | } 144 | } 145 | else 146 | touchRotating = false; 147 | 148 | #endif 149 | 150 | //yrotation += Input.GetAxis("CameraRotate") * RotateScale * Time.deltaTime; 151 | 152 | return yrotation; 153 | } 154 | 155 | private bool mouseDragging = false; 156 | private Vector3 CameraMovement() 157 | { 158 | Vector3 move = Vector3.zero; 159 | 160 | #if UNITY_STANDALONE 161 | 162 | if(mouseDragging) 163 | { 164 | move += new Vector3(Input.GetAxis("Mouse X") * Time.deltaTime, 0, 165 | Input.GetAxis("Mouse Y") * Time.deltaTime); 166 | } 167 | 168 | mouseDragging = Input.GetMouseButton(0) && !EventSystem.current.IsPointerOverGameObject(); 169 | 170 | #else 171 | if (Input.touchCount == 1 && Input.GetTouch(0).phase == TouchPhase.Moved) 172 | { 173 | if (EventSystem.current.IsPointerOverGameObject (0)) 174 | return move; 175 | 176 | Touch touch = Input.GetTouch (0); 177 | 178 | move += new Vector3(touch.deltaPosition.x / Screen.width, 0, 179 | touch.deltaPosition.y / Screen.height) * TouchMoveScale; 180 | } 181 | 182 | #endif 183 | 184 | // move += new Vector3(Input.GetAxis("CameraX"), 0, 185 | // -Input.GetAxis("CameraY")) * Time.deltaTime * MoveScale; 186 | 187 | return move; 188 | } 189 | } 190 | -------------------------------------------------------------------------------- /Assets/UI/MouseRts.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 28b87dba6f94f72c1ba3a86dfa4481d4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/UNHVD.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Unity Network Hardware Video Decoder 3 | * 4 | * Copyright 2019-2020 (C) Bartosz Meglicki 5 | * 6 | * This Source Code Form is subject to the terms of the Mozilla Public 7 | * License, v. 2.0. If a copy of the MPL was not distributed with this 8 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | * 10 | */ 11 | 12 | using System.Collections; 13 | using System.Collections.Generic; 14 | using System.Runtime.InteropServices; 15 | 16 | public class UNHVD 17 | { 18 | [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] 19 | public struct unhvd_net_config 20 | { 21 | [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] 22 | public string ip; 23 | public ushort port; 24 | public int timeout_ms; 25 | } 26 | 27 | [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] 28 | public struct unhvd_hw_config 29 | { 30 | [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] 31 | public string hardware; 32 | 33 | [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] 34 | public string codec; 35 | 36 | [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] 37 | public string device; 38 | 39 | [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] 40 | public string pixel_format; 41 | 42 | public int width; 43 | public int height; 44 | public int profile; 45 | } 46 | 47 | [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] 48 | public struct unhvd_depth_config 49 | { 50 | public float ppx; 51 | public float ppy; 52 | public float fx; 53 | public float fy; 54 | public float depth_unit; 55 | public float min_margin; 56 | public float max_margin; 57 | } 58 | 59 | [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] 60 | public struct unhvd_frame 61 | { 62 | public int width; 63 | public int height; 64 | public int format; 65 | 66 | /// uint8t *[3] 67 | [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst=3, ArraySubType=System.Runtime.InteropServices.UnmanagedType.SysUInt)] 68 | public System.IntPtr[] data; 69 | 70 | /// int[3] 71 | [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst=3, ArraySubType=System.Runtime.InteropServices.UnmanagedType.I4)] 72 | public int[] linesize; 73 | } 74 | 75 | [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] 76 | public struct unhvd_point_cloud 77 | { 78 | public System.IntPtr data; 79 | public System.IntPtr colors; 80 | public int size; 81 | public int used; 82 | } 83 | 84 | /// Return Type: unhvd* 85 | ///net_config: unhvd_net_config* 86 | ///hw_config: unhvd_hw_config* 87 | ///depth_config: unhvd_depth_config* 88 | #if (UNITY_IPHONE || UNITY_WEBGL) && !UNITY_EDITOR 89 | [DllImport ("__Internal")] 90 | #else 91 | [DllImport ("unhvd")] 92 | #endif 93 | public static extern System.IntPtr unhvd_init(ref unhvd_net_config net_config, [In]unhvd_hw_config[] hw_configs, int hw_size, ref unhvd_depth_config depth_config); 94 | 95 | ///Return Type: unhvd* 96 | ///net_config: unhvd_net_config* 97 | ///hw_config: unhvd_hw_config* 98 | ///depth_config: unhvd_depth_config* 99 | #if (UNITY_IPHONE || UNITY_WEBGL) && !UNITY_EDITOR 100 | [DllImport ("__Internal")] 101 | #else 102 | [DllImport ("unhvd")] 103 | #endif 104 | private static extern System.IntPtr unhvd_init(ref unhvd_net_config net_config, ref unhvd_hw_config hw_config, int hw_size, System.IntPtr depth_config) ; 105 | 106 | #if (UNITY_IPHONE || UNITY_WEBGL) && !UNITY_EDITOR 107 | [DllImport ("__Internal")] 108 | #else 109 | [DllImport ("unhvd")] 110 | #endif 111 | public static extern System.IntPtr unhvd_init(ref unhvd_net_config net_config, [In]unhvd_hw_config[] hw_configs, int hw_size, System.IntPtr depth_config); 112 | 113 | public static System.IntPtr unhvd_init(ref unhvd_net_config net_config, ref unhvd_hw_config hw_config) 114 | { 115 | return unhvd_init(ref net_config, ref hw_config, 1, System.IntPtr.Zero); 116 | } 117 | 118 | /// Return Type: void 119 | ///n: unhvd * 120 | #if (UNITY_IPHONE || UNITY_WEBGL) && !UNITY_EDITOR 121 | [DllImport ("__Internal")] 122 | #else 123 | [DllImport ("unhvd")] 124 | #endif 125 | public static extern void unhvd_close(System.IntPtr n) ; 126 | 127 | /// Return Type: int 128 | ///n: unhvd* 129 | ///frame: unhvd_frame* 130 | ///pc: unhvd_point_cloud* 131 | #if (UNITY_IPHONE || UNITY_WEBGL) && !UNITY_EDITOR 132 | [DllImport ("__Internal")] 133 | #else 134 | [DllImport ("unhvd")] 135 | #endif 136 | public static extern int unhvd_get_begin(System.IntPtr n, ref unhvd_frame frame, ref unhvd_point_cloud pc) ; 137 | 138 | /// Return Type: int 139 | ///n: unhvd * 140 | #if (UNITY_IPHONE || UNITY_WEBGL) && !UNITY_EDITOR 141 | [DllImport ("__Internal")] 142 | #else 143 | [DllImport ("unhvd")] 144 | #endif 145 | public static extern int unhvd_get_end(System.IntPtr n) ; 146 | 147 | /// Return Type: int 148 | ///n: void* 149 | ///frame: unhvd_frame* 150 | #if (UNITY_IPHONE || UNITY_WEBGL) && !UNITY_EDITOR 151 | [DllImport ("__Internal")] 152 | #else 153 | [DllImport ("unhvd")] 154 | #endif 155 | public static extern int unhvd_get_frame_begin(System.IntPtr n, ref unhvd_frame frame); 156 | 157 | /// Return Type: int 158 | ///n: void* 159 | ///frame: unhvd_frame* 160 | #if (UNITY_IPHONE || UNITY_WEBGL) && !UNITY_EDITOR 161 | [DllImport ("__Internal")] 162 | #else 163 | [DllImport ("unhvd")] 164 | #endif 165 | public static extern int unhvd_get_frame_begin(System.IntPtr n, [In, Out]unhvd_frame[] frames); 166 | 167 | /// Return Type: int 168 | ///n: unhvd * 169 | #if (UNITY_IPHONE || UNITY_WEBGL) && !UNITY_EDITOR 170 | [DllImport ("__Internal")] 171 | #else 172 | [DllImport ("unhvd")] 173 | #endif 174 | public static extern int unhvd_get_frame_end(System.IntPtr n) ; 175 | 176 | /// Return Type: int 177 | ///n: void* 178 | ///pc: unhvd_point_cloud* 179 | #if (UNITY_IPHONE || UNITY_WEBGL) && !UNITY_EDITOR 180 | [DllImport ("__Internal")] 181 | #else 182 | [DllImport ("unhvd")] 183 | #endif 184 | public static extern int unhvd_get_point_cloud_begin(System.IntPtr n, ref unhvd_point_cloud pc); 185 | 186 | /// Return Type: int 187 | ///n: unhvd * 188 | #if (UNITY_IPHONE || UNITY_WEBGL) && !UNITY_EDITOR 189 | [DllImport ("__Internal")] 190 | #else 191 | [DllImport ("unhvd")] 192 | #endif 193 | public static extern int unhvd_get_point_cloud_end(System.IntPtr n) ; 194 | } 195 | -------------------------------------------------------------------------------- /Assets/UNHVD.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3401ee039a3094d72bebcdd788054c6c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/VideoRenderer.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Unity Network Hardware Video Decoder 3 | * 4 | * Copyright 2019 (C) Bartosz Meglicki 5 | * 6 | * This Source Code Form is subject to the terms of the Mozilla Public 7 | * License, v. 2.0. If a copy of the MPL was not distributed with this 8 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | * 10 | */ 11 | 12 | using System; 13 | using UnityEngine; 14 | 15 | public class VideoRenderer : MonoBehaviour 16 | { 17 | public string device = "/dev/dri/renderD128"; 18 | public string ip = ""; 19 | public ushort port = 9766; 20 | 21 | private IntPtr unhvd; 22 | private UNHVD.unhvd_frame frame = new UNHVD.unhvd_frame{ data=new System.IntPtr[3], linesize=new int[3] }; 23 | private Texture2D videoTexture; 24 | 25 | void Awake() 26 | { 27 | UNHVD.unhvd_hw_config hw_config = new UNHVD.unhvd_hw_config{hardware="vaapi", codec="h264", device=this.device, pixel_format="bgr0", width=0, height=0, profile=0}; 28 | UNHVD.unhvd_net_config net_config = new UNHVD.unhvd_net_config{ip=this.ip, port=this.port, timeout_ms=500 }; 29 | 30 | unhvd=UNHVD.unhvd_init (ref net_config, ref hw_config); 31 | 32 | if (unhvd == IntPtr.Zero) 33 | { 34 | Debug.Log ("failed to initialize UNHVD"); 35 | gameObject.SetActive (false); 36 | } 37 | 38 | //flip the texture mapping upside down 39 | Vector2[] uv = GetComponent().mesh.uv; 40 | for (int i = 0; i < uv.Length; ++i) 41 | uv [i][1] = -uv [i][1]; 42 | GetComponent ().mesh.uv = uv; 43 | } 44 | void OnDestroy() 45 | { 46 | UNHVD.unhvd_close (unhvd); 47 | } 48 | 49 | private void AdaptTexture() 50 | { 51 | if(videoTexture== null || videoTexture.width != frame.width || videoTexture.height != frame.height) 52 | { 53 | videoTexture = new Texture2D (frame.width, frame.height, TextureFormat.BGRA32, false); 54 | GetComponent ().material.mainTexture = videoTexture; 55 | } 56 | } 57 | 58 | // Update is called once per frame 59 | void LateUpdate () 60 | { 61 | if (UNHVD.unhvd_get_frame_begin(unhvd, ref frame) == 0) 62 | { 63 | AdaptTexture (); 64 | videoTexture.LoadRawTextureData (frame.data[0], frame.width*frame.height*4); 65 | videoTexture.Apply (false); 66 | } 67 | 68 | if (UNHVD.unhvd_get_frame_end (unhvd) != 0) 69 | Debug.LogWarning ("Failed to get UNHVD frame data"); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /Assets/VideoRenderer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eddd23561246c49debbd0c2e4ad8fa63 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Mozilla Public License Version 2.0 2 | ================================== 3 | 4 | 1. Definitions 5 | -------------- 6 | 7 | 1.1. "Contributor" 8 | means each individual or legal entity that creates, contributes to 9 | the creation of, or owns Covered Software. 10 | 11 | 1.2. "Contributor Version" 12 | means the combination of the Contributions of others (if any) used 13 | by a Contributor and that particular Contributor's Contribution. 14 | 15 | 1.3. "Contribution" 16 | means Covered Software of a particular Contributor. 17 | 18 | 1.4. "Covered Software" 19 | means Source Code Form to which the initial Contributor has attached 20 | the notice in Exhibit A, the Executable Form of such Source Code 21 | Form, and Modifications of such Source Code Form, in each case 22 | including portions thereof. 23 | 24 | 1.5. "Incompatible With Secondary Licenses" 25 | means 26 | 27 | (a) that the initial Contributor has attached the notice described 28 | in Exhibit B to the Covered Software; or 29 | 30 | (b) that the Covered Software was made available under the terms of 31 | version 1.1 or earlier of the License, but not also under the 32 | terms of a Secondary License. 33 | 34 | 1.6. "Executable Form" 35 | means any form of the work other than Source Code Form. 36 | 37 | 1.7. "Larger Work" 38 | means a work that combines Covered Software with other material, in 39 | a separate file or files, that is not Covered Software. 40 | 41 | 1.8. "License" 42 | means this document. 43 | 44 | 1.9. "Licensable" 45 | means having the right to grant, to the maximum extent possible, 46 | whether at the time of the initial grant or subsequently, any and 47 | all of the rights conveyed by this License. 48 | 49 | 1.10. "Modifications" 50 | means any of the following: 51 | 52 | (a) any file in Source Code Form that results from an addition to, 53 | deletion from, or modification of the contents of Covered 54 | Software; or 55 | 56 | (b) any new file in Source Code Form that contains any Covered 57 | Software. 58 | 59 | 1.11. "Patent Claims" of a Contributor 60 | means any patent claim(s), including without limitation, method, 61 | process, and apparatus claims, in any patent Licensable by such 62 | Contributor that would be infringed, but for the grant of the 63 | License, by the making, using, selling, offering for sale, having 64 | made, import, or transfer of either its Contributions or its 65 | Contributor Version. 66 | 67 | 1.12. "Secondary License" 68 | means either the GNU General Public License, Version 2.0, the GNU 69 | Lesser General Public License, Version 2.1, the GNU Affero General 70 | Public License, Version 3.0, or any later versions of those 71 | licenses. 72 | 73 | 1.13. "Source Code Form" 74 | means the form of the work preferred for making modifications. 75 | 76 | 1.14. "You" (or "Your") 77 | means an individual or a legal entity exercising rights under this 78 | License. For legal entities, "You" includes any entity that 79 | controls, is controlled by, or is under common control with You. For 80 | purposes of this definition, "control" means (a) the power, direct 81 | or indirect, to cause the direction or management of such entity, 82 | whether by contract or otherwise, or (b) ownership of more than 83 | fifty percent (50%) of the outstanding shares or beneficial 84 | ownership of such entity. 85 | 86 | 2. License Grants and Conditions 87 | -------------------------------- 88 | 89 | 2.1. Grants 90 | 91 | Each Contributor hereby grants You a world-wide, royalty-free, 92 | non-exclusive license: 93 | 94 | (a) under intellectual property rights (other than patent or trademark) 95 | Licensable by such Contributor to use, reproduce, make available, 96 | modify, display, perform, distribute, and otherwise exploit its 97 | Contributions, either on an unmodified basis, with Modifications, or 98 | as part of a Larger Work; and 99 | 100 | (b) under Patent Claims of such Contributor to make, use, sell, offer 101 | for sale, have made, import, and otherwise transfer either its 102 | Contributions or its Contributor Version. 103 | 104 | 2.2. Effective Date 105 | 106 | The licenses granted in Section 2.1 with respect to any Contribution 107 | become effective for each Contribution on the date the Contributor first 108 | distributes such Contribution. 109 | 110 | 2.3. Limitations on Grant Scope 111 | 112 | The licenses granted in this Section 2 are the only rights granted under 113 | this License. No additional rights or licenses will be implied from the 114 | distribution or licensing of Covered Software under this License. 115 | Notwithstanding Section 2.1(b) above, no patent license is granted by a 116 | Contributor: 117 | 118 | (a) for any code that a Contributor has removed from Covered Software; 119 | or 120 | 121 | (b) for infringements caused by: (i) Your and any other third party's 122 | modifications of Covered Software, or (ii) the combination of its 123 | Contributions with other software (except as part of its Contributor 124 | Version); or 125 | 126 | (c) under Patent Claims infringed by Covered Software in the absence of 127 | its Contributions. 128 | 129 | This License does not grant any rights in the trademarks, service marks, 130 | or logos of any Contributor (except as may be necessary to comply with 131 | the notice requirements in Section 3.4). 132 | 133 | 2.4. Subsequent Licenses 134 | 135 | No Contributor makes additional grants as a result of Your choice to 136 | distribute the Covered Software under a subsequent version of this 137 | License (see Section 10.2) or under the terms of a Secondary License (if 138 | permitted under the terms of Section 3.3). 139 | 140 | 2.5. Representation 141 | 142 | Each Contributor represents that the Contributor believes its 143 | Contributions are its original creation(s) or it has sufficient rights 144 | to grant the rights to its Contributions conveyed by this License. 145 | 146 | 2.6. Fair Use 147 | 148 | This License is not intended to limit any rights You have under 149 | applicable copyright doctrines of fair use, fair dealing, or other 150 | equivalents. 151 | 152 | 2.7. Conditions 153 | 154 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted 155 | in Section 2.1. 156 | 157 | 3. Responsibilities 158 | ------------------- 159 | 160 | 3.1. Distribution of Source Form 161 | 162 | All distribution of Covered Software in Source Code Form, including any 163 | Modifications that You create or to which You contribute, must be under 164 | the terms of this License. You must inform recipients that the Source 165 | Code Form of the Covered Software is governed by the terms of this 166 | License, and how they can obtain a copy of this License. You may not 167 | attempt to alter or restrict the recipients' rights in the Source Code 168 | Form. 169 | 170 | 3.2. Distribution of Executable Form 171 | 172 | If You distribute Covered Software in Executable Form then: 173 | 174 | (a) such Covered Software must also be made available in Source Code 175 | Form, as described in Section 3.1, and You must inform recipients of 176 | the Executable Form how they can obtain a copy of such Source Code 177 | Form by reasonable means in a timely manner, at a charge no more 178 | than the cost of distribution to the recipient; and 179 | 180 | (b) You may distribute such Executable Form under the terms of this 181 | License, or sublicense it under different terms, provided that the 182 | license for the Executable Form does not attempt to limit or alter 183 | the recipients' rights in the Source Code Form under this License. 184 | 185 | 3.3. Distribution of a Larger Work 186 | 187 | You may create and distribute a Larger Work under terms of Your choice, 188 | provided that You also comply with the requirements of this License for 189 | the Covered Software. If the Larger Work is a combination of Covered 190 | Software with a work governed by one or more Secondary Licenses, and the 191 | Covered Software is not Incompatible With Secondary Licenses, this 192 | License permits You to additionally distribute such Covered Software 193 | under the terms of such Secondary License(s), so that the recipient of 194 | the Larger Work may, at their option, further distribute the Covered 195 | Software under the terms of either this License or such Secondary 196 | License(s). 197 | 198 | 3.4. Notices 199 | 200 | You may not remove or alter the substance of any license notices 201 | (including copyright notices, patent notices, disclaimers of warranty, 202 | or limitations of liability) contained within the Source Code Form of 203 | the Covered Software, except that You may alter any license notices to 204 | the extent required to remedy known factual inaccuracies. 205 | 206 | 3.5. Application of Additional Terms 207 | 208 | You may choose to offer, and to charge a fee for, warranty, support, 209 | indemnity or liability obligations to one or more recipients of Covered 210 | Software. However, You may do so only on Your own behalf, and not on 211 | behalf of any Contributor. You must make it absolutely clear that any 212 | such warranty, support, indemnity, or liability obligation is offered by 213 | You alone, and You hereby agree to indemnify every Contributor for any 214 | liability incurred by such Contributor as a result of warranty, support, 215 | indemnity or liability terms You offer. You may include additional 216 | disclaimers of warranty and limitations of liability specific to any 217 | jurisdiction. 218 | 219 | 4. Inability to Comply Due to Statute or Regulation 220 | --------------------------------------------------- 221 | 222 | If it is impossible for You to comply with any of the terms of this 223 | License with respect to some or all of the Covered Software due to 224 | statute, judicial order, or regulation then You must: (a) comply with 225 | the terms of this License to the maximum extent possible; and (b) 226 | describe the limitations and the code they affect. Such description must 227 | be placed in a text file included with all distributions of the Covered 228 | Software under this License. Except to the extent prohibited by statute 229 | or regulation, such description must be sufficiently detailed for a 230 | recipient of ordinary skill to be able to understand it. 231 | 232 | 5. Termination 233 | -------------- 234 | 235 | 5.1. The rights granted under this License will terminate automatically 236 | if You fail to comply with any of its terms. However, if You become 237 | compliant, then the rights granted under this License from a particular 238 | Contributor are reinstated (a) provisionally, unless and until such 239 | Contributor explicitly and finally terminates Your grants, and (b) on an 240 | ongoing basis, if such Contributor fails to notify You of the 241 | non-compliance by some reasonable means prior to 60 days after You have 242 | come back into compliance. Moreover, Your grants from a particular 243 | Contributor are reinstated on an ongoing basis if such Contributor 244 | notifies You of the non-compliance by some reasonable means, this is the 245 | first time You have received notice of non-compliance with this License 246 | from such Contributor, and You become compliant prior to 30 days after 247 | Your receipt of the notice. 248 | 249 | 5.2. If You initiate litigation against any entity by asserting a patent 250 | infringement claim (excluding declaratory judgment actions, 251 | counter-claims, and cross-claims) alleging that a Contributor Version 252 | directly or indirectly infringes any patent, then the rights granted to 253 | You by any and all Contributors for the Covered Software under Section 254 | 2.1 of this License shall terminate. 255 | 256 | 5.3. In the event of termination under Sections 5.1 or 5.2 above, all 257 | end user license agreements (excluding distributors and resellers) which 258 | have been validly granted by You or Your distributors under this License 259 | prior to termination shall survive termination. 260 | 261 | ************************************************************************ 262 | * * 263 | * 6. Disclaimer of Warranty * 264 | * ------------------------- * 265 | * * 266 | * Covered Software is provided under this License on an "as is" * 267 | * basis, without warranty of any kind, either expressed, implied, or * 268 | * statutory, including, without limitation, warranties that the * 269 | * Covered Software is free of defects, merchantable, fit for a * 270 | * particular purpose or non-infringing. The entire risk as to the * 271 | * quality and performance of the Covered Software is with You. * 272 | * Should any Covered Software prove defective in any respect, You * 273 | * (not any Contributor) assume the cost of any necessary servicing, * 274 | * repair, or correction. This disclaimer of warranty constitutes an * 275 | * essential part of this License. No use of any Covered Software is * 276 | * authorized under this License except under this disclaimer. * 277 | * * 278 | ************************************************************************ 279 | 280 | ************************************************************************ 281 | * * 282 | * 7. Limitation of Liability * 283 | * -------------------------- * 284 | * * 285 | * Under no circumstances and under no legal theory, whether tort * 286 | * (including negligence), contract, or otherwise, shall any * 287 | * Contributor, or anyone who distributes Covered Software as * 288 | * permitted above, be liable to You for any direct, indirect, * 289 | * special, incidental, or consequential damages of any character * 290 | * including, without limitation, damages for lost profits, loss of * 291 | * goodwill, work stoppage, computer failure or malfunction, or any * 292 | * and all other commercial damages or losses, even if such party * 293 | * shall have been informed of the possibility of such damages. This * 294 | * limitation of liability shall not apply to liability for death or * 295 | * personal injury resulting from such party's negligence to the * 296 | * extent applicable law prohibits such limitation. Some * 297 | * jurisdictions do not allow the exclusion or limitation of * 298 | * incidental or consequential damages, so this exclusion and * 299 | * limitation may not apply to You. * 300 | * * 301 | ************************************************************************ 302 | 303 | 8. Litigation 304 | ------------- 305 | 306 | Any litigation relating to this License may be brought only in the 307 | courts of a jurisdiction where the defendant maintains its principal 308 | place of business and such litigation shall be governed by laws of that 309 | jurisdiction, without reference to its conflict-of-law provisions. 310 | Nothing in this Section shall prevent a party's ability to bring 311 | cross-claims or counter-claims. 312 | 313 | 9. Miscellaneous 314 | ---------------- 315 | 316 | This License represents the complete agreement concerning the subject 317 | matter hereof. If any provision of this License is held to be 318 | unenforceable, such provision shall be reformed only to the extent 319 | necessary to make it enforceable. Any law or regulation which provides 320 | that the language of a contract shall be construed against the drafter 321 | shall not be used to construe this License against a Contributor. 322 | 323 | 10. Versions of the License 324 | --------------------------- 325 | 326 | 10.1. New Versions 327 | 328 | Mozilla Foundation is the license steward. Except as provided in Section 329 | 10.3, no one other than the license steward has the right to modify or 330 | publish new versions of this License. Each version will be given a 331 | distinguishing version number. 332 | 333 | 10.2. Effect of New Versions 334 | 335 | You may distribute the Covered Software under the terms of the version 336 | of the License under which You originally received the Covered Software, 337 | or under the terms of any subsequent version published by the license 338 | steward. 339 | 340 | 10.3. Modified Versions 341 | 342 | If you create software not governed by this License, and you want to 343 | create a new license for such software, you may create and use a 344 | modified version of this License if you rename the license and remove 345 | any references to the name of the license steward (except to note that 346 | such modified license differs from this License). 347 | 348 | 10.4. Distributing Source Code Form that is Incompatible With Secondary 349 | Licenses 350 | 351 | If You choose to distribute Source Code Form that is Incompatible With 352 | Secondary Licenses under the terms of this version of the License, the 353 | notice described in Exhibit B of this License must be attached. 354 | 355 | Exhibit A - Source Code Form License Notice 356 | ------------------------------------------- 357 | 358 | This Source Code Form is subject to the terms of the Mozilla Public 359 | License, v. 2.0. If a copy of the MPL was not distributed with this 360 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 361 | 362 | If it is not possible or desirable to put the notice in a particular 363 | file, then You may include the notice in a location (such as a LICENSE 364 | file in a relevant directory) where a recipient would be likely to look 365 | for such a notice. 366 | 367 | You may add additional accurate notices of copyright ownership. 368 | 369 | Exhibit B - "Incompatible With Secondary Licenses" Notice 370 | --------------------------------------------------------- 371 | 372 | This Source Code Form is "Incompatible With Secondary Licenses", as 373 | defined by the Mozilla Public License, v. 2.0. 374 | -------------------------------------------------------------------------------- /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: 9 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 2 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmref 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 1 30 | m_AssetPipelineMode: 1 31 | m_CacheServerMode: 0 32 | m_CacheServerEndpoint: 33 | m_CacheServerNamespacePrefix: default 34 | m_CacheServerEnableDownload: 1 35 | m_CacheServerEnableUpload: 1 36 | -------------------------------------------------------------------------------- /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 | - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} 39 | - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} 40 | - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0} 41 | m_PreloadedShaders: [] 42 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 43 | type: 0} 44 | m_CustomRenderPipeline: {fileID: 0} 45 | m_TransparencySortMode: 0 46 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 47 | m_DefaultRenderingPath: 1 48 | m_DefaultMobileRenderingPath: 1 49 | m_TierSettings: [] 50 | m_LightmapStripping: 0 51 | m_FogStripping: 0 52 | m_InstancingStripping: 0 53 | m_LightmapKeepPlain: 1 54 | m_LightmapKeepDirCombined: 1 55 | m_LightmapKeepDynamicPlain: 1 56 | m_LightmapKeepDynamicDirCombined: 1 57 | m_LightmapKeepShadowMask: 1 58 | m_LightmapKeepSubtractive: 1 59 | m_FogKeepLinear: 1 60 | m_FogKeepExp: 1 61 | m_FogKeepExp2: 1 62 | m_AlbedoSwatchInfos: [] 63 | m_LightsUseLinearIntensity: 0 64 | m_LightsUseColorTemperature: 0 65 | -------------------------------------------------------------------------------- /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/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: UnityEditor:UnityEditor.PackageManager.UI:PackageManagerProjectSettings 15 | m_ScopedRegistriesSettingsExpanded: 1 16 | oneTimeWarningShown: 0 17 | m_Registries: 18 | - m_Id: main 19 | m_Name: 20 | m_Url: https://packages.unity.com 21 | m_Scopes: [] 22 | m_IsDefault: 1 23 | m_UserSelectedRegistryName: 24 | m_UserAddingNewScopedRegistry: 0 25 | m_RegistryInfoDraft: 26 | m_ErrorMessage: 27 | m_Original: 28 | m_Id: 29 | m_Name: 30 | m_Url: 31 | m_Scopes: [] 32 | m_IsDefault: 0 33 | m_Modified: 0 34 | m_Name: 35 | m_Url: 36 | m_Scopes: 37 | - 38 | m_SelectedScopeIndex: 0 39 | -------------------------------------------------------------------------------- /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: 20 7 | productGUID: fdfd225c574c343ad80d1940d5c63597 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: bmegli 16 | productName: unity-hardware-video-decoder 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 | iosUseCustomAppBackgroundBehavior: 0 56 | iosAllowHTTPDownload: 1 57 | allowedAutorotateToPortrait: 1 58 | allowedAutorotateToPortraitUpsideDown: 1 59 | allowedAutorotateToLandscapeRight: 1 60 | allowedAutorotateToLandscapeLeft: 1 61 | useOSAutorotation: 1 62 | use32BitDisplayBuffer: 1 63 | preserveFramebufferAlpha: 0 64 | disableDepthAndStencilBuffers: 0 65 | androidStartInFullscreen: 1 66 | androidRenderOutsideSafeArea: 1 67 | androidUseSwappy: 0 68 | androidBlitType: 0 69 | defaultIsNativeResolution: 1 70 | macRetinaSupport: 1 71 | runInBackground: 1 72 | captureSingleScreen: 0 73 | muteOtherAudioSources: 0 74 | Prepare IOS For Recording: 0 75 | Force IOS Speakers When Recording: 0 76 | deferSystemGesturesMode: 0 77 | hideHomeButton: 0 78 | submitAnalytics: 1 79 | usePlayerLog: 1 80 | bakeCollisionMeshes: 0 81 | forceSingleInstance: 0 82 | useFlipModelSwapchain: 1 83 | resizableWindow: 0 84 | useMacAppStoreValidation: 0 85 | macAppStoreCategory: public.app-category.games 86 | gpuSkinning: 1 87 | xboxPIXTextureCapture: 0 88 | xboxEnableAvatar: 0 89 | xboxEnableKinect: 0 90 | xboxEnableKinectAutoTracking: 0 91 | xboxEnableFitness: 0 92 | visibleInBackground: 1 93 | allowFullscreenSwitch: 1 94 | fullscreenMode: 1 95 | xboxSpeechDB: 0 96 | xboxEnableHeadOrientation: 0 97 | xboxEnableGuest: 0 98 | xboxEnablePIXSampling: 0 99 | metalFramebufferOnly: 0 100 | xboxOneResolution: 0 101 | xboxOneSResolution: 0 102 | xboxOneXResolution: 3 103 | xboxOneMonoLoggingLevel: 0 104 | xboxOneLoggingLevel: 1 105 | xboxOneDisableEsram: 0 106 | xboxOnePresentImmediateThreshold: 0 107 | switchQueueCommandMemory: 0 108 | switchQueueControlMemory: 16384 109 | switchQueueComputeMemory: 262144 110 | switchNVNShaderPoolsGranularity: 33554432 111 | switchNVNDefaultPoolsGranularity: 16777216 112 | switchNVNOtherPoolsGranularity: 16777216 113 | vulkanNumSwapchainBuffers: 3 114 | vulkanEnableSetSRGBWrite: 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 | vrSettings: 129 | cardboard: 130 | depthFormat: 0 131 | enableTransitionView: 0 132 | daydream: 133 | depthFormat: 0 134 | useSustainedPerformanceMode: 0 135 | enableVideoLayer: 0 136 | useProtectedVideoMemory: 0 137 | minimumSupportedHeadTracking: 0 138 | maximumSupportedHeadTracking: 1 139 | hololens: 140 | depthFormat: 1 141 | depthBufferSharingEnabled: 0 142 | lumin: 143 | depthFormat: 0 144 | frameTiming: 2 145 | enableGLCache: 0 146 | glCacheMaxBlobSize: 524288 147 | glCacheMaxFileSize: 8388608 148 | oculus: 149 | sharedDepthBuffer: 0 150 | dashSupport: 0 151 | lowOverheadMode: 0 152 | protectedContext: 0 153 | v2Signing: 1 154 | enable360StereoCapture: 0 155 | isWsaHolographicRemotingEnabled: 0 156 | enableFrameTimingStats: 0 157 | useHDRDisplay: 0 158 | D3DHDRBitDepth: 0 159 | m_ColorGamuts: 00000000 160 | targetPixelDensity: 400 161 | resolutionScalingMode: 0 162 | androidSupportedAspectRatio: 1 163 | androidMaxAspectRatio: 2.1 164 | applicationIdentifier: 165 | Android: com.bmegli.unhvd 166 | buildNumber: {} 167 | AndroidBundleVersionCode: 1 168 | AndroidMinSdkVersion: 24 169 | AndroidTargetSdkVersion: 0 170 | AndroidPreferredInstallLocation: 1 171 | aotOptions: 172 | stripEngineCode: 1 173 | iPhoneStrippingLevel: 0 174 | iPhoneScriptCallOptimization: 0 175 | ForceInternetPermission: 0 176 | ForceSDCardPermission: 0 177 | CreateWallpaper: 0 178 | APKExpansionFiles: 0 179 | keepLoadedShadersAlive: 0 180 | StripUnusedMeshComponents: 1 181 | VertexChannelCompressionMask: 4054 182 | iPhoneSdkVersion: 988 183 | iOSTargetOSVersionString: 10.0 184 | tvOSSdkVersion: 0 185 | tvOSRequireExtendedGameController: 0 186 | tvOSTargetOSVersionString: 10.0 187 | uIPrerenderedIcon: 0 188 | uIRequiresPersistentWiFi: 0 189 | uIRequiresFullScreen: 1 190 | uIStatusBarHidden: 1 191 | uIExitOnSuspend: 0 192 | uIStatusBarStyle: 0 193 | iPhoneSplashScreen: {fileID: 0} 194 | iPhoneHighResSplashScreen: {fileID: 0} 195 | iPhoneTallHighResSplashScreen: {fileID: 0} 196 | iPhone47inSplashScreen: {fileID: 0} 197 | iPhone55inPortraitSplashScreen: {fileID: 0} 198 | iPhone55inLandscapeSplashScreen: {fileID: 0} 199 | iPhone58inPortraitSplashScreen: {fileID: 0} 200 | iPhone58inLandscapeSplashScreen: {fileID: 0} 201 | iPadPortraitSplashScreen: {fileID: 0} 202 | iPadHighResPortraitSplashScreen: {fileID: 0} 203 | iPadLandscapeSplashScreen: {fileID: 0} 204 | iPadHighResLandscapeSplashScreen: {fileID: 0} 205 | iPhone65inPortraitSplashScreen: {fileID: 0} 206 | iPhone65inLandscapeSplashScreen: {fileID: 0} 207 | iPhone61inPortraitSplashScreen: {fileID: 0} 208 | iPhone61inLandscapeSplashScreen: {fileID: 0} 209 | appleTVSplashScreen: {fileID: 0} 210 | appleTVSplashScreen2x: {fileID: 0} 211 | tvOSSmallIconLayers: [] 212 | tvOSSmallIconLayers2x: [] 213 | tvOSLargeIconLayers: [] 214 | tvOSLargeIconLayers2x: [] 215 | tvOSTopShelfImageLayers: [] 216 | tvOSTopShelfImageLayers2x: [] 217 | tvOSTopShelfImageWideLayers: [] 218 | tvOSTopShelfImageWideLayers2x: [] 219 | iOSLaunchScreenType: 0 220 | iOSLaunchScreenPortrait: {fileID: 0} 221 | iOSLaunchScreenLandscape: {fileID: 0} 222 | iOSLaunchScreenBackgroundColor: 223 | serializedVersion: 2 224 | rgba: 0 225 | iOSLaunchScreenFillPct: 100 226 | iOSLaunchScreenSize: 100 227 | iOSLaunchScreenCustomXibPath: 228 | iOSLaunchScreeniPadType: 0 229 | iOSLaunchScreeniPadImage: {fileID: 0} 230 | iOSLaunchScreeniPadBackgroundColor: 231 | serializedVersion: 2 232 | rgba: 0 233 | iOSLaunchScreeniPadFillPct: 100 234 | iOSLaunchScreeniPadSize: 100 235 | iOSLaunchScreeniPadCustomXibPath: 236 | iOSUseLaunchScreenStoryboard: 0 237 | iOSLaunchScreenCustomStoryboardPath: 238 | iOSDeviceRequirements: [] 239 | iOSURLSchemes: [] 240 | iOSBackgroundModes: 0 241 | iOSMetalForceHardShadows: 0 242 | metalEditorSupport: 1 243 | metalAPIValidation: 1 244 | iOSRenderExtraFrameOnPause: 0 245 | appleDeveloperTeamID: 246 | iOSManualSigningProvisioningProfileID: 247 | tvOSManualSigningProvisioningProfileID: 248 | iOSManualSigningProvisioningProfileType: 0 249 | tvOSManualSigningProvisioningProfileType: 0 250 | appleEnableAutomaticSigning: 0 251 | iOSRequireARKit: 0 252 | iOSAutomaticallyDetectAndAddCapabilities: 1 253 | appleEnableProMotion: 0 254 | clonedFromGUID: 56e7a2d3a00f33d44bdd161b773c35b5 255 | templatePackageId: com.unity.template.3d@1.0.0 256 | templateDefaultScene: Assets/Scenes/SampleScene.unity 257 | AndroidTargetArchitectures: 5 258 | AndroidSplashScreenScale: 0 259 | androidSplashScreen: {fileID: 0} 260 | AndroidKeystoreName: '{inproject}: ' 261 | AndroidKeyaliasName: 262 | AndroidBuildApkPerCpuArchitecture: 0 263 | AndroidTVCompatibility: 1 264 | AndroidIsGame: 1 265 | AndroidEnableTango: 0 266 | androidEnableBanner: 1 267 | androidUseLowAccuracyLocation: 0 268 | androidUseCustomKeystore: 0 269 | m_AndroidBanners: 270 | - width: 320 271 | height: 180 272 | banner: {fileID: 0} 273 | androidGamepadSupportLevel: 0 274 | AndroidValidateAppBundleSize: 1 275 | AndroidAppBundleSizeToValidate: 100 276 | m_BuildTargetIcons: [] 277 | m_BuildTargetPlatformIcons: 278 | - m_BuildTarget: Android 279 | m_Icons: 280 | - m_Textures: [] 281 | m_Width: 432 282 | m_Height: 432 283 | m_Kind: 2 284 | m_SubKind: 285 | - m_Textures: [] 286 | m_Width: 324 287 | m_Height: 324 288 | m_Kind: 2 289 | m_SubKind: 290 | - m_Textures: [] 291 | m_Width: 216 292 | m_Height: 216 293 | m_Kind: 2 294 | m_SubKind: 295 | - m_Textures: [] 296 | m_Width: 162 297 | m_Height: 162 298 | m_Kind: 2 299 | m_SubKind: 300 | - m_Textures: [] 301 | m_Width: 108 302 | m_Height: 108 303 | m_Kind: 2 304 | m_SubKind: 305 | - m_Textures: [] 306 | m_Width: 81 307 | m_Height: 81 308 | m_Kind: 2 309 | m_SubKind: 310 | - m_Textures: [] 311 | m_Width: 192 312 | m_Height: 192 313 | m_Kind: 1 314 | m_SubKind: 315 | - m_Textures: [] 316 | m_Width: 144 317 | m_Height: 144 318 | m_Kind: 1 319 | m_SubKind: 320 | - m_Textures: [] 321 | m_Width: 96 322 | m_Height: 96 323 | m_Kind: 1 324 | m_SubKind: 325 | - m_Textures: [] 326 | m_Width: 72 327 | m_Height: 72 328 | m_Kind: 1 329 | m_SubKind: 330 | - m_Textures: [] 331 | m_Width: 48 332 | m_Height: 48 333 | m_Kind: 1 334 | m_SubKind: 335 | - m_Textures: [] 336 | m_Width: 36 337 | m_Height: 36 338 | m_Kind: 1 339 | m_SubKind: 340 | m_BuildTargetBatching: 341 | - m_BuildTarget: Standalone 342 | m_StaticBatching: 1 343 | m_DynamicBatching: 0 344 | - m_BuildTarget: tvOS 345 | m_StaticBatching: 1 346 | m_DynamicBatching: 0 347 | - m_BuildTarget: Android 348 | m_StaticBatching: 1 349 | m_DynamicBatching: 0 350 | - m_BuildTarget: iPhone 351 | m_StaticBatching: 1 352 | m_DynamicBatching: 0 353 | - m_BuildTarget: WebGL 354 | m_StaticBatching: 0 355 | m_DynamicBatching: 0 356 | m_BuildTargetGraphicsJobs: 357 | - m_BuildTarget: MacStandaloneSupport 358 | m_GraphicsJobs: 0 359 | - m_BuildTarget: Switch 360 | m_GraphicsJobs: 0 361 | - m_BuildTarget: MetroSupport 362 | m_GraphicsJobs: 0 363 | - m_BuildTarget: AppleTVSupport 364 | m_GraphicsJobs: 0 365 | - m_BuildTarget: BJMSupport 366 | m_GraphicsJobs: 0 367 | - m_BuildTarget: LinuxStandaloneSupport 368 | m_GraphicsJobs: 0 369 | - m_BuildTarget: PS4Player 370 | m_GraphicsJobs: 0 371 | - m_BuildTarget: iOSSupport 372 | m_GraphicsJobs: 0 373 | - m_BuildTarget: WindowsStandaloneSupport 374 | m_GraphicsJobs: 0 375 | - m_BuildTarget: XboxOnePlayer 376 | m_GraphicsJobs: 0 377 | - m_BuildTarget: LuminSupport 378 | m_GraphicsJobs: 0 379 | - m_BuildTarget: AndroidPlayer 380 | m_GraphicsJobs: 0 381 | - m_BuildTarget: WebGLSupport 382 | m_GraphicsJobs: 0 383 | m_BuildTargetGraphicsJobMode: 384 | - m_BuildTarget: PS4Player 385 | m_GraphicsJobMode: 0 386 | - m_BuildTarget: XboxOnePlayer 387 | m_GraphicsJobMode: 0 388 | m_BuildTargetGraphicsAPIs: 389 | - m_BuildTarget: AndroidPlayer 390 | m_APIs: 0b00000015000000 391 | m_Automatic: 1 392 | - m_BuildTarget: iOSSupport 393 | m_APIs: 10000000 394 | m_Automatic: 1 395 | - m_BuildTarget: AppleTVSupport 396 | m_APIs: 10000000 397 | m_Automatic: 0 398 | - m_BuildTarget: WebGLSupport 399 | m_APIs: 0b000000 400 | m_Automatic: 1 401 | m_BuildTargetVRSettings: 402 | - m_BuildTarget: Standalone 403 | m_Enabled: 0 404 | m_Devices: 405 | - Oculus 406 | - OpenVR 407 | openGLRequireES31: 0 408 | openGLRequireES31AEP: 0 409 | openGLRequireES32: 0 410 | m_TemplateCustomTags: {} 411 | mobileMTRendering: 412 | Android: 1 413 | iPhone: 1 414 | tvOS: 1 415 | m_BuildTargetGroupLightmapEncodingQuality: [] 416 | m_BuildTargetGroupLightmapSettings: [] 417 | playModeTestRunnerEnabled: 0 418 | runPlayModeTestAsEditModeTest: 0 419 | actionOnDotNetUnhandledException: 1 420 | enableInternalProfiler: 0 421 | logObjCUncaughtExceptions: 1 422 | enableCrashReportAPI: 0 423 | cameraUsageDescription: 424 | locationUsageDescription: 425 | microphoneUsageDescription: 426 | switchNetLibKey: 427 | switchSocketMemoryPoolSize: 6144 428 | switchSocketAllocatorPoolSize: 128 429 | switchSocketConcurrencyLimit: 14 430 | switchScreenResolutionBehavior: 2 431 | switchUseCPUProfiler: 0 432 | switchApplicationID: 0x01004b9000490000 433 | switchNSODependencies: 434 | switchTitleNames_0: 435 | switchTitleNames_1: 436 | switchTitleNames_2: 437 | switchTitleNames_3: 438 | switchTitleNames_4: 439 | switchTitleNames_5: 440 | switchTitleNames_6: 441 | switchTitleNames_7: 442 | switchTitleNames_8: 443 | switchTitleNames_9: 444 | switchTitleNames_10: 445 | switchTitleNames_11: 446 | switchTitleNames_12: 447 | switchTitleNames_13: 448 | switchTitleNames_14: 449 | switchPublisherNames_0: 450 | switchPublisherNames_1: 451 | switchPublisherNames_2: 452 | switchPublisherNames_3: 453 | switchPublisherNames_4: 454 | switchPublisherNames_5: 455 | switchPublisherNames_6: 456 | switchPublisherNames_7: 457 | switchPublisherNames_8: 458 | switchPublisherNames_9: 459 | switchPublisherNames_10: 460 | switchPublisherNames_11: 461 | switchPublisherNames_12: 462 | switchPublisherNames_13: 463 | switchPublisherNames_14: 464 | switchIcons_0: {fileID: 0} 465 | switchIcons_1: {fileID: 0} 466 | switchIcons_2: {fileID: 0} 467 | switchIcons_3: {fileID: 0} 468 | switchIcons_4: {fileID: 0} 469 | switchIcons_5: {fileID: 0} 470 | switchIcons_6: {fileID: 0} 471 | switchIcons_7: {fileID: 0} 472 | switchIcons_8: {fileID: 0} 473 | switchIcons_9: {fileID: 0} 474 | switchIcons_10: {fileID: 0} 475 | switchIcons_11: {fileID: 0} 476 | switchIcons_12: {fileID: 0} 477 | switchIcons_13: {fileID: 0} 478 | switchIcons_14: {fileID: 0} 479 | switchSmallIcons_0: {fileID: 0} 480 | switchSmallIcons_1: {fileID: 0} 481 | switchSmallIcons_2: {fileID: 0} 482 | switchSmallIcons_3: {fileID: 0} 483 | switchSmallIcons_4: {fileID: 0} 484 | switchSmallIcons_5: {fileID: 0} 485 | switchSmallIcons_6: {fileID: 0} 486 | switchSmallIcons_7: {fileID: 0} 487 | switchSmallIcons_8: {fileID: 0} 488 | switchSmallIcons_9: {fileID: 0} 489 | switchSmallIcons_10: {fileID: 0} 490 | switchSmallIcons_11: {fileID: 0} 491 | switchSmallIcons_12: {fileID: 0} 492 | switchSmallIcons_13: {fileID: 0} 493 | switchSmallIcons_14: {fileID: 0} 494 | switchManualHTML: 495 | switchAccessibleURLs: 496 | switchLegalInformation: 497 | switchMainThreadStackSize: 1048576 498 | switchPresenceGroupId: 499 | switchLogoHandling: 0 500 | switchReleaseVersion: 0 501 | switchDisplayVersion: 1.0.0 502 | switchStartupUserAccount: 0 503 | switchTouchScreenUsage: 0 504 | switchSupportedLanguagesMask: 0 505 | switchLogoType: 0 506 | switchApplicationErrorCodeCategory: 507 | switchUserAccountSaveDataSize: 0 508 | switchUserAccountSaveDataJournalSize: 0 509 | switchApplicationAttribute: 0 510 | switchCardSpecSize: -1 511 | switchCardSpecClock: -1 512 | switchRatingsMask: 0 513 | switchRatingsInt_0: 0 514 | switchRatingsInt_1: 0 515 | switchRatingsInt_2: 0 516 | switchRatingsInt_3: 0 517 | switchRatingsInt_4: 0 518 | switchRatingsInt_5: 0 519 | switchRatingsInt_6: 0 520 | switchRatingsInt_7: 0 521 | switchRatingsInt_8: 0 522 | switchRatingsInt_9: 0 523 | switchRatingsInt_10: 0 524 | switchRatingsInt_11: 0 525 | switchRatingsInt_12: 0 526 | switchLocalCommunicationIds_0: 527 | switchLocalCommunicationIds_1: 528 | switchLocalCommunicationIds_2: 529 | switchLocalCommunicationIds_3: 530 | switchLocalCommunicationIds_4: 531 | switchLocalCommunicationIds_5: 532 | switchLocalCommunicationIds_6: 533 | switchLocalCommunicationIds_7: 534 | switchParentalControl: 0 535 | switchAllowsScreenshot: 1 536 | switchAllowsVideoCapturing: 1 537 | switchAllowsRuntimeAddOnContentInstall: 0 538 | switchDataLossConfirmation: 0 539 | switchUserAccountLockEnabled: 0 540 | switchSystemResourceMemory: 16777216 541 | switchSupportedNpadStyles: 3 542 | switchNativeFsCacheSize: 32 543 | switchIsHoldTypeHorizontal: 0 544 | switchSupportedNpadCount: 8 545 | switchSocketConfigEnabled: 0 546 | switchTcpInitialSendBufferSize: 32 547 | switchTcpInitialReceiveBufferSize: 64 548 | switchTcpAutoSendBufferSizeMax: 256 549 | switchTcpAutoReceiveBufferSizeMax: 256 550 | switchUdpSendBufferSize: 9 551 | switchUdpReceiveBufferSize: 42 552 | switchSocketBufferEfficiency: 4 553 | switchSocketInitializeEnabled: 1 554 | switchNetworkInterfaceManagerInitializeEnabled: 1 555 | switchPlayerConnectionEnabled: 1 556 | ps4NPAgeRating: 12 557 | ps4NPTitleSecret: 558 | ps4NPTrophyPackPath: 559 | ps4ParentalLevel: 11 560 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 561 | ps4Category: 0 562 | ps4MasterVersion: 01.00 563 | ps4AppVersion: 01.00 564 | ps4AppType: 0 565 | ps4ParamSfxPath: 566 | ps4VideoOutPixelFormat: 0 567 | ps4VideoOutInitialWidth: 1920 568 | ps4VideoOutBaseModeInitialWidth: 1920 569 | ps4VideoOutReprojectionRate: 60 570 | ps4PronunciationXMLPath: 571 | ps4PronunciationSIGPath: 572 | ps4BackgroundImagePath: 573 | ps4StartupImagePath: 574 | ps4StartupImagesFolder: 575 | ps4IconImagesFolder: 576 | ps4SaveDataImagePath: 577 | ps4SdkOverride: 578 | ps4BGMPath: 579 | ps4ShareFilePath: 580 | ps4ShareOverlayImagePath: 581 | ps4PrivacyGuardImagePath: 582 | ps4NPtitleDatPath: 583 | ps4RemotePlayKeyAssignment: -1 584 | ps4RemotePlayKeyMappingDir: 585 | ps4PlayTogetherPlayerCount: 0 586 | ps4EnterButtonAssignment: 1 587 | ps4ApplicationParam1: 0 588 | ps4ApplicationParam2: 0 589 | ps4ApplicationParam3: 0 590 | ps4ApplicationParam4: 0 591 | ps4DownloadDataSize: 0 592 | ps4GarlicHeapSize: 2048 593 | ps4ProGarlicHeapSize: 2560 594 | playerPrefsMaxSize: 32768 595 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 596 | ps4pnSessions: 1 597 | ps4pnPresence: 1 598 | ps4pnFriends: 1 599 | ps4pnGameCustomData: 1 600 | playerPrefsSupport: 0 601 | enableApplicationExit: 0 602 | resetTempFolder: 1 603 | restrictedAudioUsageRights: 0 604 | ps4UseResolutionFallback: 0 605 | ps4ReprojectionSupport: 0 606 | ps4UseAudio3dBackend: 0 607 | ps4SocialScreenEnabled: 0 608 | ps4ScriptOptimizationLevel: 0 609 | ps4Audio3dVirtualSpeakerCount: 14 610 | ps4attribCpuUsage: 0 611 | ps4PatchPkgPath: 612 | ps4PatchLatestPkgPath: 613 | ps4PatchChangeinfoPath: 614 | ps4PatchDayOne: 0 615 | ps4attribUserManagement: 0 616 | ps4attribMoveSupport: 0 617 | ps4attrib3DSupport: 0 618 | ps4attribShareSupport: 0 619 | ps4attribExclusiveVR: 0 620 | ps4disableAutoHideSplash: 0 621 | ps4videoRecordingFeaturesUsed: 0 622 | ps4contentSearchFeaturesUsed: 0 623 | ps4attribEyeToEyeDistanceSettingVR: 0 624 | ps4IncludedModules: [] 625 | ps4attribVROutputEnabled: 0 626 | monoEnv: 627 | splashScreenBackgroundSourceLandscape: {fileID: 0} 628 | splashScreenBackgroundSourcePortrait: {fileID: 0} 629 | blurSplashScreenBackground: 1 630 | spritePackerPolicy: 631 | webGLMemorySize: 256 632 | webGLExceptionSupport: 1 633 | webGLNameFilesAsHashes: 0 634 | webGLDataCaching: 0 635 | webGLDebugSymbols: 0 636 | webGLEmscriptenArgs: 637 | webGLModulesDirectory: 638 | webGLTemplate: APPLICATION:Default 639 | webGLAnalyzeBuildSize: 0 640 | webGLUseEmbeddedResources: 0 641 | webGLCompressionFormat: 1 642 | webGLLinkerTarget: 0 643 | webGLThreadsSupport: 0 644 | webGLWasmStreaming: 0 645 | scriptingDefineSymbols: 646 | 1: UNITY_POST_PROCESSING_STACK_V2 647 | 4: UNITY_POST_PROCESSING_STACK_V2 648 | 7: UNITY_POST_PROCESSING_STACK_V2 649 | 13: UNITY_POST_PROCESSING_STACK_V2 650 | 17: UNITY_POST_PROCESSING_STACK_V2 651 | 18: UNITY_POST_PROCESSING_STACK_V2 652 | 19: UNITY_POST_PROCESSING_STACK_V2 653 | 21: UNITY_POST_PROCESSING_STACK_V2 654 | 23: UNITY_POST_PROCESSING_STACK_V2 655 | 24: UNITY_POST_PROCESSING_STACK_V2 656 | 25: UNITY_POST_PROCESSING_STACK_V2 657 | 26: UNITY_POST_PROCESSING_STACK_V2 658 | 27: UNITY_POST_PROCESSING_STACK_V2 659 | platformArchitecture: {} 660 | scriptingBackend: {} 661 | il2cppCompilerConfiguration: {} 662 | managedStrippingLevel: {} 663 | incrementalIl2cppBuild: {} 664 | allowUnsafeCode: 1 665 | additionalIl2CppArgs: 666 | scriptingRuntimeVersion: 1 667 | gcIncremental: 0 668 | gcWBarrierValidation: 0 669 | apiCompatibilityLevelPerPlatform: {} 670 | m_RenderingPath: 1 671 | m_MobileRenderingPath: 1 672 | metroPackageName: Template_3D 673 | metroPackageVersion: 674 | metroCertificatePath: 675 | metroCertificatePassword: 676 | metroCertificateSubject: 677 | metroCertificateIssuer: 678 | metroCertificateNotAfter: 0000000000000000 679 | metroApplicationDescription: Template_3D 680 | wsaImages: {} 681 | metroTileShortName: 682 | metroTileShowName: 0 683 | metroMediumTileShowName: 0 684 | metroLargeTileShowName: 0 685 | metroWideTileShowName: 0 686 | metroSupportStreamingInstall: 0 687 | metroLastRequiredScene: 0 688 | metroDefaultTileSize: 1 689 | metroTileForegroundText: 2 690 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 691 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 692 | a: 1} 693 | metroSplashScreenUseBackgroundColor: 0 694 | platformCapabilities: {} 695 | metroTargetDeviceFamilies: {} 696 | metroFTAName: 697 | metroFTAFileTypes: [] 698 | metroProtocolName: 699 | XboxOneProductId: 700 | XboxOneUpdateKey: 701 | XboxOneSandboxId: 702 | XboxOneContentId: 703 | XboxOneTitleId: 704 | XboxOneSCId: 705 | XboxOneGameOsOverridePath: 706 | XboxOnePackagingOverridePath: 707 | XboxOneAppManifestOverridePath: 708 | XboxOneVersion: 1.0.0.0 709 | XboxOnePackageEncryption: 0 710 | XboxOnePackageUpdateGranularity: 2 711 | XboxOneDescription: 712 | XboxOneLanguage: 713 | - enus 714 | XboxOneCapability: [] 715 | XboxOneGameRating: {} 716 | XboxOneIsContentPackage: 0 717 | XboxOneEnableGPUVariability: 0 718 | XboxOneSockets: {} 719 | XboxOneSplashScreen: {fileID: 0} 720 | XboxOneAllowedProductIds: [] 721 | XboxOnePersistentLocalStorageSize: 0 722 | XboxOneXTitleMemory: 8 723 | XboxOneOverrideIdentityName: 724 | vrEditorSettings: 725 | daydream: 726 | daydreamIconForeground: {fileID: 0} 727 | daydreamIconBackground: {fileID: 0} 728 | cloudServicesEnabled: 729 | UNet: 1 730 | luminIcon: 731 | m_Name: 732 | m_ModelFolderPath: 733 | m_PortalFolderPath: 734 | luminCert: 735 | m_CertPath: 736 | m_SignPackage: 1 737 | luminIsChannelApp: 0 738 | luminVersion: 739 | m_VersionCode: 1 740 | m_VersionName: 741 | apiCompatibilityLevel: 6 742 | cloudProjectId: 743 | framebufferDepthMemorylessMode: 0 744 | projectName: Template_3D 745 | organizationId: 746 | cloudEnabled: 0 747 | enableNativePlatformBackendsForNewInputSystem: 0 748 | disableOldInputManagerSupport: 0 749 | legacyClampBlendShapeWeights: 1 750 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2019.4.12f1 2 | m_EditorVersionWithRevision: 2019.4.12f1 (225e826a680e) 3 | -------------------------------------------------------------------------------- /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 | - 20 | - 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.0167 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 | serializedVersion: 1 7 | m_Enabled: 1 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_TestInitMode: 0 13 | CrashReportingSettings: 14 | m_EventUrl: https://perf-events.cloud.unity3d.com 15 | m_Enabled: 0 16 | m_LogBufferSize: 10 17 | m_CaptureEditorExceptions: 1 18 | UnityPurchasingSettings: 19 | m_Enabled: 0 20 | m_TestMode: 0 21 | UnityAnalyticsSettings: 22 | m_Enabled: 1 23 | m_TestMode: 0 24 | m_InitializeOnStartup: 1 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 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_StripUpdateShader: {fileID: 0} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # UNHVD Unity Network Hardware Video Decoder 2 | 3 | Example of video and point cloud streaming with hardware decoding and custom [MLSP](https://github.com/bmegli/minimal-latency-streaming-protocol) protocol: 4 | 5 | - streaming video to UI element (RawImage) 6 | - streaming video to scene element (anything with texture) 7 | - streaming textured point clouds (Mesh) 8 | 9 | This project contains native library plugin. 10 | 11 | See [how-it-works](https://github.com/bmegli/unity-network-hardware-video-decoder/wiki/How-it-works) on wiki to understand the project. 12 | 13 | See [benchmarks](https://github.com/bmegli/unity-network-hardware-video-decoder/wiki/Benchmarks) on wiki for glass-to-glass latency. 14 | 15 | See [hardware-video-streaming](https://github.com/bmegli/hardware-video-streaming) for related projects. 16 | 17 | See videos to understand point cloud streaming features: 18 | 19 | | Point Cloud Streaming | Infrared Point Cloud Streaming | Point Cloud Streaming To UMPC | 20 | |-----------------------|-----------------------------------------|--------------------------------| 21 | | [![Hardware Accelerated Point Cloud Streaming](http://img.youtube.com/vi/qnTxhfNW-_4/0.jpg)](http://www.youtube.com/watch?v=qnTxhfNW-_4) | [![Hardware Accelerated Infrared Textured Point Cloud Streaming](http://img.youtube.com/vi/zVIuvWMz5mU/0.jpg)](https://www.youtube.com/watch?v=zVIuvWMz5mU) | [![Realsense Wireless Point Cloud Streaming To UMPC](http://img.youtube.com/vi/952VkYPeW3M/0.jpg)](https://www.youtube.com/watch?v=952VkYPeW3M) | 22 | 23 | ## Video sources 24 | 25 | Currently Unix-like platforms only. 26 | 27 | - [NHVE](https://github.com/bmegli/network-hardware-video-encoder) (dummy, procedurally generated video) 28 | - [RNHVE](https://github.com/bmegli/realsense-network-hardware-video-encoder) (Realsense camera streaming) 29 | 30 | ## Platforms 31 | 32 | Unix-like operating systems (e.g. Linux), [more info](https://github.com/bmegli/unity-network-hardware-video-decoder/wiki/Platforms). 33 | 34 | Tested on Ubuntu 18.04. 35 | 36 | ## Hardware 37 | 38 | Tested on Intel Kaby Lake. 39 | 40 | ### Video 41 | 42 | Intel VAAPI compatible hardware decoders (Quick Sync Video). 43 | 44 | It is likely that H.264 through VAAPI will work also on AMD and NVIDIA. 45 | 46 | [Other technologies](https://github.com/bmegli/unity-network-hardware-video-decoder/wiki/Hardware) may also work but were not tested. 47 | 48 | 49 | ### Depth/point clouds/textured point clouds 50 | 51 | Intel VAAPI HEVC Main10 compatible hardware decoders, at least Intel Apollo Lake. 52 | 53 | [Other technologies](https://github.com/bmegli/unity-network-hardware-video-decoder/wiki/Hardware) may also work but were not tested. 54 | 55 | [GPUPointCloudRenderer](https://github.com/bmegli/unity-network-hardware-video-decoder/wiki/How-it-works#gpupointcloudrenderer) has additional [requirements](https://github.com/bmegli/hardware-depth-unprojector#platforms) related to compute shaders. 56 | 57 | ## Dependencies 58 | 59 | All dependencies apart from FFmpeg are included as submodules, [more info](https://github.com/bmegli/unity-network-hardware-video-decoder/wiki/Dependencies). 60 | 61 | Works with system FFmpeg on Ubuntu 18.04 and doesn't on 16.04 (outdated FFmpeg and VAAPI ecosystem). 62 | 63 | ## Building Instructions 64 | 65 | Tested on Ubuntu 18.04.\ 66 | Requires Unity 2019.4 (LTS) 67 | 68 | ``` bash 69 | # update package repositories 70 | sudo apt-get update 71 | # get avcodec and avutil 72 | sudo apt-get install ffmpeg libavcodec-dev libavutil-dev 73 | # get compilers and make 74 | sudo apt-get install build-essential 75 | # get cmake - we need to specify libcurl4 for Ubuntu 18.04 dependencies problem 76 | sudo apt-get install libcurl4 cmake 77 | # get git 78 | sudo apt-get install git 79 | # clone the repository with *RECURSIVE* for submodules 80 | git clone --recursive https://github.com/bmegli/unity-network-hardware-video-decoder.git 81 | 82 | # build the plugin shared library 83 | cd unity-network-hardware-video-decoder 84 | cd PluginsSource 85 | cd unhvd-native 86 | mkdir build 87 | cd build 88 | cmake .. 89 | make 90 | 91 | # finally copy the native plugin library to Unity project 92 | cp libunhvd.so ../../../Assets/Plugins/x86_64/libunhvd.so 93 | ``` 94 | 95 | ## Testing 96 | 97 | Assuming you are using VAAPI device. 98 | 99 | 1. Open the project in Unity 100 | 2. Choose and enable GameObject 101 | 4. For Script define Configuration (`Port`, `Device`) 102 | 5. For troubleshooting use programs in `PluginsSource/unhvd-native/build` 103 | 104 | | Element | Video | Point Clouds | 105 | |------------------|---------------------------------------|-----------------------------------------| 106 | | GameObject | `Canvas` -> `CameraView` -> `RawImage` (UI)
`VideoQuad` (scene) | `PointCloud`
`GPUPointCloud` | 107 | | Script | `RawImageVideoRenderer`
`VideoRenderer` | `PointCloudRenderer`
`GPUPointCloudRenderer` | 108 | | Configuration | `Port` (network)
`Device` (acceleration>
script code | `Port` (network)
`Device` (acceleration)
script code | 109 | | Troubleshooting | `unhvd-frame-example` | `unhvd-cloud-example` | 110 | 111 | ### Sending side 112 | | Element | Video | Point Clouds | 113 | |------------------|---------------------------------------|-----------------------------------------| 114 | | Sending side | NHVE `nhve-stream-h264`
RNHVE `realsense-nhve-h264` | RNHVE `realsense-nhve-hevc`
RNHVE `realsense-nhve-depth-ir`
RNHVE `realsense-nhve-depth-color` | 115 | 116 | For a quick test you may use [NHVE](https://github.com/bmegli/network-hardware-video-encoder) procedurally generated H.264 video. 117 | 118 | If you have Realsense camera you may use [RNHVE](https://github.com/bmegli/realsense-network-hardware-video-encoder). 119 | 120 | #### Video 121 | 122 | ```bash 123 | # assuming you build NHVE port is 9766, VAAPI device is /dev/dri/renderD128 124 | # in NHVE build directory 125 | ./nhve-stream-h264 127.0.0.1 9766 10 /dev/dri/renderD128 126 | # if everything went well you will see 10 seconds video (moving through grayscale). 127 | 128 | # assuming you build RNHVE, port is 9766, VAAPI device is /dev/dri/renderD128 129 | # in RNHVE build directory 130 | ./realsense-nhve-h264 127.0.0.1 9766 color 640 360 30 20 /dev/dri/renderD128 131 | # if everything went well you will see 20 seconds video streamed from Realsense camera. 132 | ``` 133 | 134 | #### Point Clouds 135 | 136 | Assuming Realsense D435 camera and 848x480. 137 | 138 | ```bash 139 | # assuming you build RNHVE, port is 9768, VAAPI device is /dev/dri/renderD128 140 | # in RNHVE build directory 141 | ./realsense-nhve-hevc 127.0.0.1 9768 depth 848 480 30 500 /dev/dri/renderD128 142 | # for infrared textured point cloud 143 | ./realsense-nhve-depth-ir 127.0.0.1 9768 ir 848 480 30 500 /dev/dri/renderD128 8000000 1000000 0.0001 144 | # for infrared rgb textured point cloud (D415/D455) 145 | ./realsense-nhve-depth-ir 127.0.0.1 9768 ir-rgb 848 480 30 500 /dev/dri/renderD128 8000000 1000000 0.0001 146 | # for color textured point cloud, depth aligned 147 | ./realsense-nhve-depth-color 127.0.01 9768 depth 848 480 848 480 30 500 /dev/dri/renderD128 8000000 1000000 0.0001 148 | # for color textured point cloud, color aligned, color intrinsics required 149 | ./realsense-nhve-depth-color 127.0.01 9768 color 848 480 848 480 30 500 /dev/dri/renderD128 8000000 1000000 0.0001 150 | ``` 151 | 152 | If you are using different Realsense device/resolution you will have to configure camera intrinsics. 153 | 154 | See [point clouds configuration](https://github.com/bmegli/unity-network-hardware-video-decoder/wiki/Point-clouds-configuration) for the details. 155 | 156 | ## OS tweaks 157 | 158 | If you experience [stuttering with artifacts](https://github.com/bmegli/unity-network-hardware-video-decoder/issues/10#issuecomment-633255931) increase UDP buffer size. 159 | 160 | ```bash 161 | # here 10 x the the default value on my system 162 | sudo sh -c "echo 2129920 > /proc/sys/net/core/rmem_max" 163 | sudo sh -c "echo 2129920 > /proc/sys/net/core/rmem_default" 164 | ``` 165 | 166 | ## License 167 | 168 | Code in this repository and my dependencies are licensed under Mozilla Public License, v. 2.0 169 | 170 | This is similiar to LGPL but more permissive: 171 | - you can use it as LGPL in prioprietrary software 172 | - unlike LGPL you may compile it statically with your code 173 | 174 | Like in LGPL, if you modify the code, you have to make your changes available. 175 | Making a github fork with your changes satisfies those requirements perfectly. 176 | 177 | Since you are linking to FFmpeg libraries consider also `avcodec` and `avutil` licensing. 178 | 179 | --------------------------------------------------------------------------------