├── .gitignore ├── Assets ├── CreateMeshFromAllSceneMeshes.meta ├── CreateMeshFromAllSceneMeshes │ ├── CreateMeshFromWholeScene.cs │ ├── CreateMeshFromWholeScene.cs.meta │ ├── LargeScene.unity │ ├── LargeScene.unity.meta │ ├── MaterialForNewlyCreatedMesh.mat │ ├── MaterialForNewlyCreatedMesh.mat.meta │ ├── ScenePartLarge.prefab │ ├── ScenePartLarge.prefab.meta │ ├── ScenePartLarger.prefab │ ├── ScenePartLarger.prefab.meta │ ├── ScenePartSmall.prefab │ ├── ScenePartSmall.prefab.meta │ ├── SmallScene.unity │ └── SmallScene.unity.meta ├── NoiseBall.meta ├── NoiseBall │ ├── NoiseBall.cs │ ├── NoiseBall.cs.meta │ ├── NoiseBallCompute.compute │ ├── NoiseBallCompute.compute.meta │ ├── NoiseBallMat.mat │ ├── NoiseBallMat.mat.meta │ ├── NoiseBallScene.unity │ ├── NoiseBallScene.unity.meta │ ├── SimplexNoise3D.cginc │ ├── SimplexNoise3D.cginc.meta │ ├── SimplexNoise3D.cs │ └── SimplexNoise3D.cs.meta ├── PerformanceIndicator.cs ├── PerformanceIndicator.cs.meta ├── ProceduralWaterMesh.meta └── ProceduralWaterMesh │ ├── ProceduralWaterMesh.cs │ ├── ProceduralWaterMesh.cs.meta │ ├── WaterComputeShader.compute │ ├── WaterComputeShader.compute.meta │ ├── WaterScene.unity │ └── WaterScene.unity.meta ├── Images ├── Combine1.png ├── Combine2.png ├── NoiseBall.png └── Water.png ├── LICENSE ├── Packages ├── manifest.json └── packages-lock.json ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── PackageManagerSettings.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityConnectSettings.asset ├── VFXManager.asset ├── VersionControlSettings.asset └── XRSettings.asset └── readme.md /.gitignore: -------------------------------------------------------------------------------- 1 | /Library/ 2 | /Logs/ 3 | /Temp/ 4 | /UserSettings/ 5 | /obj/ 6 | 7 | # macOS 8 | .DS_Store 9 | 10 | # Rider 11 | /Assets/Plugins/Editor/JetBrains* 12 | /.idea/ 13 | 14 | # Visual Studio files/caches 15 | .vs/ 16 | *.csproj 17 | *.sln 18 | *.suo 19 | *.tmp 20 | *.user 21 | *.userprefs 22 | *.pidb 23 | *.pdb 24 | *.mdb 25 | *.opendb 26 | *.VC.db 27 | Builds/* 28 | -------------------------------------------------------------------------------- /Assets/CreateMeshFromAllSceneMeshes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 714a8b0521f5a4cc9a697158d4e8cbc8 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/CreateMeshFromAllSceneMeshes/CreateMeshFromWholeScene.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Diagnostics; 3 | using Unity.Burst; 4 | using Unity.Collections; 5 | using Unity.Collections.LowLevel.Unsafe; 6 | using Unity.Jobs; 7 | using Unity.Mathematics; 8 | using Unity.Profiling; 9 | using UnityEngine; 10 | using UnityEditor; 11 | using UnityEngine.Rendering; 12 | using Debug = UnityEngine.Debug; 13 | 14 | // Finds all MeshFilter components in the scene, and creates a new giant Mesh out of all of them (except the ones with 15 | // "CombinedMesh_DontCombineMeAgain" name). This is similar to what "static batching" would do -- take input meshes, transform their 16 | // vertices/normals into world space, add to the output mesh. 17 | // 18 | // One approach is using C# Jobs, Burst and the new 2020.1 MeshData API. Another implementation further below is 19 | // using "traditional" Mesh API. 20 | public class CreateSceneMesh : MonoBehaviour 21 | { 22 | const string kCombinedMeshName = "CombinedMesh_DontCombineMeAgain"; 23 | static ProfilerMarker smp1 = new ProfilerMarker("Find Meshes"); 24 | static ProfilerMarker smp2 = new ProfilerMarker("Prepare"); 25 | static ProfilerMarker smp3 = new ProfilerMarker("Create Mesh"); 26 | static ProfilerMarker smp4 = new ProfilerMarker("Cleanup"); 27 | 28 | #if UNITY_EDITOR 29 | // ---------------------------------------------------------------------------------------------------------------- 30 | // New Unity 2020.1 MeshData API 31 | // 32 | // Took 0.06sec for 11466 objects, total 4676490 verts (MacBookPro 2018, 2.9GHz i9) 33 | // Profiler: 59ms (GC alloc 275KB): 34 | // - Create Mesh 47ms (mostly waiting for jobs) 35 | // - Prepare 8ms (89KB GC alloc) 36 | // - FindMeshes 2.1ms (180KB GC alloc) 37 | [MenuItem("Mesh API Test/Create Mesh From Scene - New API %G")] 38 | public static void CreateMesh_MeshDataApi() 39 | { 40 | var sw = Stopwatch.StartNew(); 41 | 42 | // Find all MeshFilter objects in the scene 43 | smp1.Begin(); 44 | var meshFilters = FindObjectsOfType(); 45 | smp1.End(); 46 | 47 | // Need to figure out how large the output mesh needs to be (in terms of vertex/index count), 48 | // as well as get transforms and vertex/index location offsets for each mesh. 49 | smp2.Begin(); 50 | var jobs = new ProcessMeshDataJob(); 51 | jobs.CreateInputArrays(meshFilters.Length); 52 | var inputMeshes = new List(meshFilters.Length); 53 | 54 | var vertexStart = 0; 55 | var indexStart = 0; 56 | var meshCount = 0; 57 | for (var i = 0; i < meshFilters.Length; ++i) 58 | { 59 | var mf = meshFilters[i]; 60 | var go = mf.gameObject; 61 | if (go.name == kCombinedMeshName) 62 | { 63 | DestroyImmediate(go); 64 | continue; 65 | } 66 | 67 | var mesh = mf.sharedMesh; 68 | inputMeshes.Add(mesh); 69 | jobs.vertexStart[meshCount] = vertexStart; 70 | jobs.indexStart[meshCount] = indexStart; 71 | jobs.xform[meshCount] = go.transform.localToWorldMatrix; 72 | vertexStart += mesh.vertexCount; 73 | indexStart += (int)mesh.GetIndexCount(0); 74 | jobs.bounds[meshCount] = new float3x2(new float3(Mathf.Infinity), new float3(Mathf.NegativeInfinity)); 75 | ++meshCount; 76 | } 77 | smp2.End(); 78 | 79 | // Acquire read-only data for input meshes 80 | jobs.meshData = Mesh.AcquireReadOnlyMeshData(inputMeshes); 81 | 82 | // Create and initialize writable data for the output mesh 83 | var outputMeshData = Mesh.AllocateWritableMeshData(1); 84 | jobs.outputMesh = outputMeshData[0]; 85 | jobs.outputMesh.SetIndexBufferParams(indexStart, IndexFormat.UInt32); 86 | jobs.outputMesh.SetVertexBufferParams(vertexStart, 87 | new VertexAttributeDescriptor(VertexAttribute.Position), 88 | new VertexAttributeDescriptor(VertexAttribute.Normal, stream:1)); 89 | 90 | // Launch mesh processing jobs 91 | var handle = jobs.Schedule(meshCount, 4); 92 | 93 | // Create destination Mesh object 94 | smp3.Begin(); 95 | var newMesh = new Mesh(); 96 | newMesh.name = "CombinedMesh"; 97 | var sm = new SubMeshDescriptor(0, indexStart, MeshTopology.Triangles); 98 | sm.firstVertex = 0; 99 | sm.vertexCount = vertexStart; 100 | 101 | // Wait for jobs to finish, since we'll have to access the produced mesh/bounds data at this point 102 | handle.Complete(); 103 | 104 | // Final bounding box of the whole mesh is union of the bounds of individual transformed meshes 105 | var bounds = new float3x2(new float3(Mathf.Infinity), new float3(Mathf.NegativeInfinity)); 106 | for (var i = 0; i < meshCount; ++i) 107 | { 108 | var b = jobs.bounds[i]; 109 | bounds.c0 = math.min(bounds.c0, b.c0); 110 | bounds.c1 = math.max(bounds.c1, b.c1); 111 | } 112 | sm.bounds = new Bounds((bounds.c0+bounds.c1)*0.5f, bounds.c1-bounds.c0); 113 | jobs.outputMesh.subMeshCount = 1; 114 | jobs.outputMesh.SetSubMesh(0, sm, MeshUpdateFlags.DontRecalculateBounds | MeshUpdateFlags.DontValidateIndices | MeshUpdateFlags.DontNotifyMeshUsers); 115 | Mesh.ApplyAndDisposeWritableMeshData(outputMeshData, new[]{newMesh}, MeshUpdateFlags.DontRecalculateBounds | MeshUpdateFlags.DontValidateIndices | MeshUpdateFlags.DontNotifyMeshUsers); 116 | newMesh.bounds = sm.bounds; 117 | smp3.End(); 118 | 119 | // Dispose of the read-only mesh data and temporary bounds array 120 | smp4.Begin(); 121 | jobs.meshData.Dispose(); 122 | jobs.bounds.Dispose(); 123 | smp4.End(); 124 | 125 | // Create new GameObject with the new mesh 126 | var newGo = new GameObject(kCombinedMeshName, typeof(MeshFilter), typeof(MeshRenderer)); 127 | var newMf = newGo.GetComponent(); 128 | var newMr = newGo.GetComponent(); 129 | newMr.material = AssetDatabase.LoadAssetAtPath("Assets/CreateMeshFromAllSceneMeshes/MaterialForNewlyCreatedMesh.mat"); 130 | newMf.sharedMesh = newMesh; 131 | //newMesh.RecalculateNormals(); // faster to do normal xform in the job 132 | 133 | var dur = sw.ElapsedMilliseconds; 134 | Debug.Log($"Took {dur/1000.0:F2}sec for {meshCount} objects, total {vertexStart} verts"); 135 | 136 | Selection.activeObject = newGo; 137 | } 138 | 139 | [BurstCompile] 140 | struct ProcessMeshDataJob : IJobParallelFor 141 | { 142 | [ReadOnly] public Mesh.MeshDataArray meshData; 143 | public Mesh.MeshData outputMesh; 144 | [DeallocateOnJobCompletion] [ReadOnly] public NativeArray vertexStart; 145 | [DeallocateOnJobCompletion] [ReadOnly] public NativeArray indexStart; 146 | [DeallocateOnJobCompletion] [ReadOnly] public NativeArray xform; 147 | public NativeArray bounds; 148 | 149 | [NativeDisableContainerSafetyRestriction] NativeArray tempVertices; 150 | [NativeDisableContainerSafetyRestriction] NativeArray tempNormals; 151 | 152 | public void CreateInputArrays(int meshCount) 153 | { 154 | vertexStart = new NativeArray(meshCount, Allocator.TempJob, NativeArrayOptions.UninitializedMemory); 155 | indexStart = new NativeArray(meshCount, Allocator.TempJob, NativeArrayOptions.UninitializedMemory); 156 | xform = new NativeArray(meshCount, Allocator.TempJob, NativeArrayOptions.UninitializedMemory); 157 | bounds = new NativeArray(meshCount, Allocator.TempJob, NativeArrayOptions.UninitializedMemory); 158 | } 159 | 160 | public void Execute(int index) 161 | { 162 | var data = meshData[index]; 163 | var vCount = data.vertexCount; 164 | var mat = xform[index]; 165 | var vStart = vertexStart[index]; 166 | 167 | // Allocate temporary arrays for input mesh vertices/normals 168 | if (!tempVertices.IsCreated || tempVertices.Length < vCount) 169 | { 170 | if (tempVertices.IsCreated) tempVertices.Dispose(); 171 | tempVertices = new NativeArray(vCount, Allocator.Temp, NativeArrayOptions.UninitializedMemory); 172 | } 173 | if (!tempNormals.IsCreated || tempNormals.Length < vCount) 174 | { 175 | if (tempNormals.IsCreated) tempNormals.Dispose(); 176 | tempNormals = new NativeArray(vCount, Allocator.Temp, NativeArrayOptions.UninitializedMemory); 177 | } 178 | // Read input mesh vertices/normals into temporary arrays -- this will 179 | // do any necessary format conversions into float3 data 180 | data.GetVertices(tempVertices.Reinterpret()); 181 | data.GetNormals(tempNormals.Reinterpret()); 182 | 183 | var outputVerts = outputMesh.GetVertexData(); 184 | var outputNormals = outputMesh.GetVertexData(stream:1); 185 | 186 | // Transform input mesh vertices/normals, write into destination mesh, 187 | // compute transformed mesh bounds. 188 | var b = bounds[index]; 189 | for (var i = 0; i < vCount; ++i) 190 | { 191 | var pos = tempVertices[i]; 192 | pos = math.mul(mat, new float4(pos, 1)).xyz; 193 | outputVerts[i+vStart] = pos; 194 | var nor = tempNormals[i]; 195 | nor = math.normalize(math.mul(mat, new float4(nor, 0)).xyz); 196 | outputNormals[i+vStart] = nor; 197 | b.c0 = math.min(b.c0, pos); 198 | b.c1 = math.max(b.c1, pos); 199 | } 200 | bounds[index] = b; 201 | 202 | // Write input mesh indices into destination index buffer 203 | var tStart = indexStart[index]; 204 | var tCount = data.GetSubMesh(0).indexCount; 205 | var outputTris = outputMesh.GetIndexData(); 206 | if (data.indexFormat == IndexFormat.UInt16) 207 | { 208 | var tris = data.GetIndexData(); 209 | for (var i = 0; i < tCount; ++i) 210 | outputTris[i + tStart] = vStart + tris[i]; 211 | } 212 | else 213 | { 214 | var tris = data.GetIndexData(); 215 | for (var i = 0; i < tCount; ++i) 216 | outputTris[i + tStart] = vStart + tris[i]; 217 | } 218 | } 219 | } 220 | 221 | // ---------------------------------------------------------------------------------------------------------------- 222 | // "Traditional" Mesh API 223 | // 224 | // Took 0.76sec for 11467 objects, total 4676490 verts (MacBookPro 2018, 2.9GHz i9) 225 | // Profiler: 703ms (640MB GC alloc): 226 | // - Prepare 340ms (23k GC allocs total 640MB), 227 | // - Recalculate Normals 214ms, 228 | // - Create Mesh 142ms, 229 | // - FindMeshes 2ms (180KB GC alloc) 230 | [MenuItem("Mesh API Test/Create Mesh From Scene - Classic Api %J")] 231 | public static void CreateMesh_ClassicApi() 232 | { 233 | var sw = Stopwatch.StartNew(); 234 | smp1.Begin(); 235 | var meshFilters = FindObjectsOfType(); 236 | smp1.End(); 237 | 238 | smp2.Begin(); 239 | List allVerts = new List(); 240 | //List allNormals = new List(); // faster to do RecalculateNormals than doing it manually 241 | List allIndices = new List(); 242 | foreach (var mf in meshFilters) 243 | { 244 | var go = mf.gameObject; 245 | if (go.CompareTag("EditorOnly")) 246 | { 247 | DestroyImmediate(go); 248 | continue; 249 | } 250 | 251 | var tr = go.transform; 252 | var mesh = mf.sharedMesh; 253 | var verts = mesh.vertices; 254 | //var normals = mesh.normals; 255 | var tris = mesh.triangles; 256 | for (var i = 0; i < verts.Length; ++i) 257 | { 258 | var pos = verts[i]; 259 | pos = tr.TransformPoint(pos); 260 | verts[i] = pos; 261 | //var nor = normals[i]; 262 | //nor = tr.TransformDirection(nor).normalized; 263 | //normals[i] = nor; 264 | } 265 | var baseIdx = allVerts.Count; 266 | for (var i = 0; i < tris.Length; ++i) 267 | tris[i] = tris[i] + baseIdx; 268 | allVerts.AddRange(verts); 269 | //allNormals.AddRange(normals); 270 | allIndices.AddRange(tris); 271 | } 272 | smp2.End(); 273 | 274 | smp3.Begin(); 275 | var newMesh = new Mesh(); 276 | newMesh.name = "CombinedMesh"; 277 | newMesh.indexFormat = IndexFormat.UInt32; 278 | newMesh.SetVertices(allVerts); 279 | //newMesh.SetNormals(allNormals); 280 | newMesh.SetTriangles(allIndices, 0); 281 | smp3.End(); 282 | 283 | var newGo = new GameObject("CombinedMesh", typeof(MeshFilter), typeof(MeshRenderer)); 284 | newGo.tag = "EditorOnly"; 285 | var newMf = newGo.GetComponent(); 286 | var newMr = newGo.GetComponent(); 287 | newMr.material = AssetDatabase.LoadAssetAtPath("Assets/CreateMeshFromAllSceneMeshes/MaterialForNewlyCreatedMesh.mat"); 288 | newMf.sharedMesh = newMesh; 289 | newMesh.RecalculateNormals(); 290 | 291 | var dur = sw.ElapsedMilliseconds; 292 | Debug.Log($"Took {dur/1000.0:F2}sec for {meshFilters.Length} objects, total {allVerts.Count} verts"); 293 | 294 | Selection.activeObject = newGo; 295 | } 296 | #endif // #if UNITY_EDITOR 297 | } -------------------------------------------------------------------------------- /Assets/CreateMeshFromAllSceneMeshes/CreateMeshFromWholeScene.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8056e245c0fbd4c83a4c6f985ceda424 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/CreateMeshFromAllSceneMeshes/LargeScene.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: 705507994} 41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 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: 40 60 | m_AtlasSize: 1024 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: 500 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 500 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_LightingSettings: {fileID: 0} 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!1001 &151341554 125 | PrefabInstance: 126 | m_ObjectHideFlags: 0 127 | serializedVersion: 2 128 | m_Modification: 129 | m_TransformParent: {fileID: 0} 130 | m_Modifications: 131 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 132 | type: 3} 133 | propertyPath: m_LocalPosition.x 134 | value: 12.9 135 | objectReference: {fileID: 0} 136 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 137 | type: 3} 138 | propertyPath: m_LocalPosition.y 139 | value: -2.9 140 | objectReference: {fileID: 0} 141 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 142 | type: 3} 143 | propertyPath: m_LocalPosition.z 144 | value: 80.1 145 | objectReference: {fileID: 0} 146 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 147 | type: 3} 148 | propertyPath: m_LocalRotation.x 149 | value: 0 150 | objectReference: {fileID: 0} 151 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 152 | type: 3} 153 | propertyPath: m_LocalRotation.y 154 | value: 0.86602545 155 | objectReference: {fileID: 0} 156 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 157 | type: 3} 158 | propertyPath: m_LocalRotation.z 159 | value: 0 160 | objectReference: {fileID: 0} 161 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 162 | type: 3} 163 | propertyPath: m_LocalRotation.w 164 | value: 0.49999994 165 | objectReference: {fileID: 0} 166 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 167 | type: 3} 168 | propertyPath: m_RootOrder 169 | value: 8 170 | objectReference: {fileID: 0} 171 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 172 | type: 3} 173 | propertyPath: m_LocalEulerAnglesHint.x 174 | value: 0 175 | objectReference: {fileID: 0} 176 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 177 | type: 3} 178 | propertyPath: m_LocalEulerAnglesHint.y 179 | value: 120 180 | objectReference: {fileID: 0} 181 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 182 | type: 3} 183 | propertyPath: m_LocalEulerAnglesHint.z 184 | value: 0 185 | objectReference: {fileID: 0} 186 | - target: {fileID: 1281073496485879189, guid: b4655f85f82c048f0aa9c59aee954efc, 187 | type: 3} 188 | propertyPath: m_Name 189 | value: ScenePartLarge (6) 190 | objectReference: {fileID: 0} 191 | m_RemovedComponents: [] 192 | m_SourcePrefab: {fileID: 100100000, guid: b4655f85f82c048f0aa9c59aee954efc, type: 3} 193 | --- !u!1001 &188504973 194 | PrefabInstance: 195 | m_ObjectHideFlags: 0 196 | serializedVersion: 2 197 | m_Modification: 198 | m_TransformParent: {fileID: 0} 199 | m_Modifications: 200 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 201 | type: 3} 202 | propertyPath: m_LocalPosition.x 203 | value: -6.6 204 | objectReference: {fileID: 0} 205 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 206 | type: 3} 207 | propertyPath: m_LocalPosition.y 208 | value: -2.9 209 | objectReference: {fileID: 0} 210 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 211 | type: 3} 212 | propertyPath: m_LocalPosition.z 213 | value: 30 214 | objectReference: {fileID: 0} 215 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 216 | type: 3} 217 | propertyPath: m_LocalRotation.x 218 | value: 0 219 | objectReference: {fileID: 0} 220 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 221 | type: 3} 222 | propertyPath: m_LocalRotation.y 223 | value: -0.17364825 224 | objectReference: {fileID: 0} 225 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 226 | type: 3} 227 | propertyPath: m_LocalRotation.z 228 | value: 0 229 | objectReference: {fileID: 0} 230 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 231 | type: 3} 232 | propertyPath: m_LocalRotation.w 233 | value: 0.9848078 234 | objectReference: {fileID: 0} 235 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 236 | type: 3} 237 | propertyPath: m_RootOrder 238 | value: 4 239 | objectReference: {fileID: 0} 240 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 241 | type: 3} 242 | propertyPath: m_LocalEulerAnglesHint.x 243 | value: 0 244 | objectReference: {fileID: 0} 245 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 246 | type: 3} 247 | propertyPath: m_LocalEulerAnglesHint.y 248 | value: -20 249 | objectReference: {fileID: 0} 250 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 251 | type: 3} 252 | propertyPath: m_LocalEulerAnglesHint.z 253 | value: 0 254 | objectReference: {fileID: 0} 255 | - target: {fileID: 1281073496485879189, guid: b4655f85f82c048f0aa9c59aee954efc, 256 | type: 3} 257 | propertyPath: m_Name 258 | value: ScenePartLarge (2) 259 | objectReference: {fileID: 0} 260 | m_RemovedComponents: [] 261 | m_SourcePrefab: {fileID: 100100000, guid: b4655f85f82c048f0aa9c59aee954efc, type: 3} 262 | --- !u!1001 &400604331 263 | PrefabInstance: 264 | m_ObjectHideFlags: 0 265 | serializedVersion: 2 266 | m_Modification: 267 | m_TransformParent: {fileID: 0} 268 | m_Modifications: 269 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 270 | type: 3} 271 | propertyPath: m_LocalPosition.x 272 | value: -15.448124 273 | objectReference: {fileID: 0} 274 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 275 | type: 3} 276 | propertyPath: m_LocalPosition.y 277 | value: -2.9 278 | objectReference: {fileID: 0} 279 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 280 | type: 3} 281 | propertyPath: m_LocalPosition.z 282 | value: 4.334389 283 | objectReference: {fileID: 0} 284 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 285 | type: 3} 286 | propertyPath: m_LocalRotation.x 287 | value: 0 288 | objectReference: {fileID: 0} 289 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 290 | type: 3} 291 | propertyPath: m_LocalRotation.y 292 | value: -0.30070576 293 | objectReference: {fileID: 0} 294 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 295 | type: 3} 296 | propertyPath: m_LocalRotation.z 297 | value: 0 298 | objectReference: {fileID: 0} 299 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 300 | type: 3} 301 | propertyPath: m_LocalRotation.w 302 | value: 0.953717 303 | objectReference: {fileID: 0} 304 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 305 | type: 3} 306 | propertyPath: m_RootOrder 307 | value: 2 308 | objectReference: {fileID: 0} 309 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 310 | type: 3} 311 | propertyPath: m_LocalEulerAnglesHint.x 312 | value: 0 313 | objectReference: {fileID: 0} 314 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 315 | type: 3} 316 | propertyPath: m_LocalEulerAnglesHint.y 317 | value: -35 318 | objectReference: {fileID: 0} 319 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 320 | type: 3} 321 | propertyPath: m_LocalEulerAnglesHint.z 322 | value: 0 323 | objectReference: {fileID: 0} 324 | - target: {fileID: 1281073496485879189, guid: b4655f85f82c048f0aa9c59aee954efc, 325 | type: 3} 326 | propertyPath: m_Name 327 | value: ScenePartLarge 328 | objectReference: {fileID: 0} 329 | m_RemovedComponents: [] 330 | m_SourcePrefab: {fileID: 100100000, guid: b4655f85f82c048f0aa9c59aee954efc, type: 3} 331 | --- !u!1001 &450584764 332 | PrefabInstance: 333 | m_ObjectHideFlags: 0 334 | serializedVersion: 2 335 | m_Modification: 336 | m_TransformParent: {fileID: 0} 337 | m_Modifications: 338 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 339 | type: 3} 340 | propertyPath: m_LocalPosition.x 341 | value: 41.2 342 | objectReference: {fileID: 0} 343 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 344 | type: 3} 345 | propertyPath: m_LocalPosition.y 346 | value: -2.9 347 | objectReference: {fileID: 0} 348 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 349 | type: 3} 350 | propertyPath: m_LocalPosition.z 351 | value: 9.9 352 | objectReference: {fileID: 0} 353 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 354 | type: 3} 355 | propertyPath: m_LocalRotation.x 356 | value: 0 357 | objectReference: {fileID: 0} 358 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 359 | type: 3} 360 | propertyPath: m_LocalRotation.y 361 | value: 0.6595426 362 | objectReference: {fileID: 0} 363 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 364 | type: 3} 365 | propertyPath: m_LocalRotation.z 366 | value: 0 367 | objectReference: {fileID: 0} 368 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 369 | type: 3} 370 | propertyPath: m_LocalRotation.w 371 | value: 0.7516672 372 | objectReference: {fileID: 0} 373 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 374 | type: 3} 375 | propertyPath: m_RootOrder 376 | value: 7 377 | objectReference: {fileID: 0} 378 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 379 | type: 3} 380 | propertyPath: m_LocalEulerAnglesHint.x 381 | value: 0 382 | objectReference: {fileID: 0} 383 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 384 | type: 3} 385 | propertyPath: m_LocalEulerAnglesHint.y 386 | value: 82.53 387 | objectReference: {fileID: 0} 388 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 389 | type: 3} 390 | propertyPath: m_LocalEulerAnglesHint.z 391 | value: 0 392 | objectReference: {fileID: 0} 393 | - target: {fileID: 1281073496485879189, guid: b4655f85f82c048f0aa9c59aee954efc, 394 | type: 3} 395 | propertyPath: m_Name 396 | value: ScenePartLarge (5) 397 | objectReference: {fileID: 0} 398 | m_RemovedComponents: [] 399 | m_SourcePrefab: {fileID: 100100000, guid: b4655f85f82c048f0aa9c59aee954efc, type: 3} 400 | --- !u!1 &705507993 401 | GameObject: 402 | m_ObjectHideFlags: 0 403 | m_CorrespondingSourceObject: {fileID: 0} 404 | m_PrefabInstance: {fileID: 0} 405 | m_PrefabAsset: {fileID: 0} 406 | serializedVersion: 6 407 | m_Component: 408 | - component: {fileID: 705507995} 409 | - component: {fileID: 705507994} 410 | m_Layer: 0 411 | m_Name: Directional Light 412 | m_TagString: Untagged 413 | m_Icon: {fileID: 0} 414 | m_NavMeshLayer: 0 415 | m_StaticEditorFlags: 0 416 | m_IsActive: 1 417 | --- !u!108 &705507994 418 | Light: 419 | m_ObjectHideFlags: 0 420 | m_CorrespondingSourceObject: {fileID: 0} 421 | m_PrefabInstance: {fileID: 0} 422 | m_PrefabAsset: {fileID: 0} 423 | m_GameObject: {fileID: 705507993} 424 | m_Enabled: 1 425 | serializedVersion: 10 426 | m_Type: 1 427 | m_Shape: 0 428 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 429 | m_Intensity: 1 430 | m_Range: 10 431 | m_SpotAngle: 30 432 | m_InnerSpotAngle: 21.802082 433 | m_CookieSize: 10 434 | m_Shadows: 435 | m_Type: 2 436 | m_Resolution: -1 437 | m_CustomResolution: -1 438 | m_Strength: 1 439 | m_Bias: 0.05 440 | m_NormalBias: 0.4 441 | m_NearPlane: 0.2 442 | m_CullingMatrixOverride: 443 | e00: 1 444 | e01: 0 445 | e02: 0 446 | e03: 0 447 | e10: 0 448 | e11: 1 449 | e12: 0 450 | e13: 0 451 | e20: 0 452 | e21: 0 453 | e22: 1 454 | e23: 0 455 | e30: 0 456 | e31: 0 457 | e32: 0 458 | e33: 1 459 | m_UseCullingMatrixOverride: 0 460 | m_Cookie: {fileID: 0} 461 | m_DrawHalo: 0 462 | m_Flare: {fileID: 0} 463 | m_RenderMode: 0 464 | m_CullingMask: 465 | serializedVersion: 2 466 | m_Bits: 4294967295 467 | m_RenderingLayerMask: 1 468 | m_Lightmapping: 1 469 | m_LightShadowCasterMode: 0 470 | m_AreaSize: {x: 1, y: 1} 471 | m_BounceIntensity: 1 472 | m_ColorTemperature: 6570 473 | m_UseColorTemperature: 0 474 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 475 | m_UseBoundingSphereOverride: 0 476 | m_ShadowRadius: 0 477 | m_ShadowAngle: 0 478 | --- !u!4 &705507995 479 | Transform: 480 | m_ObjectHideFlags: 0 481 | m_CorrespondingSourceObject: {fileID: 0} 482 | m_PrefabInstance: {fileID: 0} 483 | m_PrefabAsset: {fileID: 0} 484 | m_GameObject: {fileID: 705507993} 485 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 486 | m_LocalPosition: {x: 0, y: 3, z: 0} 487 | m_LocalScale: {x: 1, y: 1, z: 1} 488 | m_Children: [] 489 | m_Father: {fileID: 0} 490 | m_RootOrder: 1 491 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 492 | --- !u!1001 &810290641 493 | PrefabInstance: 494 | m_ObjectHideFlags: 0 495 | serializedVersion: 2 496 | m_Modification: 497 | m_TransformParent: {fileID: 0} 498 | m_Modifications: 499 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 500 | type: 3} 501 | propertyPath: m_LocalPosition.x 502 | value: -1.3 503 | objectReference: {fileID: 0} 504 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 505 | type: 3} 506 | propertyPath: m_LocalPosition.y 507 | value: -2.9 508 | objectReference: {fileID: 0} 509 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 510 | type: 3} 511 | propertyPath: m_LocalPosition.z 512 | value: 5.3 513 | objectReference: {fileID: 0} 514 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 515 | type: 3} 516 | propertyPath: m_LocalRotation.x 517 | value: 0 518 | objectReference: {fileID: 0} 519 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 520 | type: 3} 521 | propertyPath: m_LocalRotation.y 522 | value: 0.2859392 523 | objectReference: {fileID: 0} 524 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 525 | type: 3} 526 | propertyPath: m_LocalRotation.z 527 | value: 0 528 | objectReference: {fileID: 0} 529 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 530 | type: 3} 531 | propertyPath: m_LocalRotation.w 532 | value: 0.9582478 533 | objectReference: {fileID: 0} 534 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 535 | type: 3} 536 | propertyPath: m_RootOrder 537 | value: 3 538 | objectReference: {fileID: 0} 539 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 540 | type: 3} 541 | propertyPath: m_LocalEulerAnglesHint.x 542 | value: 0 543 | objectReference: {fileID: 0} 544 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 545 | type: 3} 546 | propertyPath: m_LocalEulerAnglesHint.y 547 | value: 33.23 548 | objectReference: {fileID: 0} 549 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 550 | type: 3} 551 | propertyPath: m_LocalEulerAnglesHint.z 552 | value: 0 553 | objectReference: {fileID: 0} 554 | - target: {fileID: 1281073496485879189, guid: b4655f85f82c048f0aa9c59aee954efc, 555 | type: 3} 556 | propertyPath: m_Name 557 | value: ScenePartLarge (1) 558 | objectReference: {fileID: 0} 559 | m_RemovedComponents: [] 560 | m_SourcePrefab: {fileID: 100100000, guid: b4655f85f82c048f0aa9c59aee954efc, type: 3} 561 | --- !u!1001 &875637731 562 | PrefabInstance: 563 | m_ObjectHideFlags: 0 564 | serializedVersion: 2 565 | m_Modification: 566 | m_TransformParent: {fileID: 0} 567 | m_Modifications: 568 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 569 | type: 3} 570 | propertyPath: m_LocalPosition.x 571 | value: 23.2 572 | objectReference: {fileID: 0} 573 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 574 | type: 3} 575 | propertyPath: m_LocalPosition.y 576 | value: -2.9 577 | objectReference: {fileID: 0} 578 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 579 | type: 3} 580 | propertyPath: m_LocalPosition.z 581 | value: 34.3 582 | objectReference: {fileID: 0} 583 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 584 | type: 3} 585 | propertyPath: m_LocalRotation.x 586 | value: 0 587 | objectReference: {fileID: 0} 588 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 589 | type: 3} 590 | propertyPath: m_LocalRotation.y 591 | value: -0.39978915 592 | objectReference: {fileID: 0} 593 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 594 | type: 3} 595 | propertyPath: m_LocalRotation.z 596 | value: 0 597 | objectReference: {fileID: 0} 598 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 599 | type: 3} 600 | propertyPath: m_LocalRotation.w 601 | value: 0.91660714 602 | objectReference: {fileID: 0} 603 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 604 | type: 3} 605 | propertyPath: m_RootOrder 606 | value: 6 607 | objectReference: {fileID: 0} 608 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 609 | type: 3} 610 | propertyPath: m_LocalEulerAnglesHint.x 611 | value: 0 612 | objectReference: {fileID: 0} 613 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 614 | type: 3} 615 | propertyPath: m_LocalEulerAnglesHint.y 616 | value: -47.13 617 | objectReference: {fileID: 0} 618 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 619 | type: 3} 620 | propertyPath: m_LocalEulerAnglesHint.z 621 | value: 0 622 | objectReference: {fileID: 0} 623 | - target: {fileID: 1281073496485879189, guid: b4655f85f82c048f0aa9c59aee954efc, 624 | type: 3} 625 | propertyPath: m_Name 626 | value: ScenePartLarge (4) 627 | objectReference: {fileID: 0} 628 | m_RemovedComponents: [] 629 | m_SourcePrefab: {fileID: 100100000, guid: b4655f85f82c048f0aa9c59aee954efc, type: 3} 630 | --- !u!1 &963194225 631 | GameObject: 632 | m_ObjectHideFlags: 0 633 | m_CorrespondingSourceObject: {fileID: 0} 634 | m_PrefabInstance: {fileID: 0} 635 | m_PrefabAsset: {fileID: 0} 636 | serializedVersion: 6 637 | m_Component: 638 | - component: {fileID: 963194228} 639 | - component: {fileID: 963194227} 640 | - component: {fileID: 963194226} 641 | m_Layer: 0 642 | m_Name: Main Camera 643 | m_TagString: MainCamera 644 | m_Icon: {fileID: 0} 645 | m_NavMeshLayer: 0 646 | m_StaticEditorFlags: 0 647 | m_IsActive: 1 648 | --- !u!81 &963194226 649 | AudioListener: 650 | m_ObjectHideFlags: 0 651 | m_CorrespondingSourceObject: {fileID: 0} 652 | m_PrefabInstance: {fileID: 0} 653 | m_PrefabAsset: {fileID: 0} 654 | m_GameObject: {fileID: 963194225} 655 | m_Enabled: 1 656 | --- !u!20 &963194227 657 | Camera: 658 | m_ObjectHideFlags: 0 659 | m_CorrespondingSourceObject: {fileID: 0} 660 | m_PrefabInstance: {fileID: 0} 661 | m_PrefabAsset: {fileID: 0} 662 | m_GameObject: {fileID: 963194225} 663 | m_Enabled: 1 664 | serializedVersion: 2 665 | m_ClearFlags: 1 666 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 667 | m_projectionMatrixMode: 1 668 | m_GateFitMode: 2 669 | m_FOVAxisMode: 0 670 | m_SensorSize: {x: 36, y: 24} 671 | m_LensShift: {x: 0, y: 0} 672 | m_FocalLength: 50 673 | m_NormalizedViewPortRect: 674 | serializedVersion: 2 675 | x: 0 676 | y: 0 677 | width: 1 678 | height: 1 679 | near clip plane: 0.3 680 | far clip plane: 1000 681 | field of view: 60 682 | orthographic: 0 683 | orthographic size: 5 684 | m_Depth: -1 685 | m_CullingMask: 686 | serializedVersion: 2 687 | m_Bits: 4294967295 688 | m_RenderingPath: -1 689 | m_TargetTexture: {fileID: 0} 690 | m_TargetDisplay: 0 691 | m_TargetEye: 3 692 | m_HDR: 1 693 | m_AllowMSAA: 1 694 | m_AllowDynamicResolution: 0 695 | m_ForceIntoRT: 0 696 | m_OcclusionCulling: 1 697 | m_StereoConvergence: 10 698 | m_StereoSeparation: 0.022 699 | --- !u!4 &963194228 700 | Transform: 701 | m_ObjectHideFlags: 0 702 | m_CorrespondingSourceObject: {fileID: 0} 703 | m_PrefabInstance: {fileID: 0} 704 | m_PrefabAsset: {fileID: 0} 705 | m_GameObject: {fileID: 963194225} 706 | m_LocalRotation: {x: -0.28330377, y: -0.22542949, z: 0.068698496, w: -0.92962414} 707 | m_LocalPosition: {x: -10.5433445, y: 15.465582, z: -20.460855} 708 | m_LocalScale: {x: 1, y: 1, z: 1} 709 | m_Children: [] 710 | m_Father: {fileID: 0} 711 | m_RootOrder: 0 712 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 713 | --- !u!1001 &1689532183 714 | PrefabInstance: 715 | m_ObjectHideFlags: 0 716 | serializedVersion: 2 717 | m_Modification: 718 | m_TransformParent: {fileID: 0} 719 | m_Modifications: 720 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 721 | type: 3} 722 | propertyPath: m_LocalPosition.x 723 | value: -39.120155 724 | objectReference: {fileID: 0} 725 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 726 | type: 3} 727 | propertyPath: m_LocalPosition.y 728 | value: -2.9 729 | objectReference: {fileID: 0} 730 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 731 | type: 3} 732 | propertyPath: m_LocalPosition.z 733 | value: 69.62762 734 | objectReference: {fileID: 0} 735 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 736 | type: 3} 737 | propertyPath: m_LocalRotation.x 738 | value: -0 739 | objectReference: {fileID: 0} 740 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 741 | type: 3} 742 | propertyPath: m_LocalRotation.y 743 | value: 0.35671392 744 | objectReference: {fileID: 0} 745 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 746 | type: 3} 747 | propertyPath: m_LocalRotation.z 748 | value: -0 749 | objectReference: {fileID: 0} 750 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 751 | type: 3} 752 | propertyPath: m_LocalRotation.w 753 | value: 0.93421364 754 | objectReference: {fileID: 0} 755 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 756 | type: 3} 757 | propertyPath: m_RootOrder 758 | value: 5 759 | objectReference: {fileID: 0} 760 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 761 | type: 3} 762 | propertyPath: m_LocalEulerAnglesHint.x 763 | value: 0 764 | objectReference: {fileID: 0} 765 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 766 | type: 3} 767 | propertyPath: m_LocalEulerAnglesHint.y 768 | value: 41.797 769 | objectReference: {fileID: 0} 770 | - target: {fileID: 434610091992536192, guid: b4655f85f82c048f0aa9c59aee954efc, 771 | type: 3} 772 | propertyPath: m_LocalEulerAnglesHint.z 773 | value: 0 774 | objectReference: {fileID: 0} 775 | - target: {fileID: 1281073496485879189, guid: b4655f85f82c048f0aa9c59aee954efc, 776 | type: 3} 777 | propertyPath: m_Name 778 | value: ScenePartLarge (3) 779 | objectReference: {fileID: 0} 780 | m_RemovedComponents: [] 781 | m_SourcePrefab: {fileID: 100100000, guid: b4655f85f82c048f0aa9c59aee954efc, type: 3} 782 | -------------------------------------------------------------------------------- /Assets/CreateMeshFromAllSceneMeshes/LargeScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9fc0d4010bbf28b4594072e72b8655ab 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/CreateMeshFromAllSceneMeshes/MaterialForNewlyCreatedMesh.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: MaterialForNewlyCreatedMesh 11 | m_Shader: {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 0.8726415, g: 1, b: 0.9105338, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | m_BuildTextureStacks: [] 79 | -------------------------------------------------------------------------------- /Assets/CreateMeshFromAllSceneMeshes/MaterialForNewlyCreatedMesh.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c1bc17dfbc2cb46c08bc60a69aaf0784 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/CreateMeshFromAllSceneMeshes/ScenePartLarge.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b4655f85f82c048f0aa9c59aee954efc 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/CreateMeshFromAllSceneMeshes/ScenePartLarger.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &215324549729179214 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 382659609207818206} 12 | m_Layer: 0 13 | m_Name: ScenePartLarger 14 | m_TagString: Untagged 15 | m_Icon: {fileID: 0} 16 | m_NavMeshLayer: 0 17 | m_StaticEditorFlags: 0 18 | m_IsActive: 1 19 | --- !u!4 &382659609207818206 20 | Transform: 21 | m_ObjectHideFlags: 0 22 | m_CorrespondingSourceObject: {fileID: 0} 23 | m_PrefabInstance: {fileID: 0} 24 | m_PrefabAsset: {fileID: 0} 25 | m_GameObject: {fileID: 215324549729179214} 26 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 27 | m_LocalPosition: {x: 0, y: 0, z: 0} 28 | m_LocalScale: {x: 1, y: 1, z: 1} 29 | m_Children: 30 | - {fileID: 8068852432247081056} 31 | - {fileID: 8068852431407453008} 32 | - {fileID: 8068852431092636191} 33 | - {fileID: 8068852431484087315} 34 | - {fileID: 8068852431154422465} 35 | - {fileID: 8068852432016127814} 36 | - {fileID: 8068852432294711815} 37 | - {fileID: 8068852432433067030} 38 | - {fileID: 8068852430834288381} 39 | m_Father: {fileID: 0} 40 | m_RootOrder: 0 41 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 42 | --- !u!1001 &4026705945365851752 43 | PrefabInstance: 44 | m_ObjectHideFlags: 0 45 | serializedVersion: 2 46 | m_Modification: 47 | m_TransformParent: {fileID: 382659609207818206} 48 | m_Modifications: 49 | - target: {fileID: 6348924493080806004, guid: 873211eca014447f5aa2a33bfaca5392, 50 | type: 3} 51 | propertyPath: m_Name 52 | value: ScenePartSmall (3) 53 | objectReference: {fileID: 0} 54 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 55 | type: 3} 56 | propertyPath: m_LocalPosition.x 57 | value: 5.64248 58 | objectReference: {fileID: 0} 59 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 60 | type: 3} 61 | propertyPath: m_LocalPosition.y 62 | value: -0.01999998 63 | objectReference: {fileID: 0} 64 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 65 | type: 3} 66 | propertyPath: m_LocalPosition.z 67 | value: -3.4185917 68 | objectReference: {fileID: 0} 69 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 70 | type: 3} 71 | propertyPath: m_LocalRotation.x 72 | value: -0 73 | objectReference: {fileID: 0} 74 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 75 | type: 3} 76 | propertyPath: m_LocalRotation.y 77 | value: -0.2774467 78 | objectReference: {fileID: 0} 79 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 80 | type: 3} 81 | propertyPath: m_LocalRotation.z 82 | value: -0 83 | objectReference: {fileID: 0} 84 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 85 | type: 3} 86 | propertyPath: m_LocalRotation.w 87 | value: 0.96074104 88 | objectReference: {fileID: 0} 89 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 90 | type: 3} 91 | propertyPath: m_RootOrder 92 | value: 3 93 | objectReference: {fileID: 0} 94 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 95 | type: 3} 96 | propertyPath: m_LocalEulerAnglesHint.x 97 | value: 0 98 | objectReference: {fileID: 0} 99 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 100 | type: 3} 101 | propertyPath: m_LocalEulerAnglesHint.y 102 | value: -32.216003 103 | objectReference: {fileID: 0} 104 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 105 | type: 3} 106 | propertyPath: m_LocalEulerAnglesHint.z 107 | value: 0 108 | objectReference: {fileID: 0} 109 | m_RemovedComponents: [] 110 | m_SourcePrefab: {fileID: 100100000, guid: 873211eca014447f5aa2a33bfaca5392, type: 3} 111 | --- !u!4 &8068852431484087315 stripped 112 | Transform: 113 | m_CorrespondingSourceObject: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 114 | type: 3} 115 | m_PrefabInstance: {fileID: 4026705945365851752} 116 | m_PrefabAsset: {fileID: 0} 117 | --- !u!1001 &4026705945572495659 118 | PrefabInstance: 119 | m_ObjectHideFlags: 0 120 | serializedVersion: 2 121 | m_Modification: 122 | m_TransformParent: {fileID: 382659609207818206} 123 | m_Modifications: 124 | - target: {fileID: 6348924493080806004, guid: 873211eca014447f5aa2a33bfaca5392, 125 | type: 3} 126 | propertyPath: m_Name 127 | value: ScenePartSmall (1) 128 | objectReference: {fileID: 0} 129 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 130 | type: 3} 131 | propertyPath: m_LocalPosition.x 132 | value: 3.93 133 | objectReference: {fileID: 0} 134 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 135 | type: 3} 136 | propertyPath: m_LocalPosition.y 137 | value: 1.17 138 | objectReference: {fileID: 0} 139 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 140 | type: 3} 141 | propertyPath: m_LocalPosition.z 142 | value: 5.6 143 | objectReference: {fileID: 0} 144 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 145 | type: 3} 146 | propertyPath: m_LocalRotation.x 147 | value: -0 148 | objectReference: {fileID: 0} 149 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 150 | type: 3} 151 | propertyPath: m_LocalRotation.y 152 | value: -0 153 | objectReference: {fileID: 0} 154 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 155 | type: 3} 156 | propertyPath: m_LocalRotation.z 157 | value: -0 158 | objectReference: {fileID: 0} 159 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 160 | type: 3} 161 | propertyPath: m_LocalRotation.w 162 | value: 1 163 | objectReference: {fileID: 0} 164 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 165 | type: 3} 166 | propertyPath: m_RootOrder 167 | value: 1 168 | objectReference: {fileID: 0} 169 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 170 | type: 3} 171 | propertyPath: m_LocalEulerAnglesHint.x 172 | value: 0 173 | objectReference: {fileID: 0} 174 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 175 | type: 3} 176 | propertyPath: m_LocalEulerAnglesHint.y 177 | value: 0 178 | objectReference: {fileID: 0} 179 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 180 | type: 3} 181 | propertyPath: m_LocalEulerAnglesHint.z 182 | value: 0 183 | objectReference: {fileID: 0} 184 | m_RemovedComponents: [] 185 | m_SourcePrefab: {fileID: 100100000, guid: 873211eca014447f5aa2a33bfaca5392, type: 3} 186 | --- !u!4 &8068852431407453008 stripped 187 | Transform: 188 | m_CorrespondingSourceObject: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 189 | type: 3} 190 | m_PrefabInstance: {fileID: 4026705945572495659} 191 | m_PrefabAsset: {fileID: 0} 192 | --- !u!1001 &4026705945690792122 193 | PrefabInstance: 194 | m_ObjectHideFlags: 0 195 | serializedVersion: 2 196 | m_Modification: 197 | m_TransformParent: {fileID: 382659609207818206} 198 | m_Modifications: 199 | - target: {fileID: 6348924493080806004, guid: 873211eca014447f5aa2a33bfaca5392, 200 | type: 3} 201 | propertyPath: m_Name 202 | value: ScenePartSmall (4) 203 | objectReference: {fileID: 0} 204 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 205 | type: 3} 206 | propertyPath: m_LocalPosition.x 207 | value: 4.8188615 208 | objectReference: {fileID: 0} 209 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 210 | type: 3} 211 | propertyPath: m_LocalPosition.y 212 | value: -0.72 213 | objectReference: {fileID: 0} 214 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 215 | type: 3} 216 | propertyPath: m_LocalPosition.z 217 | value: 5.73439 218 | objectReference: {fileID: 0} 219 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 220 | type: 3} 221 | propertyPath: m_LocalRotation.x 222 | value: -0 223 | objectReference: {fileID: 0} 224 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 225 | type: 3} 226 | propertyPath: m_LocalRotation.y 227 | value: 0.52433765 228 | objectReference: {fileID: 0} 229 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 230 | type: 3} 231 | propertyPath: m_LocalRotation.z 232 | value: -0 233 | objectReference: {fileID: 0} 234 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 235 | type: 3} 236 | propertyPath: m_LocalRotation.w 237 | value: 0.8515104 238 | objectReference: {fileID: 0} 239 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 240 | type: 3} 241 | propertyPath: m_RootOrder 242 | value: 4 243 | objectReference: {fileID: 0} 244 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 245 | type: 3} 246 | propertyPath: m_LocalEulerAnglesHint.x 247 | value: 0 248 | objectReference: {fileID: 0} 249 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 250 | type: 3} 251 | propertyPath: m_LocalEulerAnglesHint.y 252 | value: 63.247 253 | objectReference: {fileID: 0} 254 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 255 | type: 3} 256 | propertyPath: m_LocalEulerAnglesHint.z 257 | value: 0 258 | objectReference: {fileID: 0} 259 | m_RemovedComponents: [] 260 | m_SourcePrefab: {fileID: 100100000, guid: 873211eca014447f5aa2a33bfaca5392, type: 3} 261 | --- !u!4 &8068852431154422465 stripped 262 | Transform: 263 | m_CorrespondingSourceObject: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 264 | type: 3} 265 | m_PrefabInstance: {fileID: 4026705945690792122} 266 | m_PrefabAsset: {fileID: 0} 267 | --- !u!1001 &4026705945886791780 268 | PrefabInstance: 269 | m_ObjectHideFlags: 0 270 | serializedVersion: 2 271 | m_Modification: 272 | m_TransformParent: {fileID: 382659609207818206} 273 | m_Modifications: 274 | - target: {fileID: 6348924493080806004, guid: 873211eca014447f5aa2a33bfaca5392, 275 | type: 3} 276 | propertyPath: m_Name 277 | value: ScenePartSmall (2) 278 | objectReference: {fileID: 0} 279 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 280 | type: 3} 281 | propertyPath: m_LocalPosition.x 282 | value: -3.8967304 283 | objectReference: {fileID: 0} 284 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 285 | type: 3} 286 | propertyPath: m_LocalPosition.y 287 | value: 0.52 288 | objectReference: {fileID: 0} 289 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 290 | type: 3} 291 | propertyPath: m_LocalPosition.z 292 | value: 6.9897313 293 | objectReference: {fileID: 0} 294 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 295 | type: 3} 296 | propertyPath: m_LocalRotation.x 297 | value: -0 298 | objectReference: {fileID: 0} 299 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 300 | type: 3} 301 | propertyPath: m_LocalRotation.y 302 | value: 0.318528 303 | objectReference: {fileID: 0} 304 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 305 | type: 3} 306 | propertyPath: m_LocalRotation.z 307 | value: -0 308 | objectReference: {fileID: 0} 309 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 310 | type: 3} 311 | propertyPath: m_LocalRotation.w 312 | value: 0.94791347 313 | objectReference: {fileID: 0} 314 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 315 | type: 3} 316 | propertyPath: m_RootOrder 317 | value: 2 318 | objectReference: {fileID: 0} 319 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 320 | type: 3} 321 | propertyPath: m_LocalEulerAnglesHint.x 322 | value: 0 323 | objectReference: {fileID: 0} 324 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 325 | type: 3} 326 | propertyPath: m_LocalEulerAnglesHint.y 327 | value: 37.148003 328 | objectReference: {fileID: 0} 329 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 330 | type: 3} 331 | propertyPath: m_LocalEulerAnglesHint.z 332 | value: 0 333 | objectReference: {fileID: 0} 334 | m_RemovedComponents: [] 335 | m_SourcePrefab: {fileID: 100100000, guid: 873211eca014447f5aa2a33bfaca5392, type: 3} 336 | --- !u!4 &8068852431092636191 stripped 337 | Transform: 338 | m_CorrespondingSourceObject: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 339 | type: 3} 340 | m_PrefabInstance: {fileID: 4026705945886791780} 341 | m_PrefabAsset: {fileID: 0} 342 | --- !u!1001 &4026705946149848198 343 | PrefabInstance: 344 | m_ObjectHideFlags: 0 345 | serializedVersion: 2 346 | m_Modification: 347 | m_TransformParent: {fileID: 382659609207818206} 348 | m_Modifications: 349 | - target: {fileID: 6348924493080806004, guid: 873211eca014447f5aa2a33bfaca5392, 350 | type: 3} 351 | propertyPath: m_Name 352 | value: ScenePartSmall (8) 353 | objectReference: {fileID: 0} 354 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 355 | type: 3} 356 | propertyPath: m_LocalPosition.x 357 | value: 2.86 358 | objectReference: {fileID: 0} 359 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 360 | type: 3} 361 | propertyPath: m_LocalPosition.y 362 | value: 5.2716 363 | objectReference: {fileID: 0} 364 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 365 | type: 3} 366 | propertyPath: m_LocalPosition.z 367 | value: 3.23 368 | objectReference: {fileID: 0} 369 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 370 | type: 3} 371 | propertyPath: m_LocalRotation.x 372 | value: -0 373 | objectReference: {fileID: 0} 374 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 375 | type: 3} 376 | propertyPath: m_LocalRotation.y 377 | value: 0.17329372 378 | objectReference: {fileID: 0} 379 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 380 | type: 3} 381 | propertyPath: m_LocalRotation.z 382 | value: -0 383 | objectReference: {fileID: 0} 384 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 385 | type: 3} 386 | propertyPath: m_LocalRotation.w 387 | value: 0.98487025 388 | objectReference: {fileID: 0} 389 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 390 | type: 3} 391 | propertyPath: m_RootOrder 392 | value: 8 393 | objectReference: {fileID: 0} 394 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 395 | type: 3} 396 | propertyPath: m_LocalEulerAnglesHint.x 397 | value: 0 398 | objectReference: {fileID: 0} 399 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 400 | type: 3} 401 | propertyPath: m_LocalEulerAnglesHint.y 402 | value: 19.959002 403 | objectReference: {fileID: 0} 404 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 405 | type: 3} 406 | propertyPath: m_LocalEulerAnglesHint.z 407 | value: 0 408 | objectReference: {fileID: 0} 409 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 410 | type: 3} 411 | propertyPath: m_LocalScale.x 412 | value: 0.4514606 413 | objectReference: {fileID: 0} 414 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 415 | type: 3} 416 | propertyPath: m_LocalScale.y 417 | value: 0.4514606 418 | objectReference: {fileID: 0} 419 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 420 | type: 3} 421 | propertyPath: m_LocalScale.z 422 | value: 0.4514606 423 | objectReference: {fileID: 0} 424 | m_RemovedComponents: [] 425 | m_SourcePrefab: {fileID: 100100000, guid: 873211eca014447f5aa2a33bfaca5392, type: 3} 426 | --- !u!4 &8068852430834288381 stripped 427 | Transform: 428 | m_CorrespondingSourceObject: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 429 | type: 3} 430 | m_PrefabInstance: {fileID: 4026705946149848198} 431 | m_PrefabAsset: {fileID: 0} 432 | --- !u!1001 &4026705946698053229 433 | PrefabInstance: 434 | m_ObjectHideFlags: 0 435 | serializedVersion: 2 436 | m_Modification: 437 | m_TransformParent: {fileID: 382659609207818206} 438 | m_Modifications: 439 | - target: {fileID: 6348924493080806004, guid: 873211eca014447f5aa2a33bfaca5392, 440 | type: 3} 441 | propertyPath: m_Name 442 | value: ScenePartSmall (7) 443 | objectReference: {fileID: 0} 444 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 445 | type: 3} 446 | propertyPath: m_LocalPosition.x 447 | value: 2.86 448 | objectReference: {fileID: 0} 449 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 450 | type: 3} 451 | propertyPath: m_LocalPosition.y 452 | value: 3.4535 453 | objectReference: {fileID: 0} 454 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 455 | type: 3} 456 | propertyPath: m_LocalPosition.z 457 | value: 3.23 458 | objectReference: {fileID: 0} 459 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 460 | type: 3} 461 | propertyPath: m_LocalRotation.x 462 | value: -0 463 | objectReference: {fileID: 0} 464 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 465 | type: 3} 466 | propertyPath: m_LocalRotation.y 467 | value: -0.03871691 468 | objectReference: {fileID: 0} 469 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 470 | type: 3} 471 | propertyPath: m_LocalRotation.z 472 | value: -0 473 | objectReference: {fileID: 0} 474 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 475 | type: 3} 476 | propertyPath: m_LocalRotation.w 477 | value: 0.9992503 478 | objectReference: {fileID: 0} 479 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 480 | type: 3} 481 | propertyPath: m_RootOrder 482 | value: 7 483 | objectReference: {fileID: 0} 484 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 485 | type: 3} 486 | propertyPath: m_LocalEulerAnglesHint.x 487 | value: 0 488 | objectReference: {fileID: 0} 489 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 490 | type: 3} 491 | propertyPath: m_LocalEulerAnglesHint.y 492 | value: -4.438 493 | objectReference: {fileID: 0} 494 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 495 | type: 3} 496 | propertyPath: m_LocalEulerAnglesHint.z 497 | value: 0 498 | objectReference: {fileID: 0} 499 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 500 | type: 3} 501 | propertyPath: m_LocalScale.x 502 | value: 0.7099999 503 | objectReference: {fileID: 0} 504 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 505 | type: 3} 506 | propertyPath: m_LocalScale.y 507 | value: 0.71 508 | objectReference: {fileID: 0} 509 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 510 | type: 3} 511 | propertyPath: m_LocalScale.z 512 | value: 0.7099999 513 | objectReference: {fileID: 0} 514 | m_RemovedComponents: [] 515 | m_SourcePrefab: {fileID: 100100000, guid: 873211eca014447f5aa2a33bfaca5392, type: 3} 516 | --- !u!4 &8068852432433067030 stripped 517 | Transform: 518 | m_CorrespondingSourceObject: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 519 | type: 3} 520 | m_PrefabInstance: {fileID: 4026705946698053229} 521 | m_PrefabAsset: {fileID: 0} 522 | --- !u!1001 &4026705946702172284 523 | PrefabInstance: 524 | m_ObjectHideFlags: 0 525 | serializedVersion: 2 526 | m_Modification: 527 | m_TransformParent: {fileID: 382659609207818206} 528 | m_Modifications: 529 | - target: {fileID: 6348924493080806004, guid: 873211eca014447f5aa2a33bfaca5392, 530 | type: 3} 531 | propertyPath: m_Name 532 | value: ScenePartSmall (6) 533 | objectReference: {fileID: 0} 534 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 535 | type: 3} 536 | propertyPath: m_LocalPosition.x 537 | value: 3.9318833 538 | objectReference: {fileID: 0} 539 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 540 | type: 3} 541 | propertyPath: m_LocalPosition.y 542 | value: -3.39 543 | objectReference: {fileID: 0} 544 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 545 | type: 3} 546 | propertyPath: m_LocalPosition.z 547 | value: 5.60756 548 | objectReference: {fileID: 0} 549 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 550 | type: 3} 551 | propertyPath: m_LocalRotation.x 552 | value: -0 553 | objectReference: {fileID: 0} 554 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 555 | type: 3} 556 | propertyPath: m_LocalRotation.y 557 | value: 0.24171704 558 | objectReference: {fileID: 0} 559 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 560 | type: 3} 561 | propertyPath: m_LocalRotation.z 562 | value: -0 563 | objectReference: {fileID: 0} 564 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 565 | type: 3} 566 | propertyPath: m_LocalRotation.w 567 | value: 0.9703468 568 | objectReference: {fileID: 0} 569 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 570 | type: 3} 571 | propertyPath: m_RootOrder 572 | value: 6 573 | objectReference: {fileID: 0} 574 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 575 | type: 3} 576 | propertyPath: m_LocalEulerAnglesHint.x 577 | value: 0 578 | objectReference: {fileID: 0} 579 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 580 | type: 3} 581 | propertyPath: m_LocalEulerAnglesHint.y 582 | value: 27.976002 583 | objectReference: {fileID: 0} 584 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 585 | type: 3} 586 | propertyPath: m_LocalEulerAnglesHint.z 587 | value: 0 588 | objectReference: {fileID: 0} 589 | m_RemovedComponents: [] 590 | m_SourcePrefab: {fileID: 100100000, guid: 873211eca014447f5aa2a33bfaca5392, type: 3} 591 | --- !u!4 &8068852432294711815 stripped 592 | Transform: 593 | m_CorrespondingSourceObject: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 594 | type: 3} 595 | m_PrefabInstance: {fileID: 4026705946702172284} 596 | m_PrefabAsset: {fileID: 0} 597 | --- !u!1001 &4026705946749798939 598 | PrefabInstance: 599 | m_ObjectHideFlags: 0 600 | serializedVersion: 2 601 | m_Modification: 602 | m_TransformParent: {fileID: 382659609207818206} 603 | m_Modifications: 604 | - target: {fileID: 6348924493080806004, guid: 873211eca014447f5aa2a33bfaca5392, 605 | type: 3} 606 | propertyPath: m_Name 607 | value: ScenePartSmall 608 | objectReference: {fileID: 0} 609 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 610 | type: 3} 611 | propertyPath: m_LocalPosition.x 612 | value: 0.26842552 613 | objectReference: {fileID: 0} 614 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 615 | type: 3} 616 | propertyPath: m_LocalPosition.y 617 | value: 1.4122219 618 | objectReference: {fileID: 0} 619 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 620 | type: 3} 621 | propertyPath: m_LocalPosition.z 622 | value: -0.9835338 623 | objectReference: {fileID: 0} 624 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 625 | type: 3} 626 | propertyPath: m_LocalRotation.x 627 | value: -0 628 | objectReference: {fileID: 0} 629 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 630 | type: 3} 631 | propertyPath: m_LocalRotation.y 632 | value: 0.22414471 633 | objectReference: {fileID: 0} 634 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 635 | type: 3} 636 | propertyPath: m_LocalRotation.z 637 | value: -0 638 | objectReference: {fileID: 0} 639 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 640 | type: 3} 641 | propertyPath: m_LocalRotation.w 642 | value: 0.97455585 643 | objectReference: {fileID: 0} 644 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 645 | type: 3} 646 | propertyPath: m_RootOrder 647 | value: 0 648 | objectReference: {fileID: 0} 649 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 650 | type: 3} 651 | propertyPath: m_LocalEulerAnglesHint.x 652 | value: 0 653 | objectReference: {fileID: 0} 654 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 655 | type: 3} 656 | propertyPath: m_LocalEulerAnglesHint.y 657 | value: 25.905 658 | objectReference: {fileID: 0} 659 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 660 | type: 3} 661 | propertyPath: m_LocalEulerAnglesHint.z 662 | value: 0 663 | objectReference: {fileID: 0} 664 | m_RemovedComponents: [] 665 | m_SourcePrefab: {fileID: 100100000, guid: 873211eca014447f5aa2a33bfaca5392, type: 3} 666 | --- !u!4 &8068852432247081056 stripped 667 | Transform: 668 | m_CorrespondingSourceObject: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 669 | type: 3} 670 | m_PrefabInstance: {fileID: 4026705946749798939} 671 | m_PrefabAsset: {fileID: 0} 672 | --- !u!1001 &4026705946977105213 673 | PrefabInstance: 674 | m_ObjectHideFlags: 0 675 | serializedVersion: 2 676 | m_Modification: 677 | m_TransformParent: {fileID: 382659609207818206} 678 | m_Modifications: 679 | - target: {fileID: 6348924493080806004, guid: 873211eca014447f5aa2a33bfaca5392, 680 | type: 3} 681 | propertyPath: m_Name 682 | value: ScenePartSmall (5) 683 | objectReference: {fileID: 0} 684 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 685 | type: 3} 686 | propertyPath: m_LocalPosition.x 687 | value: 0.5329162 688 | objectReference: {fileID: 0} 689 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 690 | type: 3} 691 | propertyPath: m_LocalPosition.y 692 | value: -1.98 693 | objectReference: {fileID: 0} 694 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 695 | type: 3} 696 | propertyPath: m_LocalPosition.z 697 | value: 9.019247 698 | objectReference: {fileID: 0} 699 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 700 | type: 3} 701 | propertyPath: m_LocalRotation.x 702 | value: -0 703 | objectReference: {fileID: 0} 704 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 705 | type: 3} 706 | propertyPath: m_LocalRotation.y 707 | value: 0.30074087 708 | objectReference: {fileID: 0} 709 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 710 | type: 3} 711 | propertyPath: m_LocalRotation.z 712 | value: -0 713 | objectReference: {fileID: 0} 714 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 715 | type: 3} 716 | propertyPath: m_LocalRotation.w 717 | value: 0.95370597 718 | objectReference: {fileID: 0} 719 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 720 | type: 3} 721 | propertyPath: m_RootOrder 722 | value: 5 723 | objectReference: {fileID: 0} 724 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 725 | type: 3} 726 | propertyPath: m_LocalEulerAnglesHint.x 727 | value: 0 728 | objectReference: {fileID: 0} 729 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 730 | type: 3} 731 | propertyPath: m_LocalEulerAnglesHint.y 732 | value: 35.004 733 | objectReference: {fileID: 0} 734 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 735 | type: 3} 736 | propertyPath: m_LocalEulerAnglesHint.z 737 | value: 0 738 | objectReference: {fileID: 0} 739 | m_RemovedComponents: [] 740 | m_SourcePrefab: {fileID: 100100000, guid: 873211eca014447f5aa2a33bfaca5392, type: 3} 741 | --- !u!4 &8068852432016127814 stripped 742 | Transform: 743 | m_CorrespondingSourceObject: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 744 | type: 3} 745 | m_PrefabInstance: {fileID: 4026705946977105213} 746 | m_PrefabAsset: {fileID: 0} 747 | -------------------------------------------------------------------------------- /Assets/CreateMeshFromAllSceneMeshes/ScenePartLarger.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0f8a5bb34b95e4d9db2400af7a98d4ce 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/CreateMeshFromAllSceneMeshes/ScenePartSmall.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 873211eca014447f5aa2a33bfaca5392 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/CreateMeshFromAllSceneMeshes/SmallScene.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: 705507994} 41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 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: 40 60 | m_AtlasSize: 1024 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: 500 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 500 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_LightingSettings: {fileID: 0} 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 &705507993 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: 705507995} 133 | - component: {fileID: 705507994} 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 &705507994 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: 705507993} 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 &705507995 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: 705507993} 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: 2 215 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 216 | --- !u!1 &963194225 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: 963194228} 225 | - component: {fileID: 963194227} 226 | - component: {fileID: 963194226} 227 | m_Layer: 0 228 | m_Name: Main Camera 229 | m_TagString: MainCamera 230 | m_Icon: {fileID: 0} 231 | m_NavMeshLayer: 0 232 | m_StaticEditorFlags: 0 233 | m_IsActive: 1 234 | --- !u!81 &963194226 235 | AudioListener: 236 | m_ObjectHideFlags: 0 237 | m_CorrespondingSourceObject: {fileID: 0} 238 | m_PrefabInstance: {fileID: 0} 239 | m_PrefabAsset: {fileID: 0} 240 | m_GameObject: {fileID: 963194225} 241 | m_Enabled: 1 242 | --- !u!20 &963194227 243 | Camera: 244 | m_ObjectHideFlags: 0 245 | m_CorrespondingSourceObject: {fileID: 0} 246 | m_PrefabInstance: {fileID: 0} 247 | m_PrefabAsset: {fileID: 0} 248 | m_GameObject: {fileID: 963194225} 249 | m_Enabled: 1 250 | serializedVersion: 2 251 | m_ClearFlags: 1 252 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 253 | m_projectionMatrixMode: 1 254 | m_GateFitMode: 2 255 | m_FOVAxisMode: 0 256 | m_SensorSize: {x: 36, y: 24} 257 | m_LensShift: {x: 0, y: 0} 258 | m_FocalLength: 50 259 | m_NormalizedViewPortRect: 260 | serializedVersion: 2 261 | x: 0 262 | y: 0 263 | width: 1 264 | height: 1 265 | near clip plane: 0.3 266 | far clip plane: 1000 267 | field of view: 60 268 | orthographic: 0 269 | orthographic size: 5 270 | m_Depth: -1 271 | m_CullingMask: 272 | serializedVersion: 2 273 | m_Bits: 4294967295 274 | m_RenderingPath: -1 275 | m_TargetTexture: {fileID: 0} 276 | m_TargetDisplay: 0 277 | m_TargetEye: 3 278 | m_HDR: 1 279 | m_AllowMSAA: 1 280 | m_AllowDynamicResolution: 0 281 | m_ForceIntoRT: 0 282 | m_OcclusionCulling: 1 283 | m_StereoConvergence: 10 284 | m_StereoSeparation: 0.022 285 | --- !u!4 &963194228 286 | Transform: 287 | m_ObjectHideFlags: 0 288 | m_CorrespondingSourceObject: {fileID: 0} 289 | m_PrefabInstance: {fileID: 0} 290 | m_PrefabAsset: {fileID: 0} 291 | m_GameObject: {fileID: 963194225} 292 | m_LocalRotation: {x: -0.28330377, y: -0.22542949, z: 0.068698496, w: -0.92962414} 293 | m_LocalPosition: {x: -10.5433445, y: 15.465582, z: -20.460855} 294 | m_LocalScale: {x: 1, y: 1, z: 1} 295 | m_Children: [] 296 | m_Father: {fileID: 0} 297 | m_RootOrder: 0 298 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 299 | --- !u!1001 &1670750963 300 | PrefabInstance: 301 | m_ObjectHideFlags: 0 302 | serializedVersion: 2 303 | m_Modification: 304 | m_TransformParent: {fileID: 0} 305 | m_Modifications: 306 | - target: {fileID: 6348924493080806004, guid: 873211eca014447f5aa2a33bfaca5392, 307 | type: 3} 308 | propertyPath: m_Name 309 | value: ScenePartSmall 310 | objectReference: {fileID: 0} 311 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 312 | type: 3} 313 | propertyPath: m_LocalPosition.x 314 | value: 0 315 | objectReference: {fileID: 0} 316 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 317 | type: 3} 318 | propertyPath: m_LocalPosition.y 319 | value: 0 320 | objectReference: {fileID: 0} 321 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 322 | type: 3} 323 | propertyPath: m_LocalPosition.z 324 | value: 0 325 | objectReference: {fileID: 0} 326 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 327 | type: 3} 328 | propertyPath: m_LocalRotation.x 329 | value: 0 330 | objectReference: {fileID: 0} 331 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 332 | type: 3} 333 | propertyPath: m_LocalRotation.y 334 | value: 0 335 | objectReference: {fileID: 0} 336 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 337 | type: 3} 338 | propertyPath: m_LocalRotation.z 339 | value: 0 340 | objectReference: {fileID: 0} 341 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 342 | type: 3} 343 | propertyPath: m_LocalRotation.w 344 | value: 1 345 | objectReference: {fileID: 0} 346 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 347 | type: 3} 348 | propertyPath: m_RootOrder 349 | value: 1 350 | objectReference: {fileID: 0} 351 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 352 | type: 3} 353 | propertyPath: m_LocalEulerAnglesHint.x 354 | value: 0 355 | objectReference: {fileID: 0} 356 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 357 | type: 3} 358 | propertyPath: m_LocalEulerAnglesHint.y 359 | value: 0 360 | objectReference: {fileID: 0} 361 | - target: {fileID: 6348924493080806011, guid: 873211eca014447f5aa2a33bfaca5392, 362 | type: 3} 363 | propertyPath: m_LocalEulerAnglesHint.z 364 | value: 0 365 | objectReference: {fileID: 0} 366 | m_RemovedComponents: [] 367 | m_SourcePrefab: {fileID: 100100000, guid: 873211eca014447f5aa2a33bfaca5392, type: 3} 368 | -------------------------------------------------------------------------------- /Assets/CreateMeshFromAllSceneMeshes/SmallScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8ce024d6ab95a4d8e8702b52f0fe43d2 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/NoiseBall.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b97532ce9901144ad99ca4fe67458a4c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/NoiseBall/NoiseBall.cs: -------------------------------------------------------------------------------- 1 | // Adapted from Keijiro's NoiseBall2 project from 2017 2 | // https://github.com/keijiro/NoiseBall2 3 | 4 | using Unity.Burst; 5 | using Unity.Collections; 6 | using Unity.Jobs; 7 | using Unity.Mathematics; 8 | using static Unity.Mathematics.math; 9 | using UnityEngine; 10 | using UnityEngine.Rendering; 11 | 12 | [RequireComponent(typeof(MeshFilter))] 13 | [RequireComponent(typeof(MeshRenderer))] 14 | public class NoiseBall : MonoBehaviour 15 | { 16 | public enum Mode 17 | { 18 | CPU, 19 | CPUBurst, 20 | CPUBurstThreaded, 21 | #if UNITY_2021_2_OR_NEWER // Mesh GPU buffer access is since 2021.2 22 | GPU 23 | #endif 24 | } 25 | 26 | public Mode m_Mode = Mode.CPUBurstThreaded; 27 | public int m_TriangleCount = 100000; 28 | public float m_TriangleExtent = 0.1f; 29 | public float m_ShuffleSpeed = 4.0f; 30 | public float m_NoiseAmplitude = 1.0f; 31 | public float m_NoiseFrequency = 1.0f; 32 | public Vector3 m_NoiseMotion = Vector3.up; 33 | 34 | public ComputeShader m_ComputeShader; 35 | 36 | Mesh m_Mesh; 37 | NativeArray m_VertexPos; 38 | NativeArray m_VertexNor; 39 | Vector3 m_NoiseOffset; 40 | #if UNITY_2021_2_OR_NEWER // Mesh GPU buffer access is since 2021.2 41 | GraphicsBuffer m_BufferPos; 42 | GraphicsBuffer m_BufferNor; 43 | #endif 44 | 45 | GUIContent[] m_UIOptions; 46 | 47 | const int kThreadCount = 64; 48 | 49 | public void OnValidate() 50 | { 51 | m_TriangleCount = Mathf.Max(0, m_TriangleCount); 52 | m_TriangleExtent = Mathf.Max(0, m_TriangleExtent); 53 | m_NoiseFrequency = Mathf.Max(0, m_NoiseFrequency); 54 | } 55 | 56 | public void OnDestroy() 57 | { 58 | CleanupResources(); 59 | } 60 | 61 | void CleanupResources() 62 | { 63 | DestroyImmediate(m_Mesh); 64 | m_Mesh = null; 65 | if (m_VertexPos.IsCreated) m_VertexPos.Dispose(); 66 | if (m_VertexNor.IsCreated) m_VertexNor.Dispose(); 67 | CleanupGpuResources(); 68 | } 69 | 70 | void CleanupGpuResources() 71 | { 72 | #if UNITY_2021_2_OR_NEWER // Mesh GPU buffer access is since 2021.2 73 | m_BufferPos?.Dispose(); 74 | m_BufferPos = null; 75 | m_BufferNor?.Dispose(); 76 | m_BufferNor = null; 77 | #endif 78 | } 79 | 80 | public void Update() 81 | { 82 | if (m_Mesh && m_Mesh.vertexCount != m_TriangleCount * 3) 83 | { 84 | CleanupResources(); 85 | } 86 | 87 | if (m_Mesh == null) 88 | { 89 | m_Mesh = new Mesh(); 90 | m_Mesh.name = "NoiseBallMesh"; 91 | #if UNITY_2021_2_OR_NEWER // Mesh GPU buffer access is since 2021.2 92 | m_Mesh.vertexBufferTarget |= GraphicsBuffer.Target.Raw; 93 | #endif 94 | 95 | m_Mesh.SetVertexBufferParams(m_TriangleCount * 3, new VertexAttributeDescriptor(VertexAttribute.Position, stream:0), new VertexAttributeDescriptor(VertexAttribute.Normal, stream:1)); 96 | m_VertexPos = new NativeArray(m_TriangleCount * 3, Allocator.Persistent); 97 | m_VertexNor = new NativeArray(m_TriangleCount * 3, Allocator.Persistent); 98 | 99 | m_Mesh.SetIndexBufferParams(m_TriangleCount * 3, IndexFormat.UInt32); 100 | var ib = new NativeArray(m_TriangleCount * 3, Allocator.Temp); 101 | for (var i = 0; i < m_TriangleCount * 3; ++i) 102 | ib[i] = i; 103 | m_Mesh.SetIndexBufferData(ib, 0, 0, ib.Length, MeshUpdateFlags.DontRecalculateBounds | MeshUpdateFlags.DontValidateIndices); 104 | ib.Dispose(); 105 | var submesh = new SubMeshDescriptor(0, m_TriangleCount * 3, MeshTopology.Triangles); 106 | submesh.bounds = new Bounds(Vector3.zero, new Vector3(10, 10, 10)); 107 | m_Mesh.SetSubMesh(0, submesh); 108 | m_Mesh.bounds = submesh.bounds; 109 | GetComponent().sharedMesh = m_Mesh; 110 | } 111 | 112 | UpdateMesh(Time.time); 113 | 114 | // move the noise field 115 | m_NoiseOffset += m_NoiseMotion * Time.deltaTime; 116 | } 117 | 118 | [BurstCompile] 119 | struct NoiseMeshJob : IJobParallelFor 120 | { 121 | [NativeDisableParallelForRestriction] public NativeArray vertices; 122 | [NativeDisableParallelForRestriction] public NativeArray normals; 123 | public float pTime; 124 | public float pExtent; 125 | public float pNoiseFrequency; 126 | public float pNoiseAmplitude; 127 | public float3 pNoiseOffset; 128 | 129 | public void Execute(int id) 130 | { 131 | int idx1 = id * 3; 132 | int idx2 = id * 3 + 1; 133 | int idx3 = id * 3 + 2; 134 | 135 | float seed = floor(pTime + id * 0.1f) * 0.1f; 136 | float3 v1 = RandomPoint(idx1 + seed); 137 | float3 v2 = RandomPoint(idx2 + seed); 138 | float3 v3 = RandomPoint(idx3 + seed); 139 | 140 | v2 = normalize(v1 + normalize(v2 - v1) * pExtent); 141 | v3 = normalize(v1 + normalize(v3 - v1) * pExtent); 142 | 143 | float l1 = SimplexNoise3D.snoise(v1 * pNoiseFrequency + pNoiseOffset).w; 144 | float l2 = SimplexNoise3D.snoise(v2 * pNoiseFrequency + pNoiseOffset).w; 145 | float l3 = SimplexNoise3D.snoise(v3 * pNoiseFrequency + pNoiseOffset).w; 146 | 147 | l1 = abs(l1 * l1 * l1); 148 | l2 = abs(l2 * l2 * l2); 149 | l3 = abs(l3 * l3 * l3); 150 | 151 | v1 *= 1 + l1 * pNoiseAmplitude; 152 | v2 *= 1 + l2 * pNoiseAmplitude; 153 | v3 *= 1 + l3 * pNoiseAmplitude; 154 | 155 | float3 n = normalize(cross(v2 - v1, v3 - v2)); 156 | 157 | vertices[idx1] = v1; 158 | vertices[idx2] = v2; 159 | vertices[idx3] = v3; 160 | normals[idx1] = n; 161 | normals[idx2] = n; 162 | normals[idx3] = n; 163 | } 164 | } 165 | 166 | void UpdateMesh(float t) 167 | { 168 | var job = new NoiseMeshJob 169 | { 170 | pTime = t * m_ShuffleSpeed, 171 | pExtent = m_TriangleExtent * (cos(t*1.3f) * 0.3f + 1), 172 | pNoiseFrequency = m_NoiseFrequency * (sin(t) * 0.5f + 1), 173 | pNoiseAmplitude = m_NoiseAmplitude * (cos(t*1.7f) * 0.3f + 1), 174 | pNoiseOffset = m_NoiseOffset, 175 | vertices = m_VertexPos, 176 | normals = m_VertexNor 177 | }; 178 | 179 | #if UNITY_2021_2_OR_NEWER // Mesh GPU buffer access is since 2021.2 180 | if (m_Mode == Mode.GPU) 181 | { 182 | m_BufferPos ??= m_Mesh.GetVertexBuffer(0); 183 | m_BufferNor ??= m_Mesh.GetVertexBuffer(1); 184 | 185 | m_ComputeShader.SetFloat("pTime", job.pTime); 186 | m_ComputeShader.SetFloat("pExtent", job.pExtent); 187 | m_ComputeShader.SetFloat("pNoiseFrequency", job.pNoiseFrequency); 188 | m_ComputeShader.SetFloat("pNoiseAmplitude", job.pNoiseAmplitude); 189 | m_ComputeShader.SetVector("pNoiseOffset", new Vector4(job.pNoiseOffset.x, job.pNoiseOffset.y, job.pNoiseOffset.z, 0)); 190 | m_ComputeShader.SetInt("pTriCount", m_TriangleCount); 191 | m_ComputeShader.SetBuffer(0, "BufVertices", m_BufferPos); 192 | m_ComputeShader.SetBuffer(0, "BufNormals", m_BufferNor); 193 | m_ComputeShader.Dispatch(0, (m_TriangleCount+kThreadCount-1)/kThreadCount, 1, 1); 194 | return; 195 | } 196 | #endif 197 | 198 | if (m_Mode == Mode.CPU) 199 | { 200 | for (int id = 0; id < m_TriangleCount; ++id) 201 | job.Execute(id); 202 | } 203 | else if (m_Mode == Mode.CPUBurst) 204 | { 205 | job.Schedule(m_TriangleCount, m_TriangleCount).Complete(); 206 | } 207 | else if (m_Mode == Mode.CPUBurstThreaded) 208 | { 209 | job.Schedule(m_TriangleCount, 4).Complete(); 210 | } 211 | m_Mesh.SetVertexBufferData(m_VertexPos, 0, 0, m_VertexPos.Length, 0, MeshUpdateFlags.DontRecalculateBounds); 212 | m_Mesh.SetVertexBufferData(m_VertexNor, 0, 0, m_VertexNor.Length, 1, MeshUpdateFlags.DontRecalculateBounds); 213 | CleanupGpuResources(); 214 | } 215 | 216 | static float Random(float u, float v) 217 | { 218 | float f = dot(float2(12.9898f, 78.233f), float2(u, v)); 219 | return frac(43758.5453f * sin(f)); 220 | } 221 | 222 | static float3 RandomPoint(float id) 223 | { 224 | float u = Random(id * 0.01334f, 0.3728f) * math.PI * 2; 225 | float z = Random(0.8372f, id * 0.01197f) * 2 - 1; 226 | return float3(float2(cos(u), sin(u)) * sqrt(1 - z * z), z); 227 | } 228 | 229 | static int TrisToIndex(int tris) 230 | { 231 | return tris / 100000; 232 | } 233 | 234 | static int IndexToTris(int index) 235 | { 236 | return index * 100000; 237 | } 238 | 239 | public void OnGUI() 240 | { 241 | if (m_UIOptions == null) 242 | { 243 | m_UIOptions = new[] 244 | { 245 | new GUIContent("C# 1 thread"), 246 | new GUIContent("Burst 1 thread"), 247 | new GUIContent("Burst threaded"), 248 | #if UNITY_2021_2_OR_NEWER // Mesh GPU buffer access is since 2021.2 249 | new GUIContent("GPU compute"), 250 | #endif 251 | }; 252 | } 253 | GUI.matrix = Matrix4x4.Scale(Vector3.one * 2); 254 | GUILayout.BeginArea(new Rect(5,25,420,80), "Options", GUI.skin.window); 255 | m_Mode = (Mode)GUILayout.Toolbar((int)m_Mode, m_UIOptions); 256 | GUILayout.BeginHorizontal(); 257 | GUILayout.Label($"Triangles: {m_TriangleCount/1000}K", GUILayout.Width(120)); 258 | 259 | int triIndex = TrisToIndex(m_TriangleCount); 260 | int newTriIndex = Mathf.RoundToInt(GUILayout.HorizontalSlider(triIndex, 1, 10)); 261 | if (triIndex != newTriIndex) 262 | m_TriangleCount = IndexToTris(newTriIndex); 263 | GUILayout.EndHorizontal(); 264 | GUILayout.EndArea(); 265 | } 266 | } 267 | -------------------------------------------------------------------------------- /Assets/NoiseBall/NoiseBall.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1f7da30d5074b4023b2f3efa07fe8622 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: 7 | - m_ComputeShader: {fileID: 7200000, guid: 322cc9f2291af47849f7ea2245a8d591, type: 3} 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/NoiseBall/NoiseBallCompute.compute: -------------------------------------------------------------------------------- 1 | // Adapted from Keijiro's NoiseBall2 project from 2017 2 | // https://github.com/keijiro/NoiseBall2 3 | 4 | #pragma kernel NoiseMesh 5 | 6 | #include "SimplexNoise3D.cginc" 7 | 8 | RWByteAddressBuffer BufVertices; 9 | RWByteAddressBuffer BufNormals; 10 | float pTime; 11 | float pExtent; 12 | float pNoiseFrequency; 13 | float pNoiseAmplitude; 14 | float3 pNoiseOffset; 15 | int pTriCount; 16 | 17 | float Random(float u, float v) 18 | { 19 | float f = dot(float2(12.9898, 78.233), float2(u, v)); 20 | return frac(43758.5453 * sin(f)); 21 | } 22 | 23 | float3 RandomPoint(float id) 24 | { 25 | float u = Random(id * 0.01334, 0.3728) * 3.1415926 * 2; 26 | float z = Random(0.8372, id * 0.01197) * 2 - 1; 27 | return float3(float2(cos(u), sin(u)) * sqrt(1 - z * z), z); 28 | } 29 | 30 | void Store(RWByteAddressBuffer buf, int index, float3 v) 31 | { 32 | uint3 data = asuint(v); 33 | buf.Store3((index*3)<<2, data); 34 | } 35 | 36 | [numthreads(64, 1, 1)] 37 | void NoiseMesh(uint3 dtid : SV_DispatchThreadID) 38 | { 39 | int id = dtid.x; 40 | if (id >= pTriCount) 41 | return; 42 | int idx1 = id * 3; 43 | int idx2 = id * 3 + 1; 44 | int idx3 = id * 3 + 2; 45 | 46 | float seed = floor(pTime + id * 0.1) * 0.1; 47 | float3 v1 = RandomPoint(idx1 + seed); 48 | float3 v2 = RandomPoint(idx2 + seed); 49 | float3 v3 = RandomPoint(idx3 + seed); 50 | 51 | v2 = normalize(v1 + normalize(v2 - v1) * pExtent); 52 | v3 = normalize(v1 + normalize(v3 - v1) * pExtent); 53 | 54 | float l1 = snoise(v1 * pNoiseFrequency + pNoiseOffset).w; 55 | float l2 = snoise(v2 * pNoiseFrequency + pNoiseOffset).w; 56 | float l3 = snoise(v3 * pNoiseFrequency + pNoiseOffset).w; 57 | 58 | l1 = abs(l1 * l1 * l1); 59 | l2 = abs(l2 * l2 * l2); 60 | l3 = abs(l3 * l3 * l3); 61 | 62 | v1 *= 1 + l1 * pNoiseAmplitude; 63 | v2 *= 1 + l2 * pNoiseAmplitude; 64 | v3 *= 1 + l3 * pNoiseAmplitude; 65 | 66 | float3 n = normalize(cross(v2 - v1, v3 - v2)); 67 | 68 | Store(BufVertices, idx1, v1); 69 | Store(BufVertices, idx2, v2); 70 | Store(BufVertices, idx3, v3); 71 | Store(BufNormals, idx1, n); 72 | Store(BufNormals, idx2, n); 73 | Store(BufNormals, idx3, n); 74 | } 75 | -------------------------------------------------------------------------------- /Assets/NoiseBall/NoiseBallCompute.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 322cc9f2291af47849f7ea2245a8d591 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | preprocessorOverride: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/NoiseBall/NoiseBallMat.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: NoiseBallMat 11 | m_Shader: {fileID: 210, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 0 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: 19 | - ALWAYS 20 | m_SavedProperties: 21 | serializedVersion: 3 22 | m_TexEnvs: 23 | - _BumpMap: 24 | m_Texture: {fileID: 0} 25 | m_Scale: {x: 1, y: 1} 26 | m_Offset: {x: 0, y: 0} 27 | - _DetailAlbedoMap: 28 | m_Texture: {fileID: 0} 29 | m_Scale: {x: 1, y: 1} 30 | m_Offset: {x: 0, y: 0} 31 | - _DetailMask: 32 | m_Texture: {fileID: 0} 33 | m_Scale: {x: 1, y: 1} 34 | m_Offset: {x: 0, y: 0} 35 | - _DetailNormalMap: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | - _EmissionMap: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - _MainTex: 44 | m_Texture: {fileID: 0} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _MetallicGlossMap: 48 | m_Texture: {fileID: 0} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _OcclusionMap: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _ParallaxMap: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | - _SpecGlossMap: 60 | m_Texture: {fileID: 0} 61 | m_Scale: {x: 1, y: 1} 62 | m_Offset: {x: 0, y: 0} 63 | m_Ints: [] 64 | m_Floats: 65 | - _BlendOp: 0 66 | - _BumpScale: 1 67 | - _CameraFadingEnabled: 0 68 | - _CameraFarFadeDistance: 2 69 | - _CameraNearFadeDistance: 1 70 | - _ColorMode: 0 71 | - _Cull: 0 72 | - _Cutoff: 0.5 73 | - _DetailNormalMapScale: 1 74 | - _DistortionBlend: 0.5 75 | - _DistortionEnabled: 0 76 | - _DistortionStrength: 1 77 | - _DistortionStrengthScaled: 0 78 | - _DstBlend: 0 79 | - _EmissionEnabled: 0 80 | - _FlipbookMode: 0 81 | - _GlossMapScale: 1 82 | - _Glossiness: 0.48 83 | - _GlossyReflections: 1 84 | - _LightingEnabled: 1 85 | - _Metallic: 0.873 86 | - _Mode: 0 87 | - _OcclusionStrength: 1 88 | - _Parallax: 0.02 89 | - _SmoothnessTextureChannel: 0 90 | - _SoftParticlesEnabled: 0 91 | - _SoftParticlesFarFadeDistance: 1 92 | - _SoftParticlesNearFadeDistance: 0 93 | - _SpecularHighlights: 1 94 | - _SrcBlend: 1 95 | - _UVSec: 0 96 | - _ZWrite: 1 97 | m_Colors: 98 | - _CameraFadeParams: {r: 0, g: Infinity, b: 0, a: 0} 99 | - _Color: {r: 1, g: 1, b: 1, a: 1} 100 | - _ColorAddSubDiff: {r: 0, g: 0, b: 0, a: 0} 101 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 102 | - _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0} 103 | m_BuildTextureStacks: [] 104 | -------------------------------------------------------------------------------- /Assets/NoiseBall/NoiseBallMat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7fd5181902b274306b26d59c0e7134b5 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/NoiseBall/NoiseBallScene.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.18381366, g: 0.22846112, b: 0.30024698, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 47 | m_GIWorkflowMode: 1 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: 40 60 | m_AtlasSize: 1024 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: 512 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 256 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 1 83 | m_PVRDenoiserTypeDirect: 1 84 | m_PVRDenoiserTypeIndirect: 1 85 | m_PVRDenoiserTypeAO: 1 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 1 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_LightingSettings: {fileID: 0} 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 | maxJobWorkers: 0 122 | preserveTilesOutsideBounds: 0 123 | debug: 124 | m_Flags: 0 125 | m_NavMeshData: {fileID: 0} 126 | --- !u!1 &128135892 127 | GameObject: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | serializedVersion: 6 133 | m_Component: 134 | - component: {fileID: 128135896} 135 | - component: {fileID: 128135895} 136 | - component: {fileID: 128135894} 137 | - component: {fileID: 128135893} 138 | m_Layer: 0 139 | m_Name: Plane 140 | m_TagString: Untagged 141 | m_Icon: {fileID: 0} 142 | m_NavMeshLayer: 0 143 | m_StaticEditorFlags: 0 144 | m_IsActive: 1 145 | --- !u!64 &128135893 146 | MeshCollider: 147 | m_ObjectHideFlags: 0 148 | m_CorrespondingSourceObject: {fileID: 0} 149 | m_PrefabInstance: {fileID: 0} 150 | m_PrefabAsset: {fileID: 0} 151 | m_GameObject: {fileID: 128135892} 152 | m_Material: {fileID: 0} 153 | m_IsTrigger: 0 154 | m_Enabled: 1 155 | serializedVersion: 4 156 | m_Convex: 0 157 | m_CookingOptions: 30 158 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 159 | --- !u!23 &128135894 160 | MeshRenderer: 161 | m_ObjectHideFlags: 0 162 | m_CorrespondingSourceObject: {fileID: 0} 163 | m_PrefabInstance: {fileID: 0} 164 | m_PrefabAsset: {fileID: 0} 165 | m_GameObject: {fileID: 128135892} 166 | m_Enabled: 1 167 | m_CastShadows: 1 168 | m_ReceiveShadows: 1 169 | m_DynamicOccludee: 1 170 | m_StaticShadowCaster: 0 171 | m_MotionVectors: 1 172 | m_LightProbeUsage: 1 173 | m_ReflectionProbeUsage: 1 174 | m_RayTracingMode: 2 175 | m_RayTraceProcedural: 0 176 | m_RenderingLayerMask: 1 177 | m_RendererPriority: 0 178 | m_Materials: 179 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} 180 | m_StaticBatchInfo: 181 | firstSubMesh: 0 182 | subMeshCount: 0 183 | m_StaticBatchRoot: {fileID: 0} 184 | m_ProbeAnchor: {fileID: 0} 185 | m_LightProbeVolumeOverride: {fileID: 0} 186 | m_ScaleInLightmap: 1 187 | m_ReceiveGI: 1 188 | m_PreserveUVs: 0 189 | m_IgnoreNormalsForChartDetection: 0 190 | m_ImportantGI: 0 191 | m_StitchLightmapSeams: 1 192 | m_SelectedEditorRenderState: 3 193 | m_MinimumChartSize: 4 194 | m_AutoUVMaxDistance: 0.5 195 | m_AutoUVMaxAngle: 89 196 | m_LightmapParameters: {fileID: 0} 197 | m_SortingLayerID: 0 198 | m_SortingLayer: 0 199 | m_SortingOrder: 0 200 | m_AdditionalVertexStreams: {fileID: 0} 201 | --- !u!33 &128135895 202 | MeshFilter: 203 | m_ObjectHideFlags: 0 204 | m_CorrespondingSourceObject: {fileID: 0} 205 | m_PrefabInstance: {fileID: 0} 206 | m_PrefabAsset: {fileID: 0} 207 | m_GameObject: {fileID: 128135892} 208 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 209 | --- !u!4 &128135896 210 | Transform: 211 | m_ObjectHideFlags: 0 212 | m_CorrespondingSourceObject: {fileID: 0} 213 | m_PrefabInstance: {fileID: 0} 214 | m_PrefabAsset: {fileID: 0} 215 | m_GameObject: {fileID: 128135892} 216 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 217 | m_LocalPosition: {x: 0, y: 0, z: 0} 218 | m_LocalScale: {x: 1, y: 1, z: 1} 219 | m_Children: [] 220 | m_Father: {fileID: 0} 221 | m_RootOrder: 2 222 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 223 | --- !u!1 &236851685 224 | GameObject: 225 | m_ObjectHideFlags: 0 226 | m_CorrespondingSourceObject: {fileID: 0} 227 | m_PrefabInstance: {fileID: 0} 228 | m_PrefabAsset: {fileID: 0} 229 | serializedVersion: 6 230 | m_Component: 231 | - component: {fileID: 236851690} 232 | - component: {fileID: 236851689} 233 | - component: {fileID: 236851688} 234 | - component: {fileID: 236851686} 235 | m_Layer: 0 236 | m_Name: NoiseBall 237 | m_TagString: Untagged 238 | m_Icon: {fileID: 0} 239 | m_NavMeshLayer: 0 240 | m_StaticEditorFlags: 0 241 | m_IsActive: 1 242 | --- !u!114 &236851686 243 | MonoBehaviour: 244 | m_ObjectHideFlags: 0 245 | m_CorrespondingSourceObject: {fileID: 0} 246 | m_PrefabInstance: {fileID: 0} 247 | m_PrefabAsset: {fileID: 0} 248 | m_GameObject: {fileID: 236851685} 249 | m_Enabled: 1 250 | m_EditorHideFlags: 0 251 | m_Script: {fileID: 11500000, guid: 1f7da30d5074b4023b2f3efa07fe8622, type: 3} 252 | m_Name: 253 | m_EditorClassIdentifier: 254 | m_Mode: 2 255 | m_TriangleCount: 300000 256 | m_TriangleExtent: 0.3 257 | m_ShuffleSpeed: 4 258 | m_NoiseAmplitude: 1 259 | m_NoiseFrequency: 0.5 260 | m_NoiseMotion: {x: 0, y: 1, z: 0} 261 | m_ComputeShader: {fileID: 7200000, guid: 322cc9f2291af47849f7ea2245a8d591, type: 3} 262 | --- !u!23 &236851688 263 | MeshRenderer: 264 | m_ObjectHideFlags: 0 265 | m_CorrespondingSourceObject: {fileID: 0} 266 | m_PrefabInstance: {fileID: 0} 267 | m_PrefabAsset: {fileID: 0} 268 | m_GameObject: {fileID: 236851685} 269 | m_Enabled: 1 270 | m_CastShadows: 1 271 | m_ReceiveShadows: 1 272 | m_DynamicOccludee: 1 273 | m_StaticShadowCaster: 0 274 | m_MotionVectors: 1 275 | m_LightProbeUsage: 1 276 | m_ReflectionProbeUsage: 1 277 | m_RayTracingMode: 2 278 | m_RayTraceProcedural: 0 279 | m_RenderingLayerMask: 1 280 | m_RendererPriority: 0 281 | m_Materials: 282 | - {fileID: 2100000, guid: 7fd5181902b274306b26d59c0e7134b5, type: 2} 283 | m_StaticBatchInfo: 284 | firstSubMesh: 0 285 | subMeshCount: 0 286 | m_StaticBatchRoot: {fileID: 0} 287 | m_ProbeAnchor: {fileID: 0} 288 | m_LightProbeVolumeOverride: {fileID: 0} 289 | m_ScaleInLightmap: 1 290 | m_ReceiveGI: 1 291 | m_PreserveUVs: 0 292 | m_IgnoreNormalsForChartDetection: 0 293 | m_ImportantGI: 0 294 | m_StitchLightmapSeams: 1 295 | m_SelectedEditorRenderState: 3 296 | m_MinimumChartSize: 4 297 | m_AutoUVMaxDistance: 0.5 298 | m_AutoUVMaxAngle: 89 299 | m_LightmapParameters: {fileID: 0} 300 | m_SortingLayerID: 0 301 | m_SortingLayer: 0 302 | m_SortingOrder: 0 303 | m_AdditionalVertexStreams: {fileID: 0} 304 | --- !u!33 &236851689 305 | MeshFilter: 306 | m_ObjectHideFlags: 0 307 | m_CorrespondingSourceObject: {fileID: 0} 308 | m_PrefabInstance: {fileID: 0} 309 | m_PrefabAsset: {fileID: 0} 310 | m_GameObject: {fileID: 236851685} 311 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 312 | --- !u!4 &236851690 313 | Transform: 314 | m_ObjectHideFlags: 0 315 | m_CorrespondingSourceObject: {fileID: 0} 316 | m_PrefabInstance: {fileID: 0} 317 | m_PrefabAsset: {fileID: 0} 318 | m_GameObject: {fileID: 236851685} 319 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 320 | m_LocalPosition: {x: 0, y: 1.061, z: 0} 321 | m_LocalScale: {x: 1, y: 1, z: 1} 322 | m_Children: [] 323 | m_Father: {fileID: 0} 324 | m_RootOrder: 3 325 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 326 | --- !u!1 &1013235820 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: 1013235822} 335 | - component: {fileID: 1013235821} 336 | m_Layer: 0 337 | m_Name: Directional Light 338 | m_TagString: Untagged 339 | m_Icon: {fileID: 0} 340 | m_NavMeshLayer: 0 341 | m_StaticEditorFlags: 0 342 | m_IsActive: 1 343 | --- !u!108 &1013235821 344 | Light: 345 | m_ObjectHideFlags: 0 346 | m_CorrespondingSourceObject: {fileID: 0} 347 | m_PrefabInstance: {fileID: 0} 348 | m_PrefabAsset: {fileID: 0} 349 | m_GameObject: {fileID: 1013235820} 350 | m_Enabled: 1 351 | serializedVersion: 10 352 | m_Type: 1 353 | m_Shape: 0 354 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 355 | m_Intensity: 0.7 356 | m_Range: 10 357 | m_SpotAngle: 30 358 | m_InnerSpotAngle: 21.802082 359 | m_CookieSize: 10 360 | m_Shadows: 361 | m_Type: 2 362 | m_Resolution: -1 363 | m_CustomResolution: -1 364 | m_Strength: 1 365 | m_Bias: 0.05 366 | m_NormalBias: 0.4 367 | m_NearPlane: 0.2 368 | m_CullingMatrixOverride: 369 | e00: 1 370 | e01: 0 371 | e02: 0 372 | e03: 0 373 | e10: 0 374 | e11: 1 375 | e12: 0 376 | e13: 0 377 | e20: 0 378 | e21: 0 379 | e22: 1 380 | e23: 0 381 | e30: 0 382 | e31: 0 383 | e32: 0 384 | e33: 1 385 | m_UseCullingMatrixOverride: 0 386 | m_Cookie: {fileID: 0} 387 | m_DrawHalo: 0 388 | m_Flare: {fileID: 0} 389 | m_RenderMode: 0 390 | m_CullingMask: 391 | serializedVersion: 2 392 | m_Bits: 4294967295 393 | m_RenderingLayerMask: 1 394 | m_Lightmapping: 4 395 | m_LightShadowCasterMode: 0 396 | m_AreaSize: {x: 1, y: 1} 397 | m_BounceIntensity: 1 398 | m_ColorTemperature: 6570 399 | m_UseColorTemperature: 0 400 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 401 | m_UseBoundingSphereOverride: 0 402 | m_UseViewFrustumForShadowCasterCull: 1 403 | m_ShadowRadius: 0 404 | m_ShadowAngle: 0 405 | --- !u!4 &1013235822 406 | Transform: 407 | m_ObjectHideFlags: 0 408 | m_CorrespondingSourceObject: {fileID: 0} 409 | m_PrefabInstance: {fileID: 0} 410 | m_PrefabAsset: {fileID: 0} 411 | m_GameObject: {fileID: 1013235820} 412 | m_LocalRotation: {x: -0.24115443, y: -0.094796814, z: -0.06994175, w: -0.96331} 413 | m_LocalPosition: {x: 0.59205467, y: 1.7980545, z: -3.177853} 414 | m_LocalScale: {x: 1, y: 1, z: 1} 415 | m_Children: [] 416 | m_Father: {fileID: 0} 417 | m_RootOrder: 1 418 | m_LocalEulerAnglesHint: {x: 26.83, y: 14.033, z: 11.668} 419 | --- !u!1 &1082422885 420 | GameObject: 421 | m_ObjectHideFlags: 0 422 | m_CorrespondingSourceObject: {fileID: 0} 423 | m_PrefabInstance: {fileID: 0} 424 | m_PrefabAsset: {fileID: 0} 425 | serializedVersion: 6 426 | m_Component: 427 | - component: {fileID: 1082422888} 428 | - component: {fileID: 1082422887} 429 | - component: {fileID: 1082422886} 430 | - component: {fileID: 1082422889} 431 | m_Layer: 0 432 | m_Name: Main Camera 433 | m_TagString: MainCamera 434 | m_Icon: {fileID: 0} 435 | m_NavMeshLayer: 0 436 | m_StaticEditorFlags: 0 437 | m_IsActive: 1 438 | --- !u!81 &1082422886 439 | AudioListener: 440 | m_ObjectHideFlags: 0 441 | m_CorrespondingSourceObject: {fileID: 0} 442 | m_PrefabInstance: {fileID: 0} 443 | m_PrefabAsset: {fileID: 0} 444 | m_GameObject: {fileID: 1082422885} 445 | m_Enabled: 1 446 | --- !u!20 &1082422887 447 | Camera: 448 | m_ObjectHideFlags: 0 449 | m_CorrespondingSourceObject: {fileID: 0} 450 | m_PrefabInstance: {fileID: 0} 451 | m_PrefabAsset: {fileID: 0} 452 | m_GameObject: {fileID: 1082422885} 453 | m_Enabled: 1 454 | serializedVersion: 2 455 | m_ClearFlags: 1 456 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 457 | m_projectionMatrixMode: 1 458 | m_GateFitMode: 2 459 | m_FOVAxisMode: 0 460 | m_SensorSize: {x: 36, y: 24} 461 | m_LensShift: {x: 0, y: 0} 462 | m_FocalLength: 50 463 | m_NormalizedViewPortRect: 464 | serializedVersion: 2 465 | x: 0 466 | y: 0 467 | width: 1 468 | height: 1 469 | near clip plane: 0.3 470 | far clip plane: 1000 471 | field of view: 60 472 | orthographic: 0 473 | orthographic size: 5 474 | m_Depth: -1 475 | m_CullingMask: 476 | serializedVersion: 2 477 | m_Bits: 4294967295 478 | m_RenderingPath: -1 479 | m_TargetTexture: {fileID: 0} 480 | m_TargetDisplay: 0 481 | m_TargetEye: 3 482 | m_HDR: 1 483 | m_AllowMSAA: 1 484 | m_AllowDynamicResolution: 0 485 | m_ForceIntoRT: 0 486 | m_OcclusionCulling: 1 487 | m_StereoConvergence: 10 488 | m_StereoSeparation: 0.022 489 | --- !u!4 &1082422888 490 | Transform: 491 | m_ObjectHideFlags: 0 492 | m_CorrespondingSourceObject: {fileID: 0} 493 | m_PrefabInstance: {fileID: 0} 494 | m_PrefabAsset: {fileID: 0} 495 | m_GameObject: {fileID: 1082422885} 496 | m_LocalRotation: {x: -0.17990762, y: 0.45269376, z: -0.09379815, w: -0.86827624} 497 | m_LocalPosition: {x: 1.67, y: 1.7, z: -1.18} 498 | m_LocalScale: {x: 1, y: 1, z: 1} 499 | m_Children: [] 500 | m_Father: {fileID: 0} 501 | m_RootOrder: 0 502 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 503 | --- !u!114 &1082422889 504 | MonoBehaviour: 505 | m_ObjectHideFlags: 0 506 | m_CorrespondingSourceObject: {fileID: 0} 507 | m_PrefabInstance: {fileID: 0} 508 | m_PrefabAsset: {fileID: 0} 509 | m_GameObject: {fileID: 1082422885} 510 | m_Enabled: 1 511 | m_EditorHideFlags: 0 512 | m_Script: {fileID: 11500000, guid: 39a47d63ba8c4458e8379a6fca917362, type: 3} 513 | m_Name: 514 | m_EditorClassIdentifier: 515 | updateInterval: 1 516 | -------------------------------------------------------------------------------- /Assets/NoiseBall/NoiseBallScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dbad99e69baa84f6abddb0c8b0be42af 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/NoiseBall/SimplexNoise3D.cginc: -------------------------------------------------------------------------------- 1 | // Adapted from Keijiro's NoiseBall2 project from 2017 2 | // https://github.com/keijiro/NoiseBall2 3 | 4 | float3 mod289(float3 x) 5 | { 6 | return x - floor(x / 289.0) * 289.0; 7 | } 8 | 9 | float4 mod289(float4 x) 10 | { 11 | return x - floor(x / 289.0) * 289.0; 12 | } 13 | 14 | float4 permute(float4 x) 15 | { 16 | return mod289((x * 34.0 + 1.0) * x); 17 | } 18 | 19 | float4 taylorInvSqrt(float4 r) 20 | { 21 | return 1.79284291400159 - r * 0.85373472095314; 22 | } 23 | 24 | float4 snoise(float3 v) 25 | { 26 | const float2 C = float2(1.0 / 6.0, 1.0 / 3.0); 27 | 28 | // First corner 29 | float3 i = floor(v + dot(v, C.yyy)); 30 | float3 x0 = v - i + dot(i, C.xxx); 31 | 32 | // Other corners 33 | float3 g = step(x0.yzx, x0.xyz); 34 | float3 l = 1.0 - g; 35 | float3 i1 = min(g.xyz, l.zxy); 36 | float3 i2 = max(g.xyz, l.zxy); 37 | 38 | // x1 = x0 - i1 + 1.0 * C.xxx; 39 | // x2 = x0 - i2 + 2.0 * C.xxx; 40 | // x3 = x0 - 1.0 + 3.0 * C.xxx; 41 | float3 x1 = x0 - i1 + C.xxx; 42 | float3 x2 = x0 - i2 + C.yyy; 43 | float3 x3 = x0 - 0.5; 44 | 45 | // Permutations 46 | i = mod289(i); // Avoid truncation effects in permutation 47 | float4 p = 48 | permute(permute(permute(i.z + float4(0.0, i1.z, i2.z, 1.0)) 49 | + i.y + float4(0.0, i1.y, i2.y, 1.0)) 50 | + i.x + float4(0.0, i1.x, i2.x, 1.0)); 51 | 52 | // Gradients: 7x7 points over a square, mapped onto an octahedron. 53 | // The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294) 54 | float4 j = p - 49.0 * floor(p / 49.0); // mod(p,7*7) 55 | 56 | float4 x_ = floor(j / 7.0); 57 | float4 y_ = floor(j - 7.0 * x_); // mod(j,N) 58 | 59 | float4 x = (x_ * 2.0 + 0.5) / 7.0 - 1.0; 60 | float4 y = (y_ * 2.0 + 0.5) / 7.0 - 1.0; 61 | 62 | float4 h = 1.0 - abs(x) - abs(y); 63 | 64 | float4 b0 = float4(x.xy, y.xy); 65 | float4 b1 = float4(x.zw, y.zw); 66 | 67 | //float4 s0 = float4(lessThan(b0, 0.0)) * 2.0 - 1.0; 68 | //float4 s1 = float4(lessThan(b1, 0.0)) * 2.0 - 1.0; 69 | float4 s0 = floor(b0) * 2.0 + 1.0; 70 | float4 s1 = floor(b1) * 2.0 + 1.0; 71 | float4 sh = -step(h, 0.0); 72 | 73 | float4 a0 = b0.xzyw + s0.xzyw * sh.xxyy; 74 | float4 a1 = b1.xzyw + s1.xzyw * sh.zzww; 75 | 76 | float3 g0 = float3(a0.xy, h.x); 77 | float3 g1 = float3(a0.zw, h.y); 78 | float3 g2 = float3(a1.xy, h.z); 79 | float3 g3 = float3(a1.zw, h.w); 80 | 81 | // Normalise gradients 82 | float4 norm = taylorInvSqrt(float4(dot(g0, g0), dot(g1, g1), dot(g2, g2), dot(g3, g3))); 83 | g0 *= norm.x; 84 | g1 *= norm.y; 85 | g2 *= norm.z; 86 | g3 *= norm.w; 87 | 88 | // Compute noise and gradient at P 89 | float4 m = max(0.6 - float4(dot(x0, x0), dot(x1, x1), dot(x2, x2), dot(x3, x3)), 0.0); 90 | float4 m2 = m * m; 91 | float4 m3 = m2 * m; 92 | float4 m4 = m2 * m2; 93 | float3 grad = 94 | -6.0 * m3.x * x0 * dot(x0, g0) + m4.x * g0 + 95 | -6.0 * m3.y * x1 * dot(x1, g1) + m4.y * g1 + 96 | -6.0 * m3.z * x2 * dot(x2, g2) + m4.z * g2 + 97 | -6.0 * m3.w * x3 * dot(x3, g3) + m4.w * g3; 98 | float4 px = float4(dot(x0, g0), dot(x1, g1), dot(x2, g2), dot(x3, g3)); 99 | return 42.0 * float4(grad, dot(m4, px)); 100 | } 101 | -------------------------------------------------------------------------------- /Assets/NoiseBall/SimplexNoise3D.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ae886372883ef4b1e8b4e7615b5f2098 3 | ShaderIncludeImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/NoiseBall/SimplexNoise3D.cs: -------------------------------------------------------------------------------- 1 | // Adapted from Keijiro's NoiseBall2 project from 2017 2 | // https://github.com/keijiro/NoiseBall2 3 | 4 | using Unity.Mathematics; 5 | using static Unity.Mathematics.math; 6 | 7 | public static class SimplexNoise3D 8 | { 9 | static float3 mod289(float3 x) { return x - floor(x * (1.0f/ 289.0f)) * 289.0f; } 10 | static float4 mod289(float4 x) { return x - floor(x * (1.0f / 289.0f)) * 289.0f; } 11 | static float4 permute(float4 x) { return mod289((x * 34.0f + 1.0f) * x); } 12 | static float4 taylorInvSqrt(float4 r) { return 1.79284291400159f - r * 0.85373472095314f; } 13 | 14 | public static float4 snoise(float3 v) 15 | { 16 | float2 C = float2(1.0f / 6.0f, 1.0f / 3.0f); 17 | 18 | // First corner 19 | float3 i = floor(v + dot(v, C.yyy)); 20 | float3 x0 = v - i + dot(i, C.xxx); 21 | 22 | // Other corners 23 | float3 g = step(x0.yzx, x0.xyz); 24 | float3 l = 1.0f - g; 25 | float3 i1 = min(g.xyz, l.zxy); 26 | float3 i2 = max(g.xyz, l.zxy); 27 | 28 | // x1 = x0 - i1 + 1.0 * C.xxx; 29 | // x2 = x0 - i2 + 2.0 * C.xxx; 30 | // x3 = x0 - 1.0 + 3.0 * C.xxx; 31 | float3 x1 = x0 - i1 + C.xxx; 32 | float3 x2 = x0 - i2 + C.yyy; 33 | float3 x3 = x0 - 0.5f; 34 | 35 | // Permutations 36 | i = mod289(i); // Avoid truncation effects in permutation 37 | float4 p = permute(permute(permute(i.z + float4(0.0f, i1.z, i2.z, 1.0f)) 38 | + i.y + float4(0.0f, i1.y, i2.y, 1.0f)) 39 | + i.x + float4(0.0f, i1.x, i2.x, 1.0f)); 40 | // Gradients: 7x7 points over a square, mapped onto an octahedron. 41 | // The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294) 42 | float4 j = p - 49.0f * floor(p * (1.0f/49.0f)); // mod(p,7*7) 43 | 44 | float4 x_ = floor(j * (1.0f / 7.0f)); 45 | float4 y_ = floor(j - 7.0f * x_); // mod(j,N) 46 | 47 | float4 x = (x_ * 2.0f + 0.5f) / 7.0f - 1.0f; 48 | float4 y = (y_ * 2.0f + 0.5f) / 7.0f - 1.0f; 49 | 50 | float4 h = 1.0f - abs(x) - abs(y); 51 | 52 | float4 b0 = float4(x.xy, y.xy); 53 | float4 b1 = float4(x.zw, y.zw); 54 | 55 | //float4 s0 = float4(lessThan(b0, 0.0)) * 2.0 - 1.0; 56 | //float4 s1 = float4(lessThan(b1, 0.0)) * 2.0 - 1.0; 57 | float4 s0 = floor(b0) * 2.0f + 1.0f; 58 | float4 s1 = floor(b1) * 2.0f + 1.0f; 59 | float4 sh = -step(h, 0.0f); 60 | 61 | float4 a0 = b0.xzyw + s0.xzyw * sh.xxyy; 62 | float4 a1 = b1.xzyw + s1.xzyw * sh.zzww; 63 | 64 | float3 g0 = float3(a0.xy, h.x); 65 | float3 g1 = float3(a0.zw, h.y); 66 | float3 g2 = float3(a1.xy, h.z); 67 | float3 g3 = float3(a1.zw, h.w); 68 | 69 | // Normalise gradients 70 | float4 norm = taylorInvSqrt(float4(dot(g0, g0), dot(g1, g1), dot(g2, g2), dot(g3, g3))); 71 | g0 *= norm.x; 72 | g1 *= norm.y; 73 | g2 *= norm.z; 74 | g3 *= norm.w; 75 | 76 | // Compute noise and gradient at P 77 | float4 m = max(0.6f - float4(dot(x0, x0), dot(x1, x1), dot(x2, x2), dot(x3, x3)), 0.0f); 78 | float4 m2 = m * m; 79 | float4 m3 = m2 * m; 80 | float4 m4 = m2 * m2; 81 | float3 grad = 82 | -6.0f * m3.x * x0 * dot(x0, g0) + m4.x * g0 + 83 | -6.0f * m3.y * x1 * dot(x1, g1) + m4.y * g1 + 84 | -6.0f * m3.z * x2 * dot(x2, g2) + m4.z * g2 + 85 | -6.0f * m3.w * x3 * dot(x3, g3) + m4.w * g3; 86 | float4 px = float4(dot(x0, g0), dot(x1, g1), dot(x2, g2), dot(x3, g3)); 87 | return 42.0f * float4(grad, dot(m4, px)); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /Assets/NoiseBall/SimplexNoise3D.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c9055c80169e04817bf2c83b116a036c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/PerformanceIndicator.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class PerformanceIndicator : MonoBehaviour 4 | { 5 | public float updateInterval = 1.0f; 6 | double lastInterval; 7 | int frames = 0; 8 | string display; 9 | void Start() 10 | { 11 | useGUILayout = false; 12 | lastInterval = Time.realtimeSinceStartup; 13 | frames = 0; 14 | } 15 | 16 | void OnGUI() 17 | { 18 | GUI.matrix = Matrix4x4.Scale(Vector3.one * 2); 19 | var rect = new Rect(5, 5, 1000, 20); 20 | GUI.color = Color.black; 21 | rect.x += 1; 22 | rect.y += 1; 23 | GUI.Label(rect, display); 24 | GUI.color = Color.white; 25 | rect.x -= 1; 26 | rect.y -= 1; 27 | GUI.Label(rect, display); 28 | } 29 | 30 | void Update() 31 | { 32 | ++frames; 33 | float timeNow = Time.realtimeSinceStartup; 34 | if (timeNow > lastInterval + updateInterval) 35 | { 36 | var ms = (timeNow - lastInterval) / frames * 1000.0; 37 | display = $"Perf: {ms:F1}ms"; 38 | frames = 0; 39 | lastInterval = timeNow; 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Assets/PerformanceIndicator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 39a47d63ba8c4458e8379a6fca917362 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/ProceduralWaterMesh.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aa2fa48e2b49941a8bb52e3b05321063 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ProceduralWaterMesh/ProceduralWaterMesh.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using Unity.Burst; 3 | using Unity.Collections; 4 | using Unity.Jobs; 5 | using UnityEngine; 6 | using UnityEngine.Rendering; 7 | 8 | // Simple water wave procedural mesh based on https://www.konsfik.com/procedural-water-surface-made-in-unity3d/ - written by Kostas Sfikas, March 2017. 9 | // Note that this sample shows both CPU and GPU mesh modification approaches, and some of the code complexity is 10 | // because of that; comments point out these places. 11 | [RequireComponent(typeof(MeshFilter))] 12 | [RequireComponent(typeof(MeshRenderer))] 13 | public class ProceduralWaterMesh : MonoBehaviour 14 | { 15 | public enum Mode 16 | { 17 | CPU, 18 | CPUBurst, 19 | CPUBurstThreaded, 20 | #if UNITY_2021_2_OR_NEWER // Mesh GPU buffer access is since 2021.2 21 | GPU 22 | #endif 23 | } 24 | 25 | public Mode mode = Mode.CPUBurstThreaded; 26 | public float surfaceActualWidth = 10; 27 | public float surfaceActualLength = 10; 28 | public int surfaceWidthPoints = 100; 29 | public int surfaceLengthPoints = 100; 30 | public ComputeShader waveComputeShader; 31 | 32 | Transform[] m_WaveSources; 33 | Mesh m_Mesh; 34 | float m_LocalTime; 35 | 36 | // Buffers for CPU code path 37 | NativeArray m_WaveSourcePositions; 38 | NativeArray m_Vertices; 39 | // Buffers for GPU compute shader path 40 | #if UNITY_2021_2_OR_NEWER // Mesh GPU buffer access is since 2021.2 41 | GraphicsBuffer m_GpuWaveSourcePositions; 42 | GraphicsBuffer m_GpuVertices; 43 | #endif 44 | 45 | GUIContent[] m_UIOptions; 46 | 47 | void OnEnable() 48 | { 49 | m_Mesh = CreateMesh(); 50 | m_WaveSources = transform.Cast().Where(t => t.gameObject.activeInHierarchy).ToArray(); 51 | m_WaveSourcePositions = new NativeArray(m_WaveSources.Length, Allocator.Persistent, NativeArrayOptions.UninitializedMemory); 52 | } 53 | 54 | void OnDisable() 55 | { 56 | m_WaveSourcePositions.Dispose(); 57 | m_Vertices.Dispose(); 58 | CleanupComputeResources(); 59 | } 60 | 61 | void CleanupComputeResources() 62 | { 63 | #if UNITY_2021_2_OR_NEWER // Mesh GPU buffer access is since 2021.2 64 | m_GpuWaveSourcePositions?.Dispose(); 65 | m_GpuWaveSourcePositions = null; 66 | m_GpuVertices?.Dispose(); 67 | m_GpuVertices = null; 68 | #endif 69 | } 70 | 71 | public void Update() 72 | { 73 | m_LocalTime += Time.deltaTime * 2.0f; 74 | UpdateWaveSourcePositions(); 75 | #if UNITY_2021_2_OR_NEWER // Mesh GPU buffer access is since 2021.2 76 | if (mode == Mode.GPU) 77 | UpdateWaveGpu(); 78 | else 79 | #endif 80 | UpdateWaveCpu(); 81 | } 82 | 83 | // Update water mesh on the CPU 84 | void UpdateWaveCpu() 85 | { 86 | // When we do CPU based mesh modifications, GraphicsBuffers that were 87 | // fetched for a mesh previously can become invalid. So just make sure 88 | // that any GPU compute shader path buffers are released when we're in 89 | // the CPU path. 90 | CleanupComputeResources(); 91 | 92 | var job = new WaveJob { vertices = m_Vertices, waveSourcePositions = m_WaveSourcePositions, time = m_LocalTime }; 93 | 94 | if (mode == Mode.CPU) 95 | { 96 | // Directly execute the vertex modification code, on a single thread. 97 | // This will not get into Burst-compiled code. 98 | for (var i = 0; i < m_Vertices.Length; ++i) 99 | job.Execute(i); 100 | } 101 | else if (mode == Mode.CPUBurst) 102 | { 103 | // Execute Burst-compiled code, but with inner loop count that is 104 | // "all the vertices". Effectively this makes it single threaded. 105 | job.Schedule(m_Vertices.Length, m_Vertices.Length).Complete(); 106 | } 107 | else if (mode == Mode.CPUBurstThreaded) 108 | { 109 | // Execute Burst-compiled code, multi-threaded. 110 | job.Schedule(m_Vertices.Length, 16).Complete(); 111 | } 112 | // Update mesh vertex positions from the NativeArray we calculated above. 113 | m_Mesh.SetVertices(m_Vertices); 114 | // Recalculate mesh normals. Note: our mesh is a heightmap and we could use a more 115 | // efficient method of normal calculation, similar to what the GPU code path does. 116 | // Just use a simple generic function here for simplicity. 117 | m_Mesh.RecalculateNormals(); 118 | } 119 | 120 | // Update water mesh using a GPU compute shader 121 | #if UNITY_2021_2_OR_NEWER // Mesh GPU buffer access is since 2021.2 122 | void UpdateWaveGpu() 123 | { 124 | // Create GPU buffer for wave source positions, if needed. 125 | m_GpuWaveSourcePositions ??= new GraphicsBuffer(GraphicsBuffer.Target.Structured, m_WaveSources.Length, 12); 126 | // Acquire mesh GPU vertex buffer, if needed. Note that we can't do this just once, 127 | // since the buffer can become invalid when doing CPU based vertex modifications. 128 | m_GpuVertices ??= m_Mesh.GetVertexBuffer(0); 129 | 130 | m_GpuWaveSourcePositions.SetData(m_WaveSourcePositions); 131 | 132 | waveComputeShader.SetFloat("gTime", m_LocalTime); 133 | waveComputeShader.SetInt("gVertexCount", m_Mesh.vertexCount); 134 | waveComputeShader.SetInt("gWaveSourceCount", m_WaveSources.Length); 135 | waveComputeShader.SetInt("gVertexGridX", surfaceWidthPoints); 136 | waveComputeShader.SetInt("gVertexGridY", surfaceLengthPoints); 137 | // update vertex positions 138 | waveComputeShader.SetBuffer(0, "bufVertices", m_GpuVertices); 139 | waveComputeShader.SetBuffer(0, "bufWaveSourcePositions", m_GpuWaveSourcePositions); 140 | waveComputeShader.Dispatch(0, (m_Mesh.vertexCount+63)/63, 1, 1); 141 | // calculate normals 142 | waveComputeShader.SetBuffer(1, "bufVertices", m_GpuVertices); 143 | waveComputeShader.Dispatch(1, (m_Mesh.vertexCount+63)/63, 1, 1); 144 | } 145 | #endif 146 | 147 | void UpdateWaveSourcePositions() 148 | { 149 | for (var i = 0; i < m_WaveSources.Length; ++i) 150 | m_WaveSourcePositions[i] = m_WaveSources[i].position; 151 | } 152 | 153 | [BurstCompile] 154 | struct WaveJob : IJobParallelFor 155 | { 156 | public NativeArray vertices; 157 | [ReadOnly] [NativeDisableParallelForRestriction] public NativeArray waveSourcePositions; 158 | public float time; 159 | 160 | public void Execute(int index) 161 | { 162 | var p = vertices[index]; 163 | var y = 0.0f; 164 | for (var i = 0; i < waveSourcePositions.Length; i++) 165 | { 166 | var p1 = new Vector2 (p.x, p.z); 167 | var p2 = new Vector2 (waveSourcePositions[i].x, waveSourcePositions[i].z); 168 | var dist = Vector2.Distance (p1,p2); 169 | y += Mathf.Sin (dist * 12.0f - time) / (dist*20+10); 170 | } 171 | p.y = y; 172 | vertices[index] = p; 173 | } 174 | } 175 | 176 | Mesh CreateMesh() 177 | { 178 | Mesh newMesh = new Mesh(); 179 | // Use 32 bit index buffer to allow water grids larger than ~250x250 180 | newMesh.indexFormat = IndexFormat.UInt32; 181 | 182 | #if UNITY_2021_2_OR_NEWER // Mesh GPU buffer access is since 2021. 183 | // In order for the GPU code path to work, we want the mesh vertex 184 | // buffer to be usable as a "Raw" buffer (RWBuffer) in a compute shader. 185 | // 186 | // Note that while using StructuredBuffer might be more convenient, a 187 | // vertex buffer that is also a structured buffer is not supported on 188 | // some graphics APIs (most notably DX11). That's why we use a Raw buffer 189 | // instead. 190 | newMesh.vertexBufferTarget |= GraphicsBuffer.Target.Raw; 191 | #endif 192 | 193 | // Create initial grid of vertex positions 194 | m_Vertices = new NativeArray(surfaceWidthPoints * surfaceLengthPoints, Allocator.Persistent, NativeArrayOptions.UninitializedMemory); 195 | var index = 0; 196 | for (var i = 0; i < surfaceWidthPoints; i++) 197 | { 198 | for (var j = 0; j < surfaceLengthPoints; j++) 199 | { 200 | float x = MapValue (i, 0.0f, surfaceWidthPoints-1, -surfaceActualWidth/2.0f, surfaceActualWidth/2.0f); 201 | float z = MapValue (j, 0.0f, surfaceLengthPoints-1, -surfaceActualLength/2.0f, surfaceActualLength/2.0f); 202 | m_Vertices[index++] = new Vector3(x, 0f, z); 203 | } 204 | } 205 | 206 | // Create an index buffer for the grid 207 | var indices = new int[(surfaceWidthPoints - 1) * (surfaceLengthPoints - 1) * 6]; 208 | index = 0; 209 | for (var i = 0; i < surfaceWidthPoints-1; i++) 210 | { 211 | for (var j = 0; j < surfaceLengthPoints-1; j++) 212 | { 213 | var baseIndex = i * surfaceLengthPoints + j; 214 | indices[index++] = baseIndex; 215 | indices[index++] = baseIndex + 1; 216 | indices[index++] = baseIndex + surfaceLengthPoints + 1; 217 | indices[index++] = baseIndex; 218 | indices[index++] = baseIndex + surfaceLengthPoints + 1; 219 | indices[index++] = baseIndex + surfaceLengthPoints; 220 | } 221 | } 222 | 223 | newMesh.SetVertices(m_Vertices); 224 | newMesh.triangles = indices; 225 | newMesh.RecalculateNormals(); 226 | GetComponent().mesh = newMesh; 227 | 228 | return newMesh; 229 | } 230 | 231 | static float MapValue(float refValue, float refMin, float refMax, float targetMin, float targetMax) 232 | { 233 | return targetMin + (refValue - refMin) * (targetMax - targetMin) / (refMax - refMin); 234 | } 235 | 236 | public void OnGUI() 237 | { 238 | if (m_UIOptions == null) 239 | { 240 | m_UIOptions = new[] 241 | { 242 | new GUIContent("C# 1 thread"), 243 | new GUIContent("Burst 1 thread"), 244 | new GUIContent("Burst threaded"), 245 | #if UNITY_2021_2_OR_NEWER // Mesh GPU buffer access is since 2021.2 246 | new GUIContent("GPU compute"), 247 | #endif 248 | }; 249 | } 250 | GUI.matrix = Matrix4x4.Scale(Vector3.one * 2); 251 | GUILayout.BeginArea(new Rect(5,25,420,80), "Options", GUI.skin.window); 252 | mode = (Mode)GUILayout.Toolbar((int)mode, m_UIOptions); 253 | GUILayout.Label($"Water: {surfaceWidthPoints}x{surfaceLengthPoints}, {m_WaveSources.Length} wave sources"); 254 | GUILayout.EndArea(); 255 | } 256 | } 257 | -------------------------------------------------------------------------------- /Assets/ProceduralWaterMesh/ProceduralWaterMesh.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37d23fbc3510846f08d99efd30d76d65 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: 7 | - waveComputeShader: {fileID: 7200000, guid: 3d090ef09c4ef4adf9f0cce3336393fc, type: 3} 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ProceduralWaterMesh/WaterComputeShader.compute: -------------------------------------------------------------------------------- 1 | // Compute shader example for the ProceduralWaterMesh 2 | // Does the same calculation as the C# code in ProceduralWaterMesh.cs 3 | 4 | #pragma kernel KernelWave 5 | #pragma kernel KernelCalcNormals 6 | 7 | // A "Raw" buffer is used to access the mesh vertex buffer. 8 | // 9 | // Note that while using StructuredBuffer might be more convenient, a 10 | // vertex buffer that is also a structured buffer is not supported on 11 | // some graphics APIs (most notably DX11). 12 | RWByteAddressBuffer bufVertices; 13 | 14 | StructuredBuffer bufWaveSourcePositions; 15 | 16 | float gTime; 17 | int gVertexCount; 18 | int gVertexGridX; 19 | int gVertexGridY; 20 | int gWaveSourceCount; 21 | 22 | [numthreads(64,1,1)] 23 | void KernelWave (uint3 id : SV_DispatchThreadID) 24 | { 25 | int idx = id.x; 26 | if (idx >= gVertexCount) 27 | return; 28 | 29 | // We know that our vertex layout is 6 floats per vertex 30 | // (float3 position + float3 normal). 31 | int vidx = idx * 6; 32 | uint3 praw = bufVertices.Load3(vidx<<2); 33 | float3 p = asfloat(praw); 34 | float y = 0; 35 | for (int i = 0; i < gWaveSourceCount; ++i) 36 | { 37 | float2 p1 = p.xz; 38 | float2 p2 = bufWaveSourcePositions[i].xz; 39 | float dist = length(p1-p2); 40 | y += sin(dist * 12 - gTime) / (dist*20+10); 41 | } 42 | // Change the vertex position .y coordinate. 43 | bufVertices.Store((vidx+1)<<2, asuint(y)); 44 | } 45 | 46 | [numthreads(64,1,1)] 47 | void KernelCalcNormals (uint3 id : SV_DispatchThreadID) 48 | { 49 | int idx = id.x; 50 | if (idx >= gVertexCount) 51 | return; 52 | 53 | int idxN = idx - gVertexGridX; if (idxN < 0) idxN = idx; 54 | int idxS = idx + gVertexGridX; if (idxN >= gVertexCount) idxS = idx; 55 | int idxW = idx - 1; if (idxW < 0) idxW = idx; 56 | int idxE = idx + 1; if (idxE >= gVertexCount) idxE = idx; 57 | 58 | // We know that our vertex layout is 6 floats per vertex 59 | // (float3 position + float3 normal). 60 | idxN *= 6; idxS *= 6; idxW *= 6; idxE *= 6; 61 | float3 pN = asfloat(bufVertices.Load3(idxN<<2)); 62 | float3 pS = asfloat(bufVertices.Load3(idxS<<2)); 63 | float3 pW = asfloat(bufVertices.Load3(idxW<<2)); 64 | float3 pE = asfloat(bufVertices.Load3(idxE<<2)); 65 | float3 dNS = pS - pN; 66 | float3 dWE = pE - pW; 67 | float3 n = cross(dWE, dNS); 68 | n = normalize(n); 69 | 70 | // Change the vertex normal xyz coordinates. 71 | int vidx = idx * 6; 72 | bufVertices.Store3((vidx+3)<<2, asuint(n)); 73 | } 74 | -------------------------------------------------------------------------------- /Assets/ProceduralWaterMesh/WaterComputeShader.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3d090ef09c4ef4adf9f0cce3336393fc 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | preprocessorOverride: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ProceduralWaterMesh/WaterScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5774cf2a21c7148afafcec5934a9d117 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Images/Combine1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshApiExamples/e82668f26fbf615d3ee4b1a5941c8fe167d3d485/Images/Combine1.png -------------------------------------------------------------------------------- /Images/Combine2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshApiExamples/e82668f26fbf615d3ee4b1a5941c8fe167d3d485/Images/Combine2.png -------------------------------------------------------------------------------- /Images/NoiseBall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshApiExamples/e82668f26fbf615d3ee4b1a5941c8fe167d3d485/Images/NoiseBall.png -------------------------------------------------------------------------------- /Images/Water.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshApiExamples/e82668f26fbf615d3ee4b1a5941c8fe167d3d485/Images/Water.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Unity Technologies 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.burst": "1.5.1", 4 | "com.unity.ide.rider": "3.0.5", 5 | "com.unity.mathematics": "1.2.1", 6 | "com.unity.modules.ai": "1.0.0", 7 | "com.unity.modules.androidjni": "1.0.0", 8 | "com.unity.modules.animation": "1.0.0", 9 | "com.unity.modules.assetbundle": "1.0.0", 10 | "com.unity.modules.audio": "1.0.0", 11 | "com.unity.modules.cloth": "1.0.0", 12 | "com.unity.modules.director": "1.0.0", 13 | "com.unity.modules.imageconversion": "1.0.0", 14 | "com.unity.modules.imgui": "1.0.0", 15 | "com.unity.modules.jsonserialize": "1.0.0", 16 | "com.unity.modules.particlesystem": "1.0.0", 17 | "com.unity.modules.physics": "1.0.0", 18 | "com.unity.modules.physics2d": "1.0.0", 19 | "com.unity.modules.screencapture": "1.0.0", 20 | "com.unity.modules.terrain": "1.0.0", 21 | "com.unity.modules.terrainphysics": "1.0.0", 22 | "com.unity.modules.tilemap": "1.0.0", 23 | "com.unity.modules.ui": "1.0.0", 24 | "com.unity.modules.uielements": "1.0.0", 25 | "com.unity.modules.umbra": "1.0.0", 26 | "com.unity.modules.unityanalytics": "1.0.0", 27 | "com.unity.modules.unitywebrequest": "1.0.0", 28 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 29 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 30 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 31 | "com.unity.modules.unitywebrequestwww": "1.0.0", 32 | "com.unity.modules.vehicles": "1.0.0", 33 | "com.unity.modules.video": "1.0.0", 34 | "com.unity.modules.vr": "1.0.0", 35 | "com.unity.modules.wind": "1.0.0", 36 | "com.unity.modules.xr": "1.0.0" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Packages/packages-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.burst": { 4 | "version": "1.5.1", 5 | "depth": 0, 6 | "source": "registry", 7 | "dependencies": { 8 | "com.unity.mathematics": "1.2.1" 9 | }, 10 | "url": "https://packages.unity.com" 11 | }, 12 | "com.unity.ide.rider": { 13 | "version": "3.0.5", 14 | "depth": 0, 15 | "source": "registry", 16 | "dependencies": {}, 17 | "url": "https://packages.unity.com" 18 | }, 19 | "com.unity.mathematics": { 20 | "version": "1.2.1", 21 | "depth": 0, 22 | "source": "registry", 23 | "dependencies": {}, 24 | "url": "https://packages.unity.com" 25 | }, 26 | "com.unity.modules.ai": { 27 | "version": "1.0.0", 28 | "depth": 0, 29 | "source": "builtin", 30 | "dependencies": {} 31 | }, 32 | "com.unity.modules.androidjni": { 33 | "version": "1.0.0", 34 | "depth": 0, 35 | "source": "builtin", 36 | "dependencies": {} 37 | }, 38 | "com.unity.modules.animation": { 39 | "version": "1.0.0", 40 | "depth": 0, 41 | "source": "builtin", 42 | "dependencies": {} 43 | }, 44 | "com.unity.modules.assetbundle": { 45 | "version": "1.0.0", 46 | "depth": 0, 47 | "source": "builtin", 48 | "dependencies": {} 49 | }, 50 | "com.unity.modules.audio": { 51 | "version": "1.0.0", 52 | "depth": 0, 53 | "source": "builtin", 54 | "dependencies": {} 55 | }, 56 | "com.unity.modules.cloth": { 57 | "version": "1.0.0", 58 | "depth": 0, 59 | "source": "builtin", 60 | "dependencies": { 61 | "com.unity.modules.physics": "1.0.0" 62 | } 63 | }, 64 | "com.unity.modules.director": { 65 | "version": "1.0.0", 66 | "depth": 0, 67 | "source": "builtin", 68 | "dependencies": { 69 | "com.unity.modules.audio": "1.0.0", 70 | "com.unity.modules.animation": "1.0.0" 71 | } 72 | }, 73 | "com.unity.modules.imageconversion": { 74 | "version": "1.0.0", 75 | "depth": 0, 76 | "source": "builtin", 77 | "dependencies": {} 78 | }, 79 | "com.unity.modules.imgui": { 80 | "version": "1.0.0", 81 | "depth": 0, 82 | "source": "builtin", 83 | "dependencies": {} 84 | }, 85 | "com.unity.modules.jsonserialize": { 86 | "version": "1.0.0", 87 | "depth": 0, 88 | "source": "builtin", 89 | "dependencies": {} 90 | }, 91 | "com.unity.modules.particlesystem": { 92 | "version": "1.0.0", 93 | "depth": 0, 94 | "source": "builtin", 95 | "dependencies": {} 96 | }, 97 | "com.unity.modules.physics": { 98 | "version": "1.0.0", 99 | "depth": 0, 100 | "source": "builtin", 101 | "dependencies": {} 102 | }, 103 | "com.unity.modules.physics2d": { 104 | "version": "1.0.0", 105 | "depth": 0, 106 | "source": "builtin", 107 | "dependencies": {} 108 | }, 109 | "com.unity.modules.screencapture": { 110 | "version": "1.0.0", 111 | "depth": 0, 112 | "source": "builtin", 113 | "dependencies": { 114 | "com.unity.modules.imageconversion": "1.0.0" 115 | } 116 | }, 117 | "com.unity.modules.subsystems": { 118 | "version": "1.0.0", 119 | "depth": 1, 120 | "source": "builtin", 121 | "dependencies": { 122 | "com.unity.modules.jsonserialize": "1.0.0" 123 | } 124 | }, 125 | "com.unity.modules.terrain": { 126 | "version": "1.0.0", 127 | "depth": 0, 128 | "source": "builtin", 129 | "dependencies": {} 130 | }, 131 | "com.unity.modules.terrainphysics": { 132 | "version": "1.0.0", 133 | "depth": 0, 134 | "source": "builtin", 135 | "dependencies": { 136 | "com.unity.modules.physics": "1.0.0", 137 | "com.unity.modules.terrain": "1.0.0" 138 | } 139 | }, 140 | "com.unity.modules.tilemap": { 141 | "version": "1.0.0", 142 | "depth": 0, 143 | "source": "builtin", 144 | "dependencies": { 145 | "com.unity.modules.physics2d": "1.0.0" 146 | } 147 | }, 148 | "com.unity.modules.ui": { 149 | "version": "1.0.0", 150 | "depth": 0, 151 | "source": "builtin", 152 | "dependencies": {} 153 | }, 154 | "com.unity.modules.uielements": { 155 | "version": "1.0.0", 156 | "depth": 0, 157 | "source": "builtin", 158 | "dependencies": { 159 | "com.unity.modules.ui": "1.0.0", 160 | "com.unity.modules.imgui": "1.0.0", 161 | "com.unity.modules.jsonserialize": "1.0.0", 162 | "com.unity.modules.uielementsnative": "1.0.0" 163 | } 164 | }, 165 | "com.unity.modules.uielementsnative": { 166 | "version": "1.0.0", 167 | "depth": 1, 168 | "source": "builtin", 169 | "dependencies": { 170 | "com.unity.modules.ui": "1.0.0", 171 | "com.unity.modules.imgui": "1.0.0", 172 | "com.unity.modules.jsonserialize": "1.0.0" 173 | } 174 | }, 175 | "com.unity.modules.umbra": { 176 | "version": "1.0.0", 177 | "depth": 0, 178 | "source": "builtin", 179 | "dependencies": {} 180 | }, 181 | "com.unity.modules.unityanalytics": { 182 | "version": "1.0.0", 183 | "depth": 0, 184 | "source": "builtin", 185 | "dependencies": { 186 | "com.unity.modules.unitywebrequest": "1.0.0", 187 | "com.unity.modules.jsonserialize": "1.0.0" 188 | } 189 | }, 190 | "com.unity.modules.unitywebrequest": { 191 | "version": "1.0.0", 192 | "depth": 0, 193 | "source": "builtin", 194 | "dependencies": {} 195 | }, 196 | "com.unity.modules.unitywebrequestassetbundle": { 197 | "version": "1.0.0", 198 | "depth": 0, 199 | "source": "builtin", 200 | "dependencies": { 201 | "com.unity.modules.assetbundle": "1.0.0", 202 | "com.unity.modules.unitywebrequest": "1.0.0" 203 | } 204 | }, 205 | "com.unity.modules.unitywebrequestaudio": { 206 | "version": "1.0.0", 207 | "depth": 0, 208 | "source": "builtin", 209 | "dependencies": { 210 | "com.unity.modules.unitywebrequest": "1.0.0", 211 | "com.unity.modules.audio": "1.0.0" 212 | } 213 | }, 214 | "com.unity.modules.unitywebrequesttexture": { 215 | "version": "1.0.0", 216 | "depth": 0, 217 | "source": "builtin", 218 | "dependencies": { 219 | "com.unity.modules.unitywebrequest": "1.0.0", 220 | "com.unity.modules.imageconversion": "1.0.0" 221 | } 222 | }, 223 | "com.unity.modules.unitywebrequestwww": { 224 | "version": "1.0.0", 225 | "depth": 0, 226 | "source": "builtin", 227 | "dependencies": { 228 | "com.unity.modules.unitywebrequest": "1.0.0", 229 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 230 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 231 | "com.unity.modules.audio": "1.0.0", 232 | "com.unity.modules.assetbundle": "1.0.0", 233 | "com.unity.modules.imageconversion": "1.0.0" 234 | } 235 | }, 236 | "com.unity.modules.vehicles": { 237 | "version": "1.0.0", 238 | "depth": 0, 239 | "source": "builtin", 240 | "dependencies": { 241 | "com.unity.modules.physics": "1.0.0" 242 | } 243 | }, 244 | "com.unity.modules.video": { 245 | "version": "1.0.0", 246 | "depth": 0, 247 | "source": "builtin", 248 | "dependencies": { 249 | "com.unity.modules.audio": "1.0.0", 250 | "com.unity.modules.ui": "1.0.0", 251 | "com.unity.modules.unitywebrequest": "1.0.0" 252 | } 253 | }, 254 | "com.unity.modules.vr": { 255 | "version": "1.0.0", 256 | "depth": 0, 257 | "source": "builtin", 258 | "dependencies": { 259 | "com.unity.modules.jsonserialize": "1.0.0", 260 | "com.unity.modules.physics": "1.0.0", 261 | "com.unity.modules.xr": "1.0.0" 262 | } 263 | }, 264 | "com.unity.modules.wind": { 265 | "version": "1.0.0", 266 | "depth": 0, 267 | "source": "builtin", 268 | "dependencies": {} 269 | }, 270 | "com.unity.modules.xr": { 271 | "version": "1.0.0", 272 | "depth": 0, 273 | "source": "builtin", 274 | "dependencies": { 275 | "com.unity.modules.physics": "1.0.0", 276 | "com.unity.modules.jsonserialize": "1.0.0", 277 | "com.unity.modules.subsystems": "1.0.0" 278 | } 279 | } 280 | } 281 | } 282 | -------------------------------------------------------------------------------- /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 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 1024 20 | -------------------------------------------------------------------------------- /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: 11 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: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ContactPairsMode: 0 26 | m_BroadphaseType: 0 27 | m_WorldBounds: 28 | m_Center: {x: 0, y: 0, z: 0} 29 | m_Extent: {x: 250, y: 250, z: 250} 30 | m_WorldSubdivisions: 8 31 | m_FrictionType: 0 32 | m_EnableEnhancedDeterminism: 0 33 | m_EnableUnifiedHeightmaps: 1 34 | m_DefaultMaxAngluarSpeed: 7 35 | -------------------------------------------------------------------------------- /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 | m_configObjects: {} 9 | -------------------------------------------------------------------------------- /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;asmdef;rsp;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 | -------------------------------------------------------------------------------- /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: 13 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | m_PreloadedShaders: [] 39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 40 | type: 0} 41 | m_CustomRenderPipeline: {fileID: 0} 42 | m_TransparencySortMode: 0 43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 44 | m_DefaultRenderingPath: 1 45 | m_DefaultMobileRenderingPath: 1 46 | m_TierSettings: [] 47 | m_LightmapStripping: 0 48 | m_FogStripping: 0 49 | m_InstancingStripping: 0 50 | m_LightmapKeepPlain: 1 51 | m_LightmapKeepDirCombined: 1 52 | m_LightmapKeepDynamicPlain: 1 53 | m_LightmapKeepDynamicDirCombined: 1 54 | m_LightmapKeepShadowMask: 1 55 | m_LightmapKeepSubtractive: 1 56 | m_FogKeepLinear: 1 57 | m_FogKeepExp: 1 58 | m_FogKeepExp2: 1 59 | m_AlbedoSwatchInfos: [] 60 | m_LightsUseLinearIntensity: 0 61 | m_LightsUseColorTemperature: 0 62 | m_LogWhenShaderIsCompiled: 0 63 | m_AllowEnlightenSupportForUpgradedProject: 0 64 | -------------------------------------------------------------------------------- /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/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: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_EnablePreReleasePackages: 1 16 | m_EnablePackageDependencies: 0 17 | m_AdvancedSettingsExpanded: 1 18 | m_ScopedRegistriesSettingsExpanded: 1 19 | m_SeeAllPackageVersions: 0 20 | oneTimeWarningShown: 1 21 | m_Registries: 22 | - m_Id: main 23 | m_Name: 24 | m_Url: https://packages.unity.com 25 | m_Scopes: [] 26 | m_IsDefault: 1 27 | m_Capabilities: 7 28 | m_UserSelectedRegistryName: 29 | m_UserAddingNewScopedRegistry: 0 30 | m_RegistryInfoDraft: 31 | m_Modified: 0 32 | m_ErrorMessage: 33 | m_UserModificationsInstanceId: -810 34 | m_OriginalInstanceId: -812 35 | m_LoadAssets: 0 36 | -------------------------------------------------------------------------------- /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: 4 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_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_AutoSimulation: 1 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 1 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /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 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /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: 47f546492b11445d18f1ae0cba0b44ba 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: Unity Technologies 16 | productName: MeshAPITest 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: 0 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: 1920 46 | defaultScreenHeight: 1080 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 1 51 | m_MTRendering: 1 52 | mipStripping: 0 53 | numberOfMipsStripped: 0 54 | m_StackTraceTypes: 020000000200000001000000010000000100000001000000 55 | iosShowActivityIndicatorOnLoading: -1 56 | androidShowActivityIndicatorOnLoading: -1 57 | iosUseCustomAppBackgroundBehavior: 0 58 | iosAllowHTTPDownload: 1 59 | allowedAutorotateToPortrait: 1 60 | allowedAutorotateToPortraitUpsideDown: 1 61 | allowedAutorotateToLandscapeRight: 1 62 | allowedAutorotateToLandscapeLeft: 1 63 | useOSAutorotation: 1 64 | use32BitDisplayBuffer: 1 65 | preserveFramebufferAlpha: 0 66 | disableDepthAndStencilBuffers: 0 67 | androidStartInFullscreen: 1 68 | androidRenderOutsideSafeArea: 1 69 | androidUseSwappy: 0 70 | androidBlitType: 0 71 | defaultIsNativeResolution: 1 72 | macRetinaSupport: 1 73 | runInBackground: 1 74 | captureSingleScreen: 0 75 | muteOtherAudioSources: 0 76 | Prepare IOS For Recording: 0 77 | Force IOS Speakers When Recording: 0 78 | deferSystemGesturesMode: 0 79 | hideHomeButton: 0 80 | submitAnalytics: 1 81 | usePlayerLog: 1 82 | bakeCollisionMeshes: 0 83 | forceSingleInstance: 0 84 | useFlipModelSwapchain: 1 85 | resizableWindow: 0 86 | useMacAppStoreValidation: 0 87 | macAppStoreCategory: public.app-category.games 88 | gpuSkinning: 1 89 | xboxPIXTextureCapture: 0 90 | xboxEnableAvatar: 0 91 | xboxEnableKinect: 0 92 | xboxEnableKinectAutoTracking: 0 93 | xboxEnableFitness: 0 94 | visibleInBackground: 1 95 | allowFullscreenSwitch: 1 96 | fullscreenMode: 3 97 | xboxSpeechDB: 0 98 | xboxEnableHeadOrientation: 0 99 | xboxEnableGuest: 0 100 | xboxEnablePIXSampling: 0 101 | metalFramebufferOnly: 0 102 | xboxOneResolution: 0 103 | xboxOneSResolution: 0 104 | xboxOneXResolution: 3 105 | xboxOneMonoLoggingLevel: 0 106 | xboxOneLoggingLevel: 1 107 | xboxOneDisableEsram: 0 108 | xboxOneEnableTypeOptimization: 0 109 | xboxOnePresentImmediateThreshold: 0 110 | switchQueueCommandMemory: 0 111 | switchQueueControlMemory: 16384 112 | switchQueueComputeMemory: 262144 113 | switchNVNShaderPoolsGranularity: 33554432 114 | switchNVNDefaultPoolsGranularity: 16777216 115 | switchNVNOtherPoolsGranularity: 16777216 116 | switchNVNMaxPublicTextureIDCount: 0 117 | switchNVNMaxPublicSamplerIDCount: 0 118 | stadiaPresentMode: 0 119 | stadiaTargetFramerate: 0 120 | vulkanNumSwapchainBuffers: 3 121 | vulkanEnableSetSRGBWrite: 0 122 | vulkanEnableLateAcquireNextImage: 0 123 | m_SupportedAspectRatios: 124 | 4:3: 1 125 | 5:4: 1 126 | 16:10: 1 127 | 16:9: 1 128 | Others: 1 129 | bundleVersion: 0.1 130 | preloadedAssets: [] 131 | metroInputSource: 0 132 | wsaTransparentSwapchain: 0 133 | m_HolographicPauseOnTrackingLoss: 1 134 | xboxOneDisableKinectGpuReservation: 1 135 | xboxOneEnable7thCore: 1 136 | vrSettings: 137 | cardboard: 138 | depthFormat: 0 139 | enableTransitionView: 0 140 | daydream: 141 | depthFormat: 0 142 | useSustainedPerformanceMode: 0 143 | enableVideoLayer: 0 144 | useProtectedVideoMemory: 0 145 | minimumSupportedHeadTracking: 0 146 | maximumSupportedHeadTracking: 1 147 | hololens: 148 | depthFormat: 1 149 | depthBufferSharingEnabled: 1 150 | lumin: 151 | depthFormat: 0 152 | frameTiming: 2 153 | enableGLCache: 0 154 | glCacheMaxBlobSize: 524288 155 | glCacheMaxFileSize: 8388608 156 | oculus: 157 | sharedDepthBuffer: 1 158 | dashSupport: 1 159 | lowOverheadMode: 0 160 | protectedContext: 0 161 | v2Signing: 1 162 | enable360StereoCapture: 0 163 | isWsaHolographicRemotingEnabled: 0 164 | enableFrameTimingStats: 0 165 | useHDRDisplay: 0 166 | D3DHDRBitDepth: 0 167 | m_ColorGamuts: 00000000 168 | targetPixelDensity: 30 169 | resolutionScalingMode: 0 170 | androidSupportedAspectRatio: 1 171 | androidMaxAspectRatio: 2.1 172 | applicationIdentifier: 173 | Android: com.UnityTechnologies.MeshAPITest 174 | Standalone: com.UnityTechnologies.MeshAPITest 175 | iPhone: com.UnityTechnologies.MeshAPITest 176 | buildNumber: 177 | Standalone: 0 178 | iPhone: 0 179 | tvOS: 0 180 | AndroidBundleVersionCode: 1 181 | AndroidMinSdkVersion: 22 182 | AndroidTargetSdkVersion: 0 183 | AndroidPreferredInstallLocation: 1 184 | aotOptions: 185 | stripEngineCode: 1 186 | iPhoneStrippingLevel: 0 187 | iPhoneScriptCallOptimization: 0 188 | ForceInternetPermission: 0 189 | ForceSDCardPermission: 0 190 | CreateWallpaper: 0 191 | APKExpansionFiles: 0 192 | keepLoadedShadersAlive: 0 193 | StripUnusedMeshComponents: 0 194 | VertexChannelCompressionMask: 4054 195 | iPhoneSdkVersion: 988 196 | iOSTargetOSVersionString: 11.0 197 | tvOSSdkVersion: 0 198 | tvOSRequireExtendedGameController: 0 199 | tvOSTargetOSVersionString: 11.0 200 | uIPrerenderedIcon: 0 201 | uIRequiresPersistentWiFi: 0 202 | uIRequiresFullScreen: 1 203 | uIStatusBarHidden: 1 204 | uIExitOnSuspend: 0 205 | uIStatusBarStyle: 0 206 | appleTVSplashScreen: {fileID: 0} 207 | appleTVSplashScreen2x: {fileID: 0} 208 | tvOSSmallIconLayers: [] 209 | tvOSSmallIconLayers2x: [] 210 | tvOSLargeIconLayers: [] 211 | tvOSLargeIconLayers2x: [] 212 | tvOSTopShelfImageLayers: [] 213 | tvOSTopShelfImageLayers2x: [] 214 | tvOSTopShelfImageWideLayers: [] 215 | tvOSTopShelfImageWideLayers2x: [] 216 | iOSLaunchScreenType: 0 217 | iOSLaunchScreenPortrait: {fileID: 0} 218 | iOSLaunchScreenLandscape: {fileID: 0} 219 | iOSLaunchScreenBackgroundColor: 220 | serializedVersion: 2 221 | rgba: 0 222 | iOSLaunchScreenFillPct: 100 223 | iOSLaunchScreenSize: 100 224 | iOSLaunchScreenCustomXibPath: 225 | iOSLaunchScreeniPadType: 0 226 | iOSLaunchScreeniPadImage: {fileID: 0} 227 | iOSLaunchScreeniPadBackgroundColor: 228 | serializedVersion: 2 229 | rgba: 0 230 | iOSLaunchScreeniPadFillPct: 100 231 | iOSLaunchScreeniPadSize: 100 232 | iOSLaunchScreeniPadCustomXibPath: 233 | iOSUseLaunchScreenStoryboard: 0 234 | iOSLaunchScreenCustomStoryboardPath: 235 | iOSDeviceRequirements: [] 236 | iOSURLSchemes: [] 237 | iOSBackgroundModes: 0 238 | iOSMetalForceHardShadows: 0 239 | metalEditorSupport: 1 240 | metalAPIValidation: 1 241 | iOSRenderExtraFrameOnPause: 0 242 | iosCopyPluginsCodeInsteadOfSymlink: 0 243 | appleDeveloperTeamID: 244 | iOSManualSigningProvisioningProfileID: 245 | tvOSManualSigningProvisioningProfileID: 246 | iOSManualSigningProvisioningProfileType: 0 247 | tvOSManualSigningProvisioningProfileType: 0 248 | appleEnableAutomaticSigning: 0 249 | iOSRequireARKit: 0 250 | iOSAutomaticallyDetectAndAddCapabilities: 1 251 | appleEnableProMotion: 0 252 | clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea 253 | templatePackageId: com.unity.template.3d@4.2.5 254 | templateDefaultScene: Assets/Scenes/SampleScene.unity 255 | AndroidTargetArchitectures: 1 256 | AndroidSplashScreenScale: 0 257 | androidSplashScreen: {fileID: 0} 258 | AndroidKeystoreName: 259 | AndroidKeyaliasName: 260 | AndroidBuildApkPerCpuArchitecture: 0 261 | AndroidTVCompatibility: 0 262 | AndroidIsGame: 1 263 | AndroidEnableTango: 0 264 | androidEnableBanner: 1 265 | androidUseLowAccuracyLocation: 0 266 | androidUseCustomKeystore: 0 267 | m_AndroidBanners: 268 | - width: 320 269 | height: 180 270 | banner: {fileID: 0} 271 | androidGamepadSupportLevel: 0 272 | AndroidMinifyWithR8: 0 273 | AndroidMinifyRelease: 0 274 | AndroidMinifyDebug: 0 275 | AndroidValidateAppBundleSize: 1 276 | AndroidAppBundleSizeToValidate: 150 277 | m_BuildTargetIcons: [] 278 | m_BuildTargetPlatformIcons: [] 279 | m_BuildTargetBatching: 280 | - m_BuildTarget: Standalone 281 | m_StaticBatching: 1 282 | m_DynamicBatching: 0 283 | - m_BuildTarget: tvOS 284 | m_StaticBatching: 1 285 | m_DynamicBatching: 0 286 | - m_BuildTarget: Android 287 | m_StaticBatching: 1 288 | m_DynamicBatching: 0 289 | - m_BuildTarget: iPhone 290 | m_StaticBatching: 1 291 | m_DynamicBatching: 0 292 | - m_BuildTarget: WebGL 293 | m_StaticBatching: 0 294 | m_DynamicBatching: 0 295 | m_BuildTargetGraphicsJobs: 296 | - m_BuildTarget: MacStandaloneSupport 297 | m_GraphicsJobs: 0 298 | - m_BuildTarget: Switch 299 | m_GraphicsJobs: 1 300 | - m_BuildTarget: MetroSupport 301 | m_GraphicsJobs: 1 302 | - m_BuildTarget: AppleTVSupport 303 | m_GraphicsJobs: 0 304 | - m_BuildTarget: BJMSupport 305 | m_GraphicsJobs: 1 306 | - m_BuildTarget: LinuxStandaloneSupport 307 | m_GraphicsJobs: 1 308 | - m_BuildTarget: PS4Player 309 | m_GraphicsJobs: 1 310 | - m_BuildTarget: iOSSupport 311 | m_GraphicsJobs: 0 312 | - m_BuildTarget: WindowsStandaloneSupport 313 | m_GraphicsJobs: 1 314 | - m_BuildTarget: XboxOnePlayer 315 | m_GraphicsJobs: 1 316 | - m_BuildTarget: LuminSupport 317 | m_GraphicsJobs: 0 318 | - m_BuildTarget: AndroidPlayer 319 | m_GraphicsJobs: 0 320 | - m_BuildTarget: WebGLSupport 321 | m_GraphicsJobs: 0 322 | m_BuildTargetGraphicsJobMode: 323 | - m_BuildTarget: PS4Player 324 | m_GraphicsJobMode: 0 325 | - m_BuildTarget: XboxOnePlayer 326 | m_GraphicsJobMode: 0 327 | m_BuildTargetGraphicsAPIs: 328 | - m_BuildTarget: AndroidPlayer 329 | m_APIs: 150000000b000000 330 | m_Automatic: 1 331 | - m_BuildTarget: iOSSupport 332 | m_APIs: 10000000 333 | m_Automatic: 1 334 | - m_BuildTarget: AppleTVSupport 335 | m_APIs: 10000000 336 | m_Automatic: 1 337 | - m_BuildTarget: WebGLSupport 338 | m_APIs: 0b000000 339 | m_Automatic: 1 340 | - m_BuildTarget: WindowsStandaloneSupport 341 | m_APIs: 02000000120000001500000011000000 342 | m_Automatic: 0 343 | - m_BuildTarget: MacStandaloneSupport 344 | m_APIs: 10000000 345 | m_Automatic: 1 346 | m_BuildTargetVRSettings: 347 | - m_BuildTarget: Standalone 348 | m_Enabled: 0 349 | m_Devices: 350 | - Oculus 351 | - OpenVR 352 | openGLRequireES31: 0 353 | openGLRequireES31AEP: 0 354 | openGLRequireES32: 0 355 | m_TemplateCustomTags: {} 356 | mobileMTRendering: 357 | Android: 1 358 | iPhone: 1 359 | tvOS: 1 360 | m_BuildTargetGroupLightmapEncodingQuality: [] 361 | m_BuildTargetGroupLightmapSettings: [] 362 | playModeTestRunnerEnabled: 0 363 | runPlayModeTestAsEditModeTest: 0 364 | actionOnDotNetUnhandledException: 1 365 | enableInternalProfiler: 0 366 | logObjCUncaughtExceptions: 1 367 | enableCrashReportAPI: 0 368 | cameraUsageDescription: 369 | locationUsageDescription: 370 | microphoneUsageDescription: 371 | switchNMETAOverride: 372 | switchNetLibKey: 373 | switchSocketMemoryPoolSize: 6144 374 | switchSocketAllocatorPoolSize: 128 375 | switchSocketConcurrencyLimit: 14 376 | switchScreenResolutionBehavior: 2 377 | switchUseCPUProfiler: 0 378 | switchUseGOLDLinker: 0 379 | switchApplicationID: 0x01004b9000490000 380 | switchNSODependencies: 381 | switchTitleNames_0: 382 | switchTitleNames_1: 383 | switchTitleNames_2: 384 | switchTitleNames_3: 385 | switchTitleNames_4: 386 | switchTitleNames_5: 387 | switchTitleNames_6: 388 | switchTitleNames_7: 389 | switchTitleNames_8: 390 | switchTitleNames_9: 391 | switchTitleNames_10: 392 | switchTitleNames_11: 393 | switchTitleNames_12: 394 | switchTitleNames_13: 395 | switchTitleNames_14: 396 | switchPublisherNames_0: 397 | switchPublisherNames_1: 398 | switchPublisherNames_2: 399 | switchPublisherNames_3: 400 | switchPublisherNames_4: 401 | switchPublisherNames_5: 402 | switchPublisherNames_6: 403 | switchPublisherNames_7: 404 | switchPublisherNames_8: 405 | switchPublisherNames_9: 406 | switchPublisherNames_10: 407 | switchPublisherNames_11: 408 | switchPublisherNames_12: 409 | switchPublisherNames_13: 410 | switchPublisherNames_14: 411 | switchIcons_0: {fileID: 0} 412 | switchIcons_1: {fileID: 0} 413 | switchIcons_2: {fileID: 0} 414 | switchIcons_3: {fileID: 0} 415 | switchIcons_4: {fileID: 0} 416 | switchIcons_5: {fileID: 0} 417 | switchIcons_6: {fileID: 0} 418 | switchIcons_7: {fileID: 0} 419 | switchIcons_8: {fileID: 0} 420 | switchIcons_9: {fileID: 0} 421 | switchIcons_10: {fileID: 0} 422 | switchIcons_11: {fileID: 0} 423 | switchIcons_12: {fileID: 0} 424 | switchIcons_13: {fileID: 0} 425 | switchIcons_14: {fileID: 0} 426 | switchSmallIcons_0: {fileID: 0} 427 | switchSmallIcons_1: {fileID: 0} 428 | switchSmallIcons_2: {fileID: 0} 429 | switchSmallIcons_3: {fileID: 0} 430 | switchSmallIcons_4: {fileID: 0} 431 | switchSmallIcons_5: {fileID: 0} 432 | switchSmallIcons_6: {fileID: 0} 433 | switchSmallIcons_7: {fileID: 0} 434 | switchSmallIcons_8: {fileID: 0} 435 | switchSmallIcons_9: {fileID: 0} 436 | switchSmallIcons_10: {fileID: 0} 437 | switchSmallIcons_11: {fileID: 0} 438 | switchSmallIcons_12: {fileID: 0} 439 | switchSmallIcons_13: {fileID: 0} 440 | switchSmallIcons_14: {fileID: 0} 441 | switchManualHTML: 442 | switchAccessibleURLs: 443 | switchLegalInformation: 444 | switchMainThreadStackSize: 1048576 445 | switchPresenceGroupId: 446 | switchLogoHandling: 0 447 | switchReleaseVersion: 0 448 | switchDisplayVersion: 1.0.0 449 | switchStartupUserAccount: 0 450 | switchTouchScreenUsage: 0 451 | switchSupportedLanguagesMask: 0 452 | switchLogoType: 0 453 | switchApplicationErrorCodeCategory: 454 | switchUserAccountSaveDataSize: 0 455 | switchUserAccountSaveDataJournalSize: 0 456 | switchApplicationAttribute: 0 457 | switchCardSpecSize: -1 458 | switchCardSpecClock: -1 459 | switchRatingsMask: 0 460 | switchRatingsInt_0: 0 461 | switchRatingsInt_1: 0 462 | switchRatingsInt_2: 0 463 | switchRatingsInt_3: 0 464 | switchRatingsInt_4: 0 465 | switchRatingsInt_5: 0 466 | switchRatingsInt_6: 0 467 | switchRatingsInt_7: 0 468 | switchRatingsInt_8: 0 469 | switchRatingsInt_9: 0 470 | switchRatingsInt_10: 0 471 | switchRatingsInt_11: 0 472 | switchRatingsInt_12: 0 473 | switchLocalCommunicationIds_0: 474 | switchLocalCommunicationIds_1: 475 | switchLocalCommunicationIds_2: 476 | switchLocalCommunicationIds_3: 477 | switchLocalCommunicationIds_4: 478 | switchLocalCommunicationIds_5: 479 | switchLocalCommunicationIds_6: 480 | switchLocalCommunicationIds_7: 481 | switchParentalControl: 0 482 | switchAllowsScreenshot: 1 483 | switchAllowsVideoCapturing: 1 484 | switchAllowsRuntimeAddOnContentInstall: 0 485 | switchDataLossConfirmation: 0 486 | switchUserAccountLockEnabled: 0 487 | switchSystemResourceMemory: 16777216 488 | switchSupportedNpadStyles: 22 489 | switchNativeFsCacheSize: 32 490 | switchIsHoldTypeHorizontal: 0 491 | switchSupportedNpadCount: 8 492 | switchSocketConfigEnabled: 0 493 | switchTcpInitialSendBufferSize: 32 494 | switchTcpInitialReceiveBufferSize: 64 495 | switchTcpAutoSendBufferSizeMax: 256 496 | switchTcpAutoReceiveBufferSizeMax: 256 497 | switchUdpSendBufferSize: 9 498 | switchUdpReceiveBufferSize: 42 499 | switchSocketBufferEfficiency: 4 500 | switchSocketInitializeEnabled: 1 501 | switchNetworkInterfaceManagerInitializeEnabled: 1 502 | switchPlayerConnectionEnabled: 1 503 | ps4NPAgeRating: 12 504 | ps4NPTitleSecret: 505 | ps4NPTrophyPackPath: 506 | ps4ParentalLevel: 11 507 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 508 | ps4Category: 0 509 | ps4MasterVersion: 01.00 510 | ps4AppVersion: 01.00 511 | ps4AppType: 0 512 | ps4ParamSfxPath: 513 | ps4VideoOutPixelFormat: 0 514 | ps4VideoOutInitialWidth: 1920 515 | ps4VideoOutBaseModeInitialWidth: 1920 516 | ps4VideoOutReprojectionRate: 60 517 | ps4PronunciationXMLPath: 518 | ps4PronunciationSIGPath: 519 | ps4BackgroundImagePath: 520 | ps4StartupImagePath: 521 | ps4StartupImagesFolder: 522 | ps4IconImagesFolder: 523 | ps4SaveDataImagePath: 524 | ps4SdkOverride: 525 | ps4BGMPath: 526 | ps4ShareFilePath: 527 | ps4ShareOverlayImagePath: 528 | ps4PrivacyGuardImagePath: 529 | ps4ExtraSceSysFile: 530 | ps4NPtitleDatPath: 531 | ps4RemotePlayKeyAssignment: -1 532 | ps4RemotePlayKeyMappingDir: 533 | ps4PlayTogetherPlayerCount: 0 534 | ps4EnterButtonAssignment: 1 535 | ps4ApplicationParam1: 0 536 | ps4ApplicationParam2: 0 537 | ps4ApplicationParam3: 0 538 | ps4ApplicationParam4: 0 539 | ps4DownloadDataSize: 0 540 | ps4GarlicHeapSize: 2048 541 | ps4ProGarlicHeapSize: 2560 542 | playerPrefsMaxSize: 32768 543 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 544 | ps4pnSessions: 1 545 | ps4pnPresence: 1 546 | ps4pnFriends: 1 547 | ps4pnGameCustomData: 1 548 | playerPrefsSupport: 0 549 | enableApplicationExit: 0 550 | resetTempFolder: 1 551 | restrictedAudioUsageRights: 0 552 | ps4UseResolutionFallback: 0 553 | ps4ReprojectionSupport: 0 554 | ps4UseAudio3dBackend: 0 555 | ps4UseLowGarlicFragmentationMode: 1 556 | ps4SocialScreenEnabled: 0 557 | ps4ScriptOptimizationLevel: 0 558 | ps4Audio3dVirtualSpeakerCount: 14 559 | ps4attribCpuUsage: 0 560 | ps4PatchPkgPath: 561 | ps4PatchLatestPkgPath: 562 | ps4PatchChangeinfoPath: 563 | ps4PatchDayOne: 0 564 | ps4attribUserManagement: 0 565 | ps4attribMoveSupport: 0 566 | ps4attrib3DSupport: 0 567 | ps4attribShareSupport: 0 568 | ps4attribExclusiveVR: 0 569 | ps4disableAutoHideSplash: 0 570 | ps4videoRecordingFeaturesUsed: 0 571 | ps4contentSearchFeaturesUsed: 0 572 | ps4CompatibilityPS5: 0 573 | ps4GPU800MHz: 1 574 | ps4attribEyeToEyeDistanceSettingVR: 0 575 | ps4IncludedModules: [] 576 | ps4attribVROutputEnabled: 0 577 | monoEnv: 578 | splashScreenBackgroundSourceLandscape: {fileID: 0} 579 | splashScreenBackgroundSourcePortrait: {fileID: 0} 580 | blurSplashScreenBackground: 1 581 | spritePackerPolicy: 582 | webGLMemorySize: 16 583 | webGLExceptionSupport: 1 584 | webGLNameFilesAsHashes: 0 585 | webGLDataCaching: 1 586 | webGLDebugSymbols: 0 587 | webGLEmscriptenArgs: 588 | webGLModulesDirectory: 589 | webGLTemplate: APPLICATION:Default 590 | webGLAnalyzeBuildSize: 0 591 | webGLUseEmbeddedResources: 0 592 | webGLCompressionFormat: 1 593 | webGLWasmArithmeticExceptions: 0 594 | webGLLinkerTarget: 1 595 | webGLThreadsSupport: 0 596 | webGLDecompressionFallback: 0 597 | scriptingDefineSymbols: {} 598 | platformArchitecture: {} 599 | scriptingBackend: {} 600 | il2cppCompilerConfiguration: {} 601 | managedStrippingLevel: {} 602 | incrementalIl2cppBuild: {} 603 | suppressCommonWarnings: 1 604 | allowUnsafeCode: 1 605 | useDeterministicCompilation: 1 606 | additionalIl2CppArgs: 607 | scriptingRuntimeVersion: 1 608 | gcIncremental: 0 609 | gcWBarrierValidation: 0 610 | apiCompatibilityLevelPerPlatform: {} 611 | m_RenderingPath: 1 612 | m_MobileRenderingPath: 1 613 | metroPackageName: Template_3D 614 | metroPackageVersion: 615 | metroCertificatePath: 616 | metroCertificatePassword: 617 | metroCertificateSubject: 618 | metroCertificateIssuer: 619 | metroCertificateNotAfter: 0000000000000000 620 | metroApplicationDescription: Template_3D 621 | wsaImages: {} 622 | metroTileShortName: 623 | metroTileShowName: 0 624 | metroMediumTileShowName: 0 625 | metroLargeTileShowName: 0 626 | metroWideTileShowName: 0 627 | metroSupportStreamingInstall: 0 628 | metroLastRequiredScene: 0 629 | metroDefaultTileSize: 1 630 | metroTileForegroundText: 2 631 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 632 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 633 | a: 1} 634 | metroSplashScreenUseBackgroundColor: 0 635 | platformCapabilities: {} 636 | metroTargetDeviceFamilies: {} 637 | metroFTAName: 638 | metroFTAFileTypes: [] 639 | metroProtocolName: 640 | XboxOneProductId: 641 | XboxOneUpdateKey: 642 | XboxOneSandboxId: 643 | XboxOneContentId: 644 | XboxOneTitleId: 645 | XboxOneSCId: 646 | XboxOneGameOsOverridePath: 647 | XboxOnePackagingOverridePath: 648 | XboxOneAppManifestOverridePath: 649 | XboxOneVersion: 1.0.0.0 650 | XboxOnePackageEncryption: 0 651 | XboxOnePackageUpdateGranularity: 2 652 | XboxOneDescription: 653 | XboxOneLanguage: 654 | - enus 655 | XboxOneCapability: [] 656 | XboxOneGameRating: {} 657 | XboxOneIsContentPackage: 0 658 | XboxOneEnableGPUVariability: 1 659 | XboxOneSockets: {} 660 | XboxOneSplashScreen: {fileID: 0} 661 | XboxOneAllowedProductIds: [] 662 | XboxOnePersistentLocalStorageSize: 0 663 | XboxOneXTitleMemory: 8 664 | XboxOneOverrideIdentityName: 665 | XboxOneOverrideIdentityPublisher: 666 | vrEditorSettings: 667 | daydream: 668 | daydreamIconForeground: {fileID: 0} 669 | daydreamIconBackground: {fileID: 0} 670 | cloudServicesEnabled: 671 | UNet: 1 672 | luminIcon: 673 | m_Name: 674 | m_ModelFolderPath: 675 | m_PortalFolderPath: 676 | luminCert: 677 | m_CertPath: 678 | m_SignPackage: 1 679 | luminIsChannelApp: 0 680 | luminVersion: 681 | m_VersionCode: 1 682 | m_VersionName: 683 | apiCompatibilityLevel: 6 684 | cloudProjectId: 685 | framebufferDepthMemorylessMode: 0 686 | projectName: 687 | organizationId: 688 | cloudEnabled: 0 689 | enableNativePlatformBackendsForNewInputSystem: 0 690 | disableOldInputManagerSupport: 0 691 | legacyClampBlendShapeWeights: 0 692 | virtualTexturingSupportEnabled: 0 693 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2020.1.16f1 2 | m_EditorVersionWithRevision: 2020.1.16f1 (f483ad6465d6) 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: 0 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Normal 11 | pixelLightCount: 4 12 | shadows: 2 13 | shadowResolution: 2 14 | shadowProjection: 1 15 | shadowCascades: 4 16 | shadowDistance: 150 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 1 21 | skinWeights: 4 22 | textureQuality: 0 23 | anisotropicTextures: 1 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 1 27 | realtimeReflectionProbes: 1 28 | billboardsFaceCameraPosition: 1 29 | vSyncCount: 0 30 | lodBias: 2 31 | maximumLODLevel: 0 32 | streamingMipmapsActive: 0 33 | streamingMipmapsAddAllCameras: 1 34 | streamingMipmapsMemoryBudget: 512 35 | streamingMipmapsRenderersPerFrame: 512 36 | streamingMipmapsMaxLevelReduction: 2 37 | streamingMipmapsMaxFileIORequests: 1024 38 | particleRaycastBudget: 4096 39 | asyncUploadTimeSlice: 2 40 | asyncUploadBufferSize: 16 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | customRenderPipeline: {fileID: 0} 44 | excludedTargetPlatforms: [] 45 | m_PerPlatformDefaultQuality: 46 | Android: 0 47 | Lumin: 0 48 | Nintendo 3DS: 0 49 | Nintendo Switch: 0 50 | PS4: 0 51 | PSP2: 0 52 | Stadia: 0 53 | Standalone: 0 54 | WebGL: 0 55 | Windows Store Apps: 0 56 | XboxOne: 0 57 | iPhone: 0 58 | tvOS: 0 59 | -------------------------------------------------------------------------------- /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 | - 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.02 7 | Maximum Allowed Timestep: 0.33333334 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: 0 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: 0 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/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_CollabEditorSettings: 8 | inProgressEnabled: 1 9 | -------------------------------------------------------------------------------- /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 | # Unity 2020.1 Mesh API improvements examples 2 | 3 | Unity 2020.1 adds `MeshData` APIs for C# Jobs/Burst compatible way of reading & writing Mesh data; see [overview document](https://docs.google.com/document/d/1QC7NV7JQcvibeelORJvsaTReTyszllOlxdfEsaVL2oA/edit). 4 | 5 | This repository contains several small examples of that. Required Unity version is **2020.1** or later. 6 | 7 | When on Unity 2021.2 or later version, the examples also show how to use GPU Compute Shaders to 8 | access and modify Mesh vertex buffers. 9 | 10 | ## Procedural Water/Wave Mesh 11 | 12 | A simple example where a dense "water" surface mesh is updated every frame, based on positions on "wave source" objects. 13 | 14 | ![Water](/Images/Water.png?raw=true "Water") 15 | 16 | `Assets/ProceduralWaterMesh` is the sample scene and code. Each vertex of the resulting mesh is completely independent of others, and 17 | only depends on positions of the "wave source" objects. 18 | Using C# Job System and Burst to compute all vertex positions in parallel brings 19 | some nice speedups. The sample also implements a similar computation using a GPU compute 20 | shader to modify the Mesh vertex buffer, for comparison. 21 | 22 | Frame times on 400x400 water mesh, with 10 wave source objects, on 2019 MacBookPro (Core i9 2.4GHz, Radeon Pro 5500M); note that these are full frame times including rendering: 23 | 24 | - Single threaded C#: 155ms 25 | - Single threaded Burst: 38ms 26 | - Multi threaded Burst: 9ms 27 | - GPU compute shader: 4ms 28 | 29 | Same scene on Windows, AMD ThreadRipper 1950X 3.4GHz w/ 16 threads, GeForce GTX 1080Ti, DX11: 30 | 31 | - Single threaded C#: 208ms 32 | - Single threaded Burst: 45ms 33 | - Multi threaded Burst: 11ms 34 | - GPU compute shader: 2ms 35 | 36 | 37 | ## Noise Ball 38 | 39 | A mesh with procedural simplex noise driven mesh. The mesh positions and normals are updated 40 | every frame, using either CPU code or a GPU compute shader. Based on 41 | [NoiseBall2](https://github.com/keijiro/NoiseBall2) by Keijiro Takahashi. 42 | 43 | ![NoiseBall](/Images/NoiseBall.png?raw=true "NoiseBall") 44 | 45 | `Assets/NoiseBall` is the sample scene and code. Implementation is very similar to the 46 | water sample above. 47 | 48 | Frame times on a 300 thousand triangle mesh, on 2019 MacBookPro; note that these are full frame times including rendering: 49 | 50 | - Single threaded C#: 2723ms 51 | - Single threaded Burst: 187ms 52 | - Multi threaded Burst: 22ms 53 | - GPU compute shader: 14ms 54 | 55 | Same scene on Windows, AMD ThreadRipper 1950X 3.4GHz w/ 16 threads, GeForce GTX 1080Ti, DX11: 56 | 57 | - Single threaded C#: 3368ms 58 | - Single threaded Burst: 184ms 59 | - Multi threaded Burst: 22ms 60 | - GPU compute shader: 6ms 61 | 62 | 63 | ## Combine Many Input Meshes Into One 64 | 65 | A more complex example, where for some hypothetical tooling there's a need to process geometry of many input Meshes, and produce 66 | an output Mesh. Here, all input meshes are transformed into world space, and a giant output mesh is created that is the union of 67 | all input meshes. This is very similar to how Static Batching in Unity works. 68 | 69 | ![Combine1](/Images/Combine1.png?raw=true "Combine 1") 70 | ![Combine2](/Images/Combine2.png?raw=true "Combine 2") 71 | 72 | `Assets/CreateMeshFromAllSceneMeshes` is the sample scene and code. The script registers two menu items under `Mesh API Test` 73 | top-level menu; both do the same thing just one uses "traditional" Mesh API and does everything on the main thread, whereas 74 | the other uses 2020.1 new APIs to do it in C# Jobs with Burst. 75 | 76 | Numbers for 11466 input objects, total 4.6M vertices, on 2018 MacBookPro (Core i9 2.9GHz): 77 | 78 | - Regular API: 760ms (and 23k GC allocations totaling 640MB) 79 | - Jobs+Burst: 60ms (0.3MB GC allocations) 80 | 81 | Same scene on Windows, AMD ThreadRipper 1950X 3.4GHz w/ 16 threads: 82 | 83 | - Regular API: 920ms 84 | - Jobs+Burst: 70ms 85 | --------------------------------------------------------------------------------