├── .gitattributes ├── .gitignore ├── Assets ├── Main.meta ├── Main.unity ├── Main.unity.meta ├── Main │ ├── LightmapSnapshot.asset │ ├── LightmapSnapshot.asset.meta │ ├── SkyboxProbe-0.exr │ └── SkyboxProbe-0.exr.meta ├── MainSettings.lighting ├── MainSettings.lighting.meta ├── Resources.meta ├── Resources │ ├── Materials.meta │ ├── Materials │ │ ├── Default.mat │ │ ├── Default.mat.meta │ │ ├── Transparent.mat │ │ └── Transparent.mat.meta │ ├── Prefabs.meta │ ├── Prefabs │ │ ├── GUI.meta │ │ ├── GUI │ │ │ ├── Crosshair.prefab │ │ │ ├── Crosshair.prefab.meta │ │ │ ├── GUI.prefab │ │ │ └── GUI.prefab.meta │ │ ├── Scene.meta │ │ └── Scene │ │ │ ├── Chunk.prefab │ │ │ ├── Chunk.prefab.meta │ │ │ ├── Directional light.prefab │ │ │ └── Directional light.prefab.meta │ ├── Textures.meta │ └── Textures │ │ ├── Crosshair.png │ │ ├── Crosshair.png.meta │ │ ├── Dirt.png │ │ ├── Dirt.png.meta │ │ ├── Texture.png │ │ └── Texture.png.meta ├── Scripts.meta └── Scripts │ ├── GUI.meta │ ├── GUI │ ├── LoadingScreen.cs │ ├── LoadingScreen.cs.meta │ ├── PlayerGUI.cs │ └── PlayerGUI.cs.meta │ ├── Lib.meta │ ├── Lib │ ├── Vector3i.cs │ └── Vector3i.cs.meta │ ├── Player.meta │ ├── Player │ ├── FPController.cs │ ├── FPController.cs.meta │ ├── PlayerController.cs │ ├── PlayerController.cs.meta │ ├── PlayerHotbar.cs │ ├── PlayerHotbar.cs.meta │ ├── PlayerInventory.cs │ ├── PlayerInventory.cs.meta │ ├── PlayerOptions.cs │ └── PlayerOptions.cs.meta │ ├── Terrain.meta │ └── Terrain │ ├── Blocks.cs │ ├── Blocks.cs.meta │ ├── Chunk.meta │ ├── Chunk │ ├── Chunk.cs │ ├── Chunk.cs.meta │ ├── ChunkLoadingQueue.cs │ ├── ChunkLoadingQueue.cs.meta │ ├── ChunkManager.cs │ ├── ChunkManager.cs.meta │ ├── MeshCreator.cs │ └── MeshCreator.cs.meta │ ├── Generator.meta │ ├── Generator │ ├── TerrainGenerator.cs │ └── TerrainGenerator.cs.meta │ ├── ModifyTerrain.cs │ ├── ModifyTerrain.cs.meta │ ├── SimplexNoise.cs │ ├── SimplexNoise.cs.meta │ ├── VoxelTerrain.cs │ └── VoxelTerrain.cs.meta ├── LICENSE ├── Packages ├── manifest.json └── packages-lock.json ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── MemorySettings.asset ├── NavMeshAreas.asset ├── NavMeshLayers.asset ├── NetworkManager.asset ├── PackageManagerSettings.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── SceneTemplateSettings.json ├── TagManager.asset ├── TimeManager.asset ├── UnityConnectSettings.asset ├── VFXManager.asset ├── VersionControlSettings.asset └── XRSettings.asset ├── README.md ├── logo.png └── screenshots ├── screenshot1.png ├── screenshot2.png ├── screenshot3.png └── screenshot4.png /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Uu]ser[Ss]ettings/ 12 | 13 | # MemoryCaptures can get excessive in size. 14 | # They also could contain extremely sensitive data 15 | /[Mm]emoryCaptures/ 16 | 17 | # Recordings can get excessive in size 18 | /[Rr]ecordings/ 19 | 20 | # Uncomment this line if you wish to ignore the asset store tools plugin 21 | # /[Aa]ssets/AssetStoreTools* 22 | 23 | # Autogenerated Jetbrains Rider plugin 24 | /[Aa]ssets/Plugins/Editor/JetBrains* 25 | 26 | # Visual Studio cache directory 27 | .vs/ 28 | 29 | # Gradle cache directory 30 | .gradle/ 31 | 32 | # Autogenerated VS/MD/Consulo solution and project files 33 | ExportedObj/ 34 | .consulo/ 35 | *.csproj 36 | *.unityproj 37 | *.sln 38 | *.suo 39 | *.tmp 40 | *.user 41 | *.userprefs 42 | *.pidb 43 | *.booproj 44 | *.svd 45 | *.pdb 46 | *.mdb 47 | *.opendb 48 | *.VC.db 49 | 50 | # Unity3D generated meta files 51 | *.pidb.meta 52 | *.pdb.meta 53 | *.mdb.meta 54 | 55 | # Unity3D generated file on crash reports 56 | sysinfo.txt 57 | 58 | # Builds 59 | *.apk 60 | *.aab 61 | *.unitypackage 62 | *.app 63 | 64 | # Crashlytics generated file 65 | crashlytics-build.properties 66 | 67 | # Packed Addressables 68 | /[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* 69 | 70 | # Temporary auto-generated Android Assets 71 | /[Aa]ssets/[Ss]treamingAssets/aa.meta 72 | /[Aa]ssets/[Ss]treamingAssets/aa/* 73 | 74 | # Hide MacOS files 75 | .DS_Store -------------------------------------------------------------------------------- /Assets/Main.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 60f8cc72db034e7409a314ce28d87a2c 3 | folderAsset: yes 4 | timeCreated: 1430667102 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Main.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lischilpp/unity-voxel-engine/d1bd489bdbadab976ec28e179303d296b0ffba0c/Assets/Main.unity -------------------------------------------------------------------------------- /Assets/Main.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5f33360035dbc744a8b7db69edd887d5 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Main/LightmapSnapshot.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lischilpp/unity-voxel-engine/d1bd489bdbadab976ec28e179303d296b0ffba0c/Assets/Main/LightmapSnapshot.asset -------------------------------------------------------------------------------- /Assets/Main/LightmapSnapshot.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b5612c23d2ef14448ad364b98ff64163 3 | timeCreated: 1430667181 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Main/SkyboxProbe-0.exr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lischilpp/unity-voxel-engine/d1bd489bdbadab976ec28e179303d296b0ffba0c/Assets/Main/SkyboxProbe-0.exr -------------------------------------------------------------------------------- /Assets/Main/SkyboxProbe-0.exr.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b1af6bd152eb7aa43be90f5b76095938 3 | timeCreated: 1430667181 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: 7 | 8900000: generatedCubemap 8 | serializedVersion: 2 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 1 12 | linearTexture: 0 13 | correctGamma: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: .25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | grayScaleToAlpha: 0 25 | generateCubemap: 6 26 | cubemapConvolution: 1 27 | cubemapConvolutionSteps: 8 28 | cubemapConvolutionExponent: 1.5 29 | seamlessCubemap: 1 30 | textureFormat: -3 31 | maxTextureSize: 2048 32 | textureSettings: 33 | filterMode: 2 34 | aniso: 0 35 | mipBias: 0 36 | wrapMode: 1 37 | nPOTScale: 1 38 | lightmap: 0 39 | rGBM: 0 40 | compressionQuality: 100 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: .5, y: .5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | textureType: 3 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | sprites: [] 53 | spritePackingTag: 54 | userData: 55 | assetBundleName: 56 | assetBundleVariant: 57 | -------------------------------------------------------------------------------- /Assets/MainSettings.lighting: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lischilpp/unity-voxel-engine/d1bd489bdbadab976ec28e179303d296b0ffba0c/Assets/MainSettings.lighting -------------------------------------------------------------------------------- /Assets/MainSettings.lighting.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ffe522b305b5d4dc5ab2b385e3a0110e 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 4890085278179872738 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a8ba2a42118002e41a449f807ec71e4e 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Resources/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 090e05a3fcffb454b8191980cac6b05c 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Resources/Materials/Default.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: Default 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: _ALPHATEST_ON _EMISSION 13 | m_LightmapFlags: 1 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: 2450 17 | stringTagMap: 18 | RenderType: TransparentCutout 19 | disabledShaderPasses: [] 20 | m_SavedProperties: 21 | serializedVersion: 3 22 | m_TexEnvs: 23 | - _BackTex: 24 | m_Texture: {fileID: 0} 25 | m_Scale: {x: 1, y: 1} 26 | m_Offset: {x: 0, y: 0} 27 | - _BlurTex: 28 | m_Texture: {fileID: 0} 29 | m_Scale: {x: 1, y: 1} 30 | m_Offset: {x: 0, y: 0} 31 | - _BumpMap: 32 | m_Texture: {fileID: 0} 33 | m_Scale: {x: 1, y: 1} 34 | m_Offset: {x: 0, y: 0} 35 | - _Control: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | - _Cube: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - _CutTex: 44 | m_Texture: {fileID: 0} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _DetailAlbedoMap: 48 | m_Texture: {fileID: 0} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _DetailMask: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _DetailNormalMap: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | - _DetailTex: 60 | m_Texture: {fileID: 0} 61 | m_Scale: {x: 1, y: 1} 62 | m_Offset: {x: 0, y: 0} 63 | - _DownTex: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | - _EmissionMap: 68 | m_Texture: {fileID: 0} 69 | m_Scale: {x: 1, y: 1} 70 | m_Offset: {x: 0, y: 0} 71 | - _FrontTex: 72 | m_Texture: {fileID: 0} 73 | m_Scale: {x: 1, y: 1} 74 | m_Offset: {x: 0, y: 0} 75 | - _LeftTex: 76 | m_Texture: {fileID: 0} 77 | m_Scale: {x: 1, y: 1} 78 | m_Offset: {x: 0, y: 0} 79 | - _MainTex: 80 | m_Texture: {fileID: 2800000, guid: e7af95decec559148be9384b1d17e9c0, type: 3} 81 | m_Scale: {x: 1, y: 1} 82 | m_Offset: {x: 0, y: 0} 83 | - _MetallicGlossMap: 84 | m_Texture: {fileID: 0} 85 | m_Scale: {x: 1, y: 1} 86 | m_Offset: {x: 0, y: 0} 87 | - _Normal0: 88 | m_Texture: {fileID: 0} 89 | m_Scale: {x: 1, y: 1} 90 | m_Offset: {x: 0, y: 0} 91 | - _Normal1: 92 | m_Texture: {fileID: 0} 93 | m_Scale: {x: 1, y: 1} 94 | m_Offset: {x: 0, y: 0} 95 | - _Normal2: 96 | m_Texture: {fileID: 0} 97 | m_Scale: {x: 1, y: 1} 98 | m_Offset: {x: 0, y: 0} 99 | - _Normal3: 100 | m_Texture: {fileID: 0} 101 | m_Scale: {x: 1, y: 1} 102 | m_Offset: {x: 0, y: 0} 103 | - _OcclusionMap: 104 | m_Texture: {fileID: 0} 105 | m_Scale: {x: 1, y: 1} 106 | m_Offset: {x: 0, y: 0} 107 | - _ParallaxMap: 108 | m_Texture: {fileID: 0} 109 | m_Scale: {x: 1, y: 1} 110 | m_Offset: {x: 0, y: 0} 111 | - _RightTex: 112 | m_Texture: {fileID: 0} 113 | m_Scale: {x: 1, y: 1} 114 | m_Offset: {x: 0, y: 0} 115 | - _SecondTex: 116 | m_Texture: {fileID: 0} 117 | m_Scale: {x: 1, y: 1} 118 | m_Offset: {x: 0, y: 0} 119 | - _SpecGlossMap: 120 | m_Texture: {fileID: 0} 121 | m_Scale: {x: 1, y: 1} 122 | m_Offset: {x: 0, y: 0} 123 | - _Splat0: 124 | m_Texture: {fileID: 0} 125 | m_Scale: {x: 1, y: 1} 126 | m_Offset: {x: 0, y: 0} 127 | - _Splat1: 128 | m_Texture: {fileID: 0} 129 | m_Scale: {x: 1, y: 1} 130 | m_Offset: {x: 0, y: 0} 131 | - _Splat2: 132 | m_Texture: {fileID: 0} 133 | m_Scale: {x: 1, y: 1} 134 | m_Offset: {x: 0, y: 0} 135 | - _Splat3: 136 | m_Texture: {fileID: 0} 137 | m_Scale: {x: 1, y: 1} 138 | m_Offset: {x: 0, y: 0} 139 | - _Thickness: 140 | m_Texture: {fileID: 0} 141 | m_Scale: {x: 1, y: 1} 142 | m_Offset: {x: 0, y: 0} 143 | - _UpTex: 144 | m_Texture: {fileID: 0} 145 | m_Scale: {x: 1, y: 1} 146 | m_Offset: {x: 0, y: 0} 147 | - _Vignette: 148 | m_Texture: {fileID: 0} 149 | m_Scale: {x: 1, y: 1} 150 | m_Offset: {x: 0, y: 0} 151 | m_Floats: 152 | - PixelSnap: 0 153 | - _Amount: 0.2 154 | - _BumpScale: 1 155 | - _Cull: 2 156 | - _Cutoff: 0.437 157 | - _DetailNormalMapScale: 1 158 | - _Distortion: 0 159 | - _DstBlend: 0 160 | - _EmissionScaleUI: 0 161 | - _GlossMapScale: 1 162 | - _Glossiness: 0 163 | - _GlossyReflections: 1 164 | - _Metallic: 0 165 | - _Metallic0: 0 166 | - _Metallic1: 0 167 | - _Metallic2: 0 168 | - _Metallic3: 0 169 | - _Mode: 1 170 | - _OcclusionStrength: 1 171 | - _Parallax: 0.02 172 | - _Power: 1 173 | - _Scale: 0.5 174 | - _Shininess: 0.078125 175 | - _Smoothness: 0 176 | - _SmoothnessTextureChannel: 0 177 | - _SpecularHighlights: 1 178 | - _SrcBlend: 1 179 | - _Threshold: 0.1 180 | - _UVSec: 1 181 | - _WindQuality: 0 182 | - _ZWrite: 1 183 | m_Colors: 184 | - _Color: {r: 1, g: 1, b: 1, a: 1} 185 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 0} 186 | - _EmissionColorUI: {r: 1, g: 1, b: 1, a: 1} 187 | - _HueVariation: {r: 1, g: 0.5, b: 0, a: 0.1} 188 | - _MainColor: {r: 1, g: 1, b: 1, a: 1} 189 | - _ReflectColor: {r: 1, g: 1, b: 1, a: 0.5} 190 | - _SecondColor: {r: 1, g: 1, b: 1, a: 1} 191 | - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0} 192 | - _SubColor: {r: 1, g: 1, b: 1, a: 1} 193 | - _Tint: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} 194 | -------------------------------------------------------------------------------- /Assets/Resources/Materials/Default.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1862f4e1da7ade64cbf658561c36901b 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Resources/Materials/Transparent.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: Transparent 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: _ALPHABLEND_ON _EMISSION 13 | m_LightmapFlags: 1 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: 3000 17 | stringTagMap: 18 | RenderType: Transparent 19 | disabledShaderPasses: [] 20 | m_SavedProperties: 21 | serializedVersion: 3 22 | m_TexEnvs: 23 | - _BackTex: 24 | m_Texture: {fileID: 0} 25 | m_Scale: {x: 1, y: 1} 26 | m_Offset: {x: 0, y: 0} 27 | - _BlurTex: 28 | m_Texture: {fileID: 0} 29 | m_Scale: {x: 1, y: 1} 30 | m_Offset: {x: 0, y: 0} 31 | - _BumpMap: 32 | m_Texture: {fileID: 0} 33 | m_Scale: {x: 1, y: 1} 34 | m_Offset: {x: 0, y: 0} 35 | - _Control: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | - _Cube: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - _CutTex: 44 | m_Texture: {fileID: 0} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _DetailAlbedoMap: 48 | m_Texture: {fileID: 0} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _DetailMask: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _DetailNormalMap: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | - _DetailTex: 60 | m_Texture: {fileID: 0} 61 | m_Scale: {x: 1, y: 1} 62 | m_Offset: {x: 0, y: 0} 63 | - _DownTex: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | - _EmissionMap: 68 | m_Texture: {fileID: 0} 69 | m_Scale: {x: 1, y: 1} 70 | m_Offset: {x: 0, y: 0} 71 | - _FrontTex: 72 | m_Texture: {fileID: 0} 73 | m_Scale: {x: 1, y: 1} 74 | m_Offset: {x: 0, y: 0} 75 | - _LeftTex: 76 | m_Texture: {fileID: 0} 77 | m_Scale: {x: 1, y: 1} 78 | m_Offset: {x: 0, y: 0} 79 | - _MainTex: 80 | m_Texture: {fileID: 2800000, guid: e7af95decec559148be9384b1d17e9c0, type: 3} 81 | m_Scale: {x: 1, y: 1} 82 | m_Offset: {x: 0, y: 0} 83 | - _MetallicGlossMap: 84 | m_Texture: {fileID: 0} 85 | m_Scale: {x: 1, y: 1} 86 | m_Offset: {x: 0, y: 0} 87 | - _Normal0: 88 | m_Texture: {fileID: 0} 89 | m_Scale: {x: 1, y: 1} 90 | m_Offset: {x: 0, y: 0} 91 | - _Normal1: 92 | m_Texture: {fileID: 0} 93 | m_Scale: {x: 1, y: 1} 94 | m_Offset: {x: 0, y: 0} 95 | - _Normal2: 96 | m_Texture: {fileID: 0} 97 | m_Scale: {x: 1, y: 1} 98 | m_Offset: {x: 0, y: 0} 99 | - _Normal3: 100 | m_Texture: {fileID: 0} 101 | m_Scale: {x: 1, y: 1} 102 | m_Offset: {x: 0, y: 0} 103 | - _OcclusionMap: 104 | m_Texture: {fileID: 0} 105 | m_Scale: {x: 1, y: 1} 106 | m_Offset: {x: 0, y: 0} 107 | - _ParallaxMap: 108 | m_Texture: {fileID: 0} 109 | m_Scale: {x: 1, y: 1} 110 | m_Offset: {x: 0, y: 0} 111 | - _RightTex: 112 | m_Texture: {fileID: 0} 113 | m_Scale: {x: 1, y: 1} 114 | m_Offset: {x: 0, y: 0} 115 | - _SecondTex: 116 | m_Texture: {fileID: 0} 117 | m_Scale: {x: 1, y: 1} 118 | m_Offset: {x: 0, y: 0} 119 | - _SpecGlossMap: 120 | m_Texture: {fileID: 0} 121 | m_Scale: {x: 1, y: 1} 122 | m_Offset: {x: 0, y: 0} 123 | - _Splat0: 124 | m_Texture: {fileID: 0} 125 | m_Scale: {x: 1, y: 1} 126 | m_Offset: {x: 0, y: 0} 127 | - _Splat1: 128 | m_Texture: {fileID: 0} 129 | m_Scale: {x: 1, y: 1} 130 | m_Offset: {x: 0, y: 0} 131 | - _Splat2: 132 | m_Texture: {fileID: 0} 133 | m_Scale: {x: 1, y: 1} 134 | m_Offset: {x: 0, y: 0} 135 | - _Splat3: 136 | m_Texture: {fileID: 0} 137 | m_Scale: {x: 1, y: 1} 138 | m_Offset: {x: 0, y: 0} 139 | - _Thickness: 140 | m_Texture: {fileID: 0} 141 | m_Scale: {x: 1, y: 1} 142 | m_Offset: {x: 0, y: 0} 143 | - _UpTex: 144 | m_Texture: {fileID: 0} 145 | m_Scale: {x: 1, y: 1} 146 | m_Offset: {x: 0, y: 0} 147 | - _Vignette: 148 | m_Texture: {fileID: 0} 149 | m_Scale: {x: 1, y: 1} 150 | m_Offset: {x: 0, y: 0} 151 | m_Floats: 152 | - PixelSnap: 0 153 | - _Amount: 0.2 154 | - _BumpScale: 1 155 | - _Cull: 2 156 | - _Cutoff: 0.232 157 | - _DetailNormalMapScale: 1 158 | - _Distortion: 0 159 | - _DstBlend: 10 160 | - _EmissionScaleUI: 0 161 | - _GlossMapScale: 1 162 | - _Glossiness: 0.5 163 | - _GlossyReflections: 1 164 | - _Metallic: 0 165 | - _Metallic0: 0 166 | - _Metallic1: 0 167 | - _Metallic2: 0 168 | - _Metallic3: 0 169 | - _Mode: 2 170 | - _OcclusionStrength: 1 171 | - _Parallax: 0.02 172 | - _Power: 1 173 | - _Scale: 0.5 174 | - _Shininess: 0.078125 175 | - _Smoothness: 0 176 | - _SmoothnessTextureChannel: 0 177 | - _SpecularHighlights: 1 178 | - _SrcBlend: 5 179 | - _Threshold: 0.1 180 | - _UVSec: 1 181 | - _WindQuality: 0 182 | - _ZWrite: 0 183 | m_Colors: 184 | - _Color: {r: 1, g: 1, b: 1, a: 0.70980394} 185 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 0} 186 | - _EmissionColorUI: {r: 1, g: 1, b: 1, a: 1} 187 | - _HueVariation: {r: 1, g: 0.5, b: 0, a: 0.1} 188 | - _MainColor: {r: 1, g: 1, b: 1, a: 1} 189 | - _ReflectColor: {r: 1, g: 1, b: 1, a: 0.5} 190 | - _SecondColor: {r: 1, g: 1, b: 1, a: 1} 191 | - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0} 192 | - _SubColor: {r: 1, g: 1, b: 1, a: 1} 193 | - _Tint: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} 194 | -------------------------------------------------------------------------------- /Assets/Resources/Materials/Transparent.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 97f670fd2167d6b468d23134548dc87d 3 | timeCreated: 1429710436 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f1e665ac73c807a42a675d72e751086e 3 | folderAsset: yes 4 | timeCreated: 1429732101 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Resources/Prefabs/GUI.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5ce8c2268a0dbc04f97418e97073f97b 3 | folderAsset: yes 4 | timeCreated: 1429732106 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Resources/Prefabs/GUI/Crosshair.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &139994 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: 414752} 12 | - component: {fileID: 13196952} 13 | m_Layer: 0 14 | m_Name: Crosshair 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &414752 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 139994} 27 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 28 | m_LocalPosition: {x: 0.5, y: 0.5, z: 0} 29 | m_LocalScale: {x: 0, y: 0, z: 1} 30 | m_Children: [] 31 | m_Father: {fileID: 0} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!131 &13196952 35 | GUITexture: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 139994} 41 | m_Enabled: 1 42 | m_Texture: {fileID: 2800000, guid: 3cd106b6df9390f47a0ba7c1d0c2b588, type: 3} 43 | m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} 44 | m_PixelInset: 45 | serializedVersion: 2 46 | x: 0 47 | y: 0 48 | width: 10 49 | height: 10 50 | m_LeftBorder: 0 51 | m_RightBorder: 0 52 | m_TopBorder: 0 53 | m_BottomBorder: 0 54 | -------------------------------------------------------------------------------- /Assets/Resources/Prefabs/GUI/Crosshair.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 56b5a1b3a0605144282d98b50a8115c9 3 | timeCreated: 1429732128 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources/Prefabs/GUI/GUI.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &100246 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: 22406460} 12 | - component: {fileID: 22296182} 13 | - component: {fileID: 11437958} 14 | m_Layer: 5 15 | m_Name: Hotbar 16 | m_TagString: Untagged 17 | m_Icon: {fileID: 0} 18 | m_NavMeshLayer: 0 19 | m_StaticEditorFlags: 0 20 | m_IsActive: 1 21 | --- !u!224 &22406460 22 | RectTransform: 23 | m_ObjectHideFlags: 0 24 | m_CorrespondingSourceObject: {fileID: 0} 25 | m_PrefabInstance: {fileID: 0} 26 | m_PrefabAsset: {fileID: 0} 27 | m_GameObject: {fileID: 100246} 28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 29 | m_LocalPosition: {x: 0, y: 0, z: 0} 30 | m_LocalScale: {x: 1, y: 1, z: 1} 31 | m_Children: [] 32 | m_Father: {fileID: 22401300} 33 | m_RootOrder: 1 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | m_AnchorMin: {x: 0.5, y: 0} 36 | m_AnchorMax: {x: 0.5, y: 0} 37 | m_AnchoredPosition: {x: 0, y: 40} 38 | m_SizeDelta: {x: 800, y: 80} 39 | m_Pivot: {x: 0.5, y: 0.5} 40 | --- !u!222 &22296182 41 | CanvasRenderer: 42 | m_ObjectHideFlags: 0 43 | m_CorrespondingSourceObject: {fileID: 0} 44 | m_PrefabInstance: {fileID: 0} 45 | m_PrefabAsset: {fileID: 0} 46 | m_GameObject: {fileID: 100246} 47 | m_CullTransparentMesh: 0 48 | --- !u!114 &11437958 49 | MonoBehaviour: 50 | m_ObjectHideFlags: 0 51 | m_CorrespondingSourceObject: {fileID: 0} 52 | m_PrefabInstance: {fileID: 0} 53 | m_PrefabAsset: {fileID: 0} 54 | m_GameObject: {fileID: 100246} 55 | m_Enabled: 1 56 | m_EditorHideFlags: 0 57 | m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 58 | m_Name: 59 | m_EditorClassIdentifier: 60 | m_Material: {fileID: 0} 61 | m_Color: {r: 0.33333334, g: 0.33333334, b: 0.33333334, a: 0.39215687} 62 | m_RaycastTarget: 1 63 | m_OnCullStateChanged: 64 | m_PersistentCalls: 65 | m_Calls: [] 66 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 67 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 68 | m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} 69 | m_Type: 1 70 | m_PreserveAspect: 0 71 | m_FillCenter: 1 72 | m_FillMethod: 4 73 | m_FillAmount: 1 74 | m_FillClockwise: 1 75 | m_FillOrigin: 0 76 | m_UseSpriteMesh: 0 77 | --- !u!1 &104498 78 | GameObject: 79 | m_ObjectHideFlags: 0 80 | m_CorrespondingSourceObject: {fileID: 0} 81 | m_PrefabInstance: {fileID: 0} 82 | m_PrefabAsset: {fileID: 0} 83 | serializedVersion: 6 84 | m_Component: 85 | - component: {fileID: 22470872} 86 | - component: {fileID: 22220294} 87 | - component: {fileID: 11498052} 88 | m_Layer: 5 89 | m_Name: Fill 90 | m_TagString: Untagged 91 | m_Icon: {fileID: 0} 92 | m_NavMeshLayer: 0 93 | m_StaticEditorFlags: 0 94 | m_IsActive: 1 95 | --- !u!224 &22470872 96 | RectTransform: 97 | m_ObjectHideFlags: 0 98 | m_CorrespondingSourceObject: {fileID: 0} 99 | m_PrefabInstance: {fileID: 0} 100 | m_PrefabAsset: {fileID: 0} 101 | m_GameObject: {fileID: 104498} 102 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 103 | m_LocalPosition: {x: 0, y: 0, z: 0} 104 | m_LocalScale: {x: 1, y: 1, z: 1} 105 | m_Children: [] 106 | m_Father: {fileID: 22495624} 107 | m_RootOrder: 0 108 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 109 | m_AnchorMin: {x: 0, y: 0} 110 | m_AnchorMax: {x: 0, y: 0} 111 | m_AnchoredPosition: {x: 0, y: 0} 112 | m_SizeDelta: {x: 0, y: 0} 113 | m_Pivot: {x: 0.5, y: 0.5} 114 | --- !u!222 &22220294 115 | CanvasRenderer: 116 | m_ObjectHideFlags: 0 117 | m_CorrespondingSourceObject: {fileID: 0} 118 | m_PrefabInstance: {fileID: 0} 119 | m_PrefabAsset: {fileID: 0} 120 | m_GameObject: {fileID: 104498} 121 | m_CullTransparentMesh: 0 122 | --- !u!114 &11498052 123 | MonoBehaviour: 124 | m_ObjectHideFlags: 0 125 | m_CorrespondingSourceObject: {fileID: 0} 126 | m_PrefabInstance: {fileID: 0} 127 | m_PrefabAsset: {fileID: 0} 128 | m_GameObject: {fileID: 104498} 129 | m_Enabled: 1 130 | m_EditorHideFlags: 0 131 | m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 132 | m_Name: 133 | m_EditorClassIdentifier: 134 | m_Material: {fileID: 0} 135 | m_Color: {r: 0.36551726, g: 1, b: 0, a: 1} 136 | m_RaycastTarget: 1 137 | m_OnCullStateChanged: 138 | m_PersistentCalls: 139 | m_Calls: [] 140 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 141 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 142 | m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} 143 | m_Type: 1 144 | m_PreserveAspect: 0 145 | m_FillCenter: 1 146 | m_FillMethod: 4 147 | m_FillAmount: 1 148 | m_FillClockwise: 1 149 | m_FillOrigin: 0 150 | m_UseSpriteMesh: 0 151 | --- !u!1 &107856 152 | GameObject: 153 | m_ObjectHideFlags: 0 154 | m_CorrespondingSourceObject: {fileID: 0} 155 | m_PrefabInstance: {fileID: 0} 156 | m_PrefabAsset: {fileID: 0} 157 | serializedVersion: 6 158 | m_Component: 159 | - component: {fileID: 22466960} 160 | - component: {fileID: 11458674} 161 | m_Layer: 5 162 | m_Name: Stamina 163 | m_TagString: Untagged 164 | m_Icon: {fileID: 0} 165 | m_NavMeshLayer: 0 166 | m_StaticEditorFlags: 0 167 | m_IsActive: 1 168 | --- !u!224 &22466960 169 | RectTransform: 170 | m_ObjectHideFlags: 0 171 | m_CorrespondingSourceObject: {fileID: 0} 172 | m_PrefabInstance: {fileID: 0} 173 | m_PrefabAsset: {fileID: 0} 174 | m_GameObject: {fileID: 107856} 175 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 176 | m_LocalPosition: {x: 0, y: 0, z: 0} 177 | m_LocalScale: {x: 1, y: 1, z: 1} 178 | m_Children: 179 | - {fileID: 22473012} 180 | - {fileID: 22495624} 181 | m_Father: {fileID: 22406008} 182 | m_RootOrder: 1 183 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 184 | m_AnchorMin: {x: 0.5, y: 0.5} 185 | m_AnchorMax: {x: 0.5, y: 0.5} 186 | m_AnchoredPosition: {x: 0, y: -40} 187 | m_SizeDelta: {x: 300, y: 80} 188 | m_Pivot: {x: 0.5, y: 0.5} 189 | --- !u!114 &11458674 190 | MonoBehaviour: 191 | m_ObjectHideFlags: 0 192 | m_CorrespondingSourceObject: {fileID: 0} 193 | m_PrefabInstance: {fileID: 0} 194 | m_PrefabAsset: {fileID: 0} 195 | m_GameObject: {fileID: 107856} 196 | m_Enabled: 1 197 | m_EditorHideFlags: 0 198 | m_Script: {fileID: -113659843, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 199 | m_Name: 200 | m_EditorClassIdentifier: 201 | m_Navigation: 202 | m_Mode: 3 203 | m_SelectOnUp: {fileID: 0} 204 | m_SelectOnDown: {fileID: 0} 205 | m_SelectOnLeft: {fileID: 0} 206 | m_SelectOnRight: {fileID: 0} 207 | m_Transition: 1 208 | m_Colors: 209 | m_NormalColor: {r: 1, g: 1, b: 1, a: 1} 210 | m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 211 | m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} 212 | m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 213 | m_ColorMultiplier: 1 214 | m_FadeDuration: 0.1 215 | m_SpriteState: 216 | m_HighlightedSprite: {fileID: 0} 217 | m_PressedSprite: {fileID: 0} 218 | m_DisabledSprite: {fileID: 0} 219 | m_AnimationTriggers: 220 | m_NormalTrigger: Normal 221 | m_HighlightedTrigger: Highlighted 222 | m_PressedTrigger: Pressed 223 | m_DisabledTrigger: Disabled 224 | m_Interactable: 0 225 | m_TargetGraphic: {fileID: 0} 226 | m_FillRect: {fileID: 22470872} 227 | m_HandleRect: {fileID: 0} 228 | m_Direction: 0 229 | m_MinValue: 0 230 | m_MaxValue: 1 231 | m_WholeNumbers: 0 232 | m_Value: 1 233 | m_OnValueChanged: 234 | m_PersistentCalls: 235 | m_Calls: [] 236 | m_TypeName: UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0, 237 | Culture=neutral, PublicKeyToken=null 238 | --- !u!1 &109022 239 | GameObject: 240 | m_ObjectHideFlags: 0 241 | m_CorrespondingSourceObject: {fileID: 0} 242 | m_PrefabInstance: {fileID: 0} 243 | m_PrefabAsset: {fileID: 0} 244 | serializedVersion: 6 245 | m_Component: 246 | - component: {fileID: 22435254} 247 | - component: {fileID: 22276750} 248 | - component: {fileID: 11423204} 249 | m_Layer: 5 250 | m_Name: Fill 251 | m_TagString: Untagged 252 | m_Icon: {fileID: 0} 253 | m_NavMeshLayer: 0 254 | m_StaticEditorFlags: 0 255 | m_IsActive: 1 256 | --- !u!224 &22435254 257 | RectTransform: 258 | m_ObjectHideFlags: 0 259 | m_CorrespondingSourceObject: {fileID: 0} 260 | m_PrefabInstance: {fileID: 0} 261 | m_PrefabAsset: {fileID: 0} 262 | m_GameObject: {fileID: 109022} 263 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 264 | m_LocalPosition: {x: 0, y: 0, z: 0} 265 | m_LocalScale: {x: 1, y: 1, z: 1} 266 | m_Children: [] 267 | m_Father: {fileID: 22446938} 268 | m_RootOrder: 0 269 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 270 | m_AnchorMin: {x: 0, y: 0} 271 | m_AnchorMax: {x: 0, y: 0} 272 | m_AnchoredPosition: {x: 0, y: 0} 273 | m_SizeDelta: {x: 0, y: 0} 274 | m_Pivot: {x: 0.5, y: 0.5} 275 | --- !u!222 &22276750 276 | CanvasRenderer: 277 | m_ObjectHideFlags: 0 278 | m_CorrespondingSourceObject: {fileID: 0} 279 | m_PrefabInstance: {fileID: 0} 280 | m_PrefabAsset: {fileID: 0} 281 | m_GameObject: {fileID: 109022} 282 | m_CullTransparentMesh: 0 283 | --- !u!114 &11423204 284 | MonoBehaviour: 285 | m_ObjectHideFlags: 0 286 | m_CorrespondingSourceObject: {fileID: 0} 287 | m_PrefabInstance: {fileID: 0} 288 | m_PrefabAsset: {fileID: 0} 289 | m_GameObject: {fileID: 109022} 290 | m_Enabled: 1 291 | m_EditorHideFlags: 0 292 | m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 293 | m_Name: 294 | m_EditorClassIdentifier: 295 | m_Material: {fileID: 0} 296 | m_Color: {r: 1, g: 0, b: 0, a: 1} 297 | m_RaycastTarget: 1 298 | m_OnCullStateChanged: 299 | m_PersistentCalls: 300 | m_Calls: [] 301 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 302 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 303 | m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} 304 | m_Type: 1 305 | m_PreserveAspect: 0 306 | m_FillCenter: 1 307 | m_FillMethod: 4 308 | m_FillAmount: 0.752 309 | m_FillClockwise: 1 310 | m_FillOrigin: 0 311 | m_UseSpriteMesh: 0 312 | --- !u!1 &110418 313 | GameObject: 314 | m_ObjectHideFlags: 0 315 | m_CorrespondingSourceObject: {fileID: 0} 316 | m_PrefabInstance: {fileID: 0} 317 | m_PrefabAsset: {fileID: 0} 318 | serializedVersion: 6 319 | m_Component: 320 | - component: {fileID: 22401300} 321 | - component: {fileID: 22393336} 322 | - component: {fileID: 11452770} 323 | - component: {fileID: 11409498} 324 | m_Layer: 5 325 | m_Name: GUI 326 | m_TagString: Untagged 327 | m_Icon: {fileID: 0} 328 | m_NavMeshLayer: 0 329 | m_StaticEditorFlags: 0 330 | m_IsActive: 0 331 | --- !u!224 &22401300 332 | RectTransform: 333 | m_ObjectHideFlags: 0 334 | m_CorrespondingSourceObject: {fileID: 0} 335 | m_PrefabInstance: {fileID: 0} 336 | m_PrefabAsset: {fileID: 0} 337 | m_GameObject: {fileID: 110418} 338 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 339 | m_LocalPosition: {x: 0, y: 0, z: 0} 340 | m_LocalScale: {x: 0, y: 0, z: 0} 341 | m_Children: 342 | - {fileID: 22406008} 343 | - {fileID: 22406460} 344 | - {fileID: 22454274} 345 | m_Father: {fileID: 0} 346 | m_RootOrder: 0 347 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 348 | m_AnchorMin: {x: 0, y: 0} 349 | m_AnchorMax: {x: 0, y: 0} 350 | m_AnchoredPosition: {x: 0, y: 0} 351 | m_SizeDelta: {x: 0, y: 0} 352 | m_Pivot: {x: 0, y: 0} 353 | --- !u!223 &22393336 354 | Canvas: 355 | m_ObjectHideFlags: 0 356 | m_CorrespondingSourceObject: {fileID: 0} 357 | m_PrefabInstance: {fileID: 0} 358 | m_PrefabAsset: {fileID: 0} 359 | m_GameObject: {fileID: 110418} 360 | m_Enabled: 1 361 | serializedVersion: 3 362 | m_RenderMode: 0 363 | m_Camera: {fileID: 0} 364 | m_PlaneDistance: 100 365 | m_PixelPerfect: 0 366 | m_ReceivesEvents: 1 367 | m_OverrideSorting: 0 368 | m_OverridePixelPerfect: 0 369 | m_SortingBucketNormalizedSize: 0 370 | m_AdditionalShaderChannelsFlag: 25 371 | m_SortingLayerID: 0 372 | m_SortingOrder: 0 373 | m_TargetDisplay: 0 374 | --- !u!114 &11452770 375 | MonoBehaviour: 376 | m_ObjectHideFlags: 0 377 | m_CorrespondingSourceObject: {fileID: 0} 378 | m_PrefabInstance: {fileID: 0} 379 | m_PrefabAsset: {fileID: 0} 380 | m_GameObject: {fileID: 110418} 381 | m_Enabled: 1 382 | m_EditorHideFlags: 0 383 | m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 384 | m_Name: 385 | m_EditorClassIdentifier: 386 | m_UiScaleMode: 0 387 | m_ReferencePixelsPerUnit: 100 388 | m_ScaleFactor: 1 389 | m_ReferenceResolution: {x: 800, y: 600} 390 | m_ScreenMatchMode: 0 391 | m_MatchWidthOrHeight: 0 392 | m_PhysicalUnit: 3 393 | m_FallbackScreenDPI: 96 394 | m_DefaultSpriteDPI: 96 395 | m_DynamicPixelsPerUnit: 1 396 | --- !u!114 &11409498 397 | MonoBehaviour: 398 | m_ObjectHideFlags: 0 399 | m_CorrespondingSourceObject: {fileID: 0} 400 | m_PrefabInstance: {fileID: 0} 401 | m_PrefabAsset: {fileID: 0} 402 | m_GameObject: {fileID: 110418} 403 | m_Enabled: 1 404 | m_EditorHideFlags: 0 405 | m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 406 | m_Name: 407 | m_EditorClassIdentifier: 408 | m_IgnoreReversedGraphics: 1 409 | m_BlockingObjects: 0 410 | m_BlockingMask: 411 | serializedVersion: 2 412 | m_Bits: 4294967295 413 | --- !u!1 &111286 414 | GameObject: 415 | m_ObjectHideFlags: 0 416 | m_CorrespondingSourceObject: {fileID: 0} 417 | m_PrefabInstance: {fileID: 0} 418 | m_PrefabAsset: {fileID: 0} 419 | serializedVersion: 6 420 | m_Component: 421 | - component: {fileID: 22404070} 422 | - component: {fileID: 22209868} 423 | - component: {fileID: 11495194} 424 | m_Layer: 5 425 | m_Name: Inventory 426 | m_TagString: Untagged 427 | m_Icon: {fileID: 0} 428 | m_NavMeshLayer: 0 429 | m_StaticEditorFlags: 0 430 | m_IsActive: 1 431 | --- !u!224 &22404070 432 | RectTransform: 433 | m_ObjectHideFlags: 0 434 | m_CorrespondingSourceObject: {fileID: 0} 435 | m_PrefabInstance: {fileID: 0} 436 | m_PrefabAsset: {fileID: 0} 437 | m_GameObject: {fileID: 111286} 438 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 439 | m_LocalPosition: {x: 0, y: 0, z: 0} 440 | m_LocalScale: {x: 1, y: 1, z: 1} 441 | m_Children: 442 | - {fileID: 22404256} 443 | m_Father: {fileID: 22454274} 444 | m_RootOrder: 1 445 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 446 | m_AnchorMin: {x: 0.5, y: 0} 447 | m_AnchorMax: {x: 0.5, y: 0} 448 | m_AnchoredPosition: {x: 0, y: 350} 449 | m_SizeDelta: {x: 800, y: 500} 450 | m_Pivot: {x: 0.5, y: 0.5} 451 | --- !u!222 &22209868 452 | CanvasRenderer: 453 | m_ObjectHideFlags: 0 454 | m_CorrespondingSourceObject: {fileID: 0} 455 | m_PrefabInstance: {fileID: 0} 456 | m_PrefabAsset: {fileID: 0} 457 | m_GameObject: {fileID: 111286} 458 | m_CullTransparentMesh: 0 459 | --- !u!114 &11495194 460 | MonoBehaviour: 461 | m_ObjectHideFlags: 0 462 | m_CorrespondingSourceObject: {fileID: 0} 463 | m_PrefabInstance: {fileID: 0} 464 | m_PrefabAsset: {fileID: 0} 465 | m_GameObject: {fileID: 111286} 466 | m_Enabled: 1 467 | m_EditorHideFlags: 0 468 | m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 469 | m_Name: 470 | m_EditorClassIdentifier: 471 | m_Material: {fileID: 0} 472 | m_Color: {r: 0.33333334, g: 0.33333334, b: 0.33333334, a: 0.9019608} 473 | m_RaycastTarget: 1 474 | m_OnCullStateChanged: 475 | m_PersistentCalls: 476 | m_Calls: [] 477 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 478 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 479 | m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} 480 | m_Type: 1 481 | m_PreserveAspect: 0 482 | m_FillCenter: 1 483 | m_FillMethod: 4 484 | m_FillAmount: 1 485 | m_FillClockwise: 1 486 | m_FillOrigin: 0 487 | m_UseSpriteMesh: 0 488 | --- !u!1 &111926 489 | GameObject: 490 | m_ObjectHideFlags: 0 491 | m_CorrespondingSourceObject: {fileID: 0} 492 | m_PrefabInstance: {fileID: 0} 493 | m_PrefabAsset: {fileID: 0} 494 | serializedVersion: 6 495 | m_Component: 496 | - component: {fileID: 22446938} 497 | m_Layer: 5 498 | m_Name: Fill Area 499 | m_TagString: Untagged 500 | m_Icon: {fileID: 0} 501 | m_NavMeshLayer: 0 502 | m_StaticEditorFlags: 0 503 | m_IsActive: 1 504 | --- !u!224 &22446938 505 | RectTransform: 506 | m_ObjectHideFlags: 0 507 | m_CorrespondingSourceObject: {fileID: 0} 508 | m_PrefabInstance: {fileID: 0} 509 | m_PrefabAsset: {fileID: 0} 510 | m_GameObject: {fileID: 111926} 511 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 512 | m_LocalPosition: {x: 0, y: 0, z: 0} 513 | m_LocalScale: {x: 1, y: 1, z: 1} 514 | m_Children: 515 | - {fileID: 22435254} 516 | m_Father: {fileID: 22408896} 517 | m_RootOrder: 1 518 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 519 | m_AnchorMin: {x: 0, y: 0.25} 520 | m_AnchorMax: {x: 1, y: 0.75} 521 | m_AnchoredPosition: {x: 0, y: 0} 522 | m_SizeDelta: {x: 0, y: 0} 523 | m_Pivot: {x: 0.5, y: 0.5} 524 | --- !u!1 &115236 525 | GameObject: 526 | m_ObjectHideFlags: 0 527 | m_CorrespondingSourceObject: {fileID: 0} 528 | m_PrefabInstance: {fileID: 0} 529 | m_PrefabAsset: {fileID: 0} 530 | serializedVersion: 6 531 | m_Component: 532 | - component: {fileID: 22408896} 533 | - component: {fileID: 11425192} 534 | m_Layer: 5 535 | m_Name: Health 536 | m_TagString: Untagged 537 | m_Icon: {fileID: 0} 538 | m_NavMeshLayer: 0 539 | m_StaticEditorFlags: 0 540 | m_IsActive: 1 541 | --- !u!224 &22408896 542 | RectTransform: 543 | m_ObjectHideFlags: 0 544 | m_CorrespondingSourceObject: {fileID: 0} 545 | m_PrefabInstance: {fileID: 0} 546 | m_PrefabAsset: {fileID: 0} 547 | m_GameObject: {fileID: 115236} 548 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 549 | m_LocalPosition: {x: 0, y: 0, z: 0} 550 | m_LocalScale: {x: 1, y: 1, z: 1} 551 | m_Children: 552 | - {fileID: 22456042} 553 | - {fileID: 22446938} 554 | m_Father: {fileID: 22406008} 555 | m_RootOrder: 0 556 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 557 | m_AnchorMin: {x: 0.5, y: 0.5} 558 | m_AnchorMax: {x: 0.5, y: 0.5} 559 | m_AnchoredPosition: {x: 0, y: 0} 560 | m_SizeDelta: {x: 300, y: 80} 561 | m_Pivot: {x: 0.5, y: 0.5} 562 | --- !u!114 &11425192 563 | MonoBehaviour: 564 | m_ObjectHideFlags: 0 565 | m_CorrespondingSourceObject: {fileID: 0} 566 | m_PrefabInstance: {fileID: 0} 567 | m_PrefabAsset: {fileID: 0} 568 | m_GameObject: {fileID: 115236} 569 | m_Enabled: 1 570 | m_EditorHideFlags: 0 571 | m_Script: {fileID: -113659843, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 572 | m_Name: 573 | m_EditorClassIdentifier: 574 | m_Navigation: 575 | m_Mode: 3 576 | m_SelectOnUp: {fileID: 0} 577 | m_SelectOnDown: {fileID: 0} 578 | m_SelectOnLeft: {fileID: 0} 579 | m_SelectOnRight: {fileID: 0} 580 | m_Transition: 1 581 | m_Colors: 582 | m_NormalColor: {r: 1, g: 1, b: 1, a: 1} 583 | m_HighlightedColor: {r: 1, g: 1, b: 1, a: 1} 584 | m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} 585 | m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 586 | m_ColorMultiplier: 1 587 | m_FadeDuration: 0.1 588 | m_SpriteState: 589 | m_HighlightedSprite: {fileID: 0} 590 | m_PressedSprite: {fileID: 0} 591 | m_DisabledSprite: {fileID: 0} 592 | m_AnimationTriggers: 593 | m_NormalTrigger: Normal 594 | m_HighlightedTrigger: Highlighted 595 | m_PressedTrigger: Pressed 596 | m_DisabledTrigger: Disabled 597 | m_Interactable: 0 598 | m_TargetGraphic: {fileID: 0} 599 | m_FillRect: {fileID: 22435254} 600 | m_HandleRect: {fileID: 0} 601 | m_Direction: 0 602 | m_MinValue: 0 603 | m_MaxValue: 1 604 | m_WholeNumbers: 0 605 | m_Value: 1 606 | m_OnValueChanged: 607 | m_PersistentCalls: 608 | m_Calls: [] 609 | m_TypeName: UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0, 610 | Culture=neutral, PublicKeyToken=null 611 | --- !u!1 &126004 612 | GameObject: 613 | m_ObjectHideFlags: 0 614 | m_CorrespondingSourceObject: {fileID: 0} 615 | m_PrefabInstance: {fileID: 0} 616 | m_PrefabAsset: {fileID: 0} 617 | serializedVersion: 6 618 | m_Component: 619 | - component: {fileID: 22406008} 620 | - component: {fileID: 22363564} 621 | - component: {fileID: 11419160} 622 | - component: {fileID: 11480898} 623 | m_Layer: 5 624 | m_Name: Statusbar 625 | m_TagString: Untagged 626 | m_Icon: {fileID: 0} 627 | m_NavMeshLayer: 0 628 | m_StaticEditorFlags: 0 629 | m_IsActive: 1 630 | --- !u!224 &22406008 631 | RectTransform: 632 | m_ObjectHideFlags: 0 633 | m_CorrespondingSourceObject: {fileID: 0} 634 | m_PrefabInstance: {fileID: 0} 635 | m_PrefabAsset: {fileID: 0} 636 | m_GameObject: {fileID: 126004} 637 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 638 | m_LocalPosition: {x: 0, y: 0, z: 0} 639 | m_LocalScale: {x: 1, y: 1, z: 1} 640 | m_Children: 641 | - {fileID: 22408896} 642 | - {fileID: 22466960} 643 | m_Father: {fileID: 22401300} 644 | m_RootOrder: 0 645 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 646 | m_AnchorMin: {x: 0.5, y: 1} 647 | m_AnchorMax: {x: 0.5, y: 1} 648 | m_AnchoredPosition: {x: 0, y: -30} 649 | m_SizeDelta: {x: 300, y: 200} 650 | m_Pivot: {x: 0.5, y: 0.5} 651 | --- !u!223 &22363564 652 | Canvas: 653 | m_ObjectHideFlags: 0 654 | m_CorrespondingSourceObject: {fileID: 0} 655 | m_PrefabInstance: {fileID: 0} 656 | m_PrefabAsset: {fileID: 0} 657 | m_GameObject: {fileID: 126004} 658 | m_Enabled: 1 659 | serializedVersion: 3 660 | m_RenderMode: 0 661 | m_Camera: {fileID: 0} 662 | m_PlaneDistance: 100 663 | m_PixelPerfect: 0 664 | m_ReceivesEvents: 1 665 | m_OverrideSorting: 0 666 | m_OverridePixelPerfect: 0 667 | m_SortingBucketNormalizedSize: 0 668 | m_AdditionalShaderChannelsFlag: 25 669 | m_SortingLayerID: 0 670 | m_SortingOrder: 0 671 | m_TargetDisplay: 0 672 | --- !u!114 &11419160 673 | MonoBehaviour: 674 | m_ObjectHideFlags: 0 675 | m_CorrespondingSourceObject: {fileID: 0} 676 | m_PrefabInstance: {fileID: 0} 677 | m_PrefabAsset: {fileID: 0} 678 | m_GameObject: {fileID: 126004} 679 | m_Enabled: 1 680 | m_EditorHideFlags: 0 681 | m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 682 | m_Name: 683 | m_EditorClassIdentifier: 684 | m_UiScaleMode: 0 685 | m_ReferencePixelsPerUnit: 100 686 | m_ScaleFactor: 1 687 | m_ReferenceResolution: {x: 800, y: 600} 688 | m_ScreenMatchMode: 0 689 | m_MatchWidthOrHeight: 0 690 | m_PhysicalUnit: 3 691 | m_FallbackScreenDPI: 96 692 | m_DefaultSpriteDPI: 96 693 | m_DynamicPixelsPerUnit: 1 694 | --- !u!114 &11480898 695 | MonoBehaviour: 696 | m_ObjectHideFlags: 0 697 | m_CorrespondingSourceObject: {fileID: 0} 698 | m_PrefabInstance: {fileID: 0} 699 | m_PrefabAsset: {fileID: 0} 700 | m_GameObject: {fileID: 126004} 701 | m_Enabled: 1 702 | m_EditorHideFlags: 0 703 | m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 704 | m_Name: 705 | m_EditorClassIdentifier: 706 | m_IgnoreReversedGraphics: 1 707 | m_BlockingObjects: 0 708 | m_BlockingMask: 709 | serializedVersion: 2 710 | m_Bits: 4294967295 711 | --- !u!1 &133982 712 | GameObject: 713 | m_ObjectHideFlags: 0 714 | m_CorrespondingSourceObject: {fileID: 0} 715 | m_PrefabInstance: {fileID: 0} 716 | m_PrefabAsset: {fileID: 0} 717 | serializedVersion: 6 718 | m_Component: 719 | - component: {fileID: 22454274} 720 | - component: {fileID: 22368758} 721 | - component: {fileID: 11487796} 722 | - component: {fileID: 11438384} 723 | m_Layer: 5 724 | m_Name: Inventory Menu 725 | m_TagString: Untagged 726 | m_Icon: {fileID: 0} 727 | m_NavMeshLayer: 0 728 | m_StaticEditorFlags: 0 729 | m_IsActive: 1 730 | --- !u!224 &22454274 731 | RectTransform: 732 | m_ObjectHideFlags: 0 733 | m_CorrespondingSourceObject: {fileID: 0} 734 | m_PrefabInstance: {fileID: 0} 735 | m_PrefabAsset: {fileID: 0} 736 | m_GameObject: {fileID: 133982} 737 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 738 | m_LocalPosition: {x: 0, y: 0, z: 0} 739 | m_LocalScale: {x: 1, y: 1, z: 1} 740 | m_Children: 741 | - {fileID: 22439200} 742 | - {fileID: 22404070} 743 | - {fileID: 22468874} 744 | m_Father: {fileID: 22401300} 745 | m_RootOrder: 2 746 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 747 | m_AnchorMin: {x: 0, y: 0} 748 | m_AnchorMax: {x: 1, y: 1} 749 | m_AnchoredPosition: {x: 0, y: 0} 750 | m_SizeDelta: {x: 0, y: 0} 751 | m_Pivot: {x: 0.5, y: 0.5} 752 | --- !u!223 &22368758 753 | Canvas: 754 | m_ObjectHideFlags: 0 755 | m_CorrespondingSourceObject: {fileID: 0} 756 | m_PrefabInstance: {fileID: 0} 757 | m_PrefabAsset: {fileID: 0} 758 | m_GameObject: {fileID: 133982} 759 | m_Enabled: 1 760 | serializedVersion: 3 761 | m_RenderMode: 0 762 | m_Camera: {fileID: 0} 763 | m_PlaneDistance: 100 764 | m_PixelPerfect: 0 765 | m_ReceivesEvents: 1 766 | m_OverrideSorting: 0 767 | m_OverridePixelPerfect: 0 768 | m_SortingBucketNormalizedSize: 0 769 | m_AdditionalShaderChannelsFlag: 25 770 | m_SortingLayerID: 0 771 | m_SortingOrder: 0 772 | m_TargetDisplay: 0 773 | --- !u!114 &11487796 774 | MonoBehaviour: 775 | m_ObjectHideFlags: 0 776 | m_CorrespondingSourceObject: {fileID: 0} 777 | m_PrefabInstance: {fileID: 0} 778 | m_PrefabAsset: {fileID: 0} 779 | m_GameObject: {fileID: 133982} 780 | m_Enabled: 1 781 | m_EditorHideFlags: 0 782 | m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 783 | m_Name: 784 | m_EditorClassIdentifier: 785 | m_UiScaleMode: 0 786 | m_ReferencePixelsPerUnit: 100 787 | m_ScaleFactor: 1 788 | m_ReferenceResolution: {x: 800, y: 600} 789 | m_ScreenMatchMode: 0 790 | m_MatchWidthOrHeight: 0 791 | m_PhysicalUnit: 3 792 | m_FallbackScreenDPI: 96 793 | m_DefaultSpriteDPI: 96 794 | m_DynamicPixelsPerUnit: 1 795 | --- !u!114 &11438384 796 | MonoBehaviour: 797 | m_ObjectHideFlags: 0 798 | m_CorrespondingSourceObject: {fileID: 0} 799 | m_PrefabInstance: {fileID: 0} 800 | m_PrefabAsset: {fileID: 0} 801 | m_GameObject: {fileID: 133982} 802 | m_Enabled: 1 803 | m_EditorHideFlags: 0 804 | m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 805 | m_Name: 806 | m_EditorClassIdentifier: 807 | m_IgnoreReversedGraphics: 1 808 | m_BlockingObjects: 0 809 | m_BlockingMask: 810 | serializedVersion: 2 811 | m_Bits: 4294967295 812 | --- !u!1 &139936 813 | GameObject: 814 | m_ObjectHideFlags: 0 815 | m_CorrespondingSourceObject: {fileID: 0} 816 | m_PrefabInstance: {fileID: 0} 817 | m_PrefabAsset: {fileID: 0} 818 | serializedVersion: 6 819 | m_Component: 820 | - component: {fileID: 22468874} 821 | - component: {fileID: 22264288} 822 | - component: {fileID: 11488916} 823 | m_Layer: 5 824 | m_Name: Crafting 825 | m_TagString: Untagged 826 | m_Icon: {fileID: 0} 827 | m_NavMeshLayer: 0 828 | m_StaticEditorFlags: 0 829 | m_IsActive: 1 830 | --- !u!224 &22468874 831 | RectTransform: 832 | m_ObjectHideFlags: 0 833 | m_CorrespondingSourceObject: {fileID: 0} 834 | m_PrefabInstance: {fileID: 0} 835 | m_PrefabAsset: {fileID: 0} 836 | m_GameObject: {fileID: 139936} 837 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 838 | m_LocalPosition: {x: 0, y: 0, z: 0} 839 | m_LocalScale: {x: 1, y: 1, z: 1} 840 | m_Children: 841 | - {fileID: 22491526} 842 | m_Father: {fileID: 22454274} 843 | m_RootOrder: 2 844 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 845 | m_AnchorMin: {x: 0.5, y: 0} 846 | m_AnchorMax: {x: 0.5, y: 0} 847 | m_AnchoredPosition: {x: 600, y: 350} 848 | m_SizeDelta: {x: 300, y: 500} 849 | m_Pivot: {x: 0.5, y: 0.5} 850 | --- !u!222 &22264288 851 | CanvasRenderer: 852 | m_ObjectHideFlags: 0 853 | m_CorrespondingSourceObject: {fileID: 0} 854 | m_PrefabInstance: {fileID: 0} 855 | m_PrefabAsset: {fileID: 0} 856 | m_GameObject: {fileID: 139936} 857 | m_CullTransparentMesh: 0 858 | --- !u!114 &11488916 859 | MonoBehaviour: 860 | m_ObjectHideFlags: 0 861 | m_CorrespondingSourceObject: {fileID: 0} 862 | m_PrefabInstance: {fileID: 0} 863 | m_PrefabAsset: {fileID: 0} 864 | m_GameObject: {fileID: 139936} 865 | m_Enabled: 1 866 | m_EditorHideFlags: 0 867 | m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 868 | m_Name: 869 | m_EditorClassIdentifier: 870 | m_Material: {fileID: 0} 871 | m_Color: {r: 0.33333334, g: 0.33333334, b: 0.33333334, a: 0.9019608} 872 | m_RaycastTarget: 1 873 | m_OnCullStateChanged: 874 | m_PersistentCalls: 875 | m_Calls: [] 876 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 877 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 878 | m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} 879 | m_Type: 1 880 | m_PreserveAspect: 0 881 | m_FillCenter: 1 882 | m_FillMethod: 4 883 | m_FillAmount: 1 884 | m_FillClockwise: 1 885 | m_FillOrigin: 0 886 | m_UseSpriteMesh: 0 887 | --- !u!1 &140480 888 | GameObject: 889 | m_ObjectHideFlags: 0 890 | m_CorrespondingSourceObject: {fileID: 0} 891 | m_PrefabInstance: {fileID: 0} 892 | m_PrefabAsset: {fileID: 0} 893 | serializedVersion: 6 894 | m_Component: 895 | - component: {fileID: 22404256} 896 | - component: {fileID: 22202366} 897 | - component: {fileID: 11415596} 898 | m_Layer: 5 899 | m_Name: Title 900 | m_TagString: Untagged 901 | m_Icon: {fileID: 0} 902 | m_NavMeshLayer: 0 903 | m_StaticEditorFlags: 0 904 | m_IsActive: 1 905 | --- !u!224 &22404256 906 | RectTransform: 907 | m_ObjectHideFlags: 0 908 | m_CorrespondingSourceObject: {fileID: 0} 909 | m_PrefabInstance: {fileID: 0} 910 | m_PrefabAsset: {fileID: 0} 911 | m_GameObject: {fileID: 140480} 912 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 913 | m_LocalPosition: {x: 0, y: 0, z: 0} 914 | m_LocalScale: {x: 1, y: 1, z: 1} 915 | m_Children: [] 916 | m_Father: {fileID: 22404070} 917 | m_RootOrder: 0 918 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 919 | m_AnchorMin: {x: 0.5, y: 1} 920 | m_AnchorMax: {x: 0.5, y: 1} 921 | m_AnchoredPosition: {x: 0, y: -30} 922 | m_SizeDelta: {x: 160, y: 30} 923 | m_Pivot: {x: 0.5, y: 0.5} 924 | --- !u!222 &22202366 925 | CanvasRenderer: 926 | m_ObjectHideFlags: 0 927 | m_CorrespondingSourceObject: {fileID: 0} 928 | m_PrefabInstance: {fileID: 0} 929 | m_PrefabAsset: {fileID: 0} 930 | m_GameObject: {fileID: 140480} 931 | m_CullTransparentMesh: 0 932 | --- !u!114 &11415596 933 | MonoBehaviour: 934 | m_ObjectHideFlags: 0 935 | m_CorrespondingSourceObject: {fileID: 0} 936 | m_PrefabInstance: {fileID: 0} 937 | m_PrefabAsset: {fileID: 0} 938 | m_GameObject: {fileID: 140480} 939 | m_Enabled: 1 940 | m_EditorHideFlags: 0 941 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 942 | m_Name: 943 | m_EditorClassIdentifier: 944 | m_Material: {fileID: 0} 945 | m_Color: {r: 0.1953125, g: 0.1953125, b: 0.1953125, a: 1} 946 | m_RaycastTarget: 1 947 | m_OnCullStateChanged: 948 | m_PersistentCalls: 949 | m_Calls: [] 950 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 951 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 952 | m_FontData: 953 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 954 | m_FontSize: 14 955 | m_FontStyle: 1 956 | m_BestFit: 0 957 | m_MinSize: 10 958 | m_MaxSize: 40 959 | m_Alignment: 1 960 | m_AlignByGeometry: 0 961 | m_RichText: 1 962 | m_HorizontalOverflow: 0 963 | m_VerticalOverflow: 0 964 | m_LineSpacing: 1 965 | m_Text: Inventory 966 | --- !u!1 &142980 967 | GameObject: 968 | m_ObjectHideFlags: 0 969 | m_CorrespondingSourceObject: {fileID: 0} 970 | m_PrefabInstance: {fileID: 0} 971 | m_PrefabAsset: {fileID: 0} 972 | serializedVersion: 6 973 | m_Component: 974 | - component: {fileID: 22456042} 975 | - component: {fileID: 22243870} 976 | - component: {fileID: 11447636} 977 | m_Layer: 5 978 | m_Name: Background 979 | m_TagString: Untagged 980 | m_Icon: {fileID: 0} 981 | m_NavMeshLayer: 0 982 | m_StaticEditorFlags: 0 983 | m_IsActive: 1 984 | --- !u!224 &22456042 985 | RectTransform: 986 | m_ObjectHideFlags: 0 987 | m_CorrespondingSourceObject: {fileID: 0} 988 | m_PrefabInstance: {fileID: 0} 989 | m_PrefabAsset: {fileID: 0} 990 | m_GameObject: {fileID: 142980} 991 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 992 | m_LocalPosition: {x: 0, y: 0, z: 0} 993 | m_LocalScale: {x: 1, y: 1, z: 1} 994 | m_Children: [] 995 | m_Father: {fileID: 22408896} 996 | m_RootOrder: 0 997 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 998 | m_AnchorMin: {x: 0, y: 0.25} 999 | m_AnchorMax: {x: 1, y: 0.75} 1000 | m_AnchoredPosition: {x: 0, y: 0} 1001 | m_SizeDelta: {x: 0, y: 0} 1002 | m_Pivot: {x: 0.5, y: 0.5} 1003 | --- !u!222 &22243870 1004 | CanvasRenderer: 1005 | m_ObjectHideFlags: 0 1006 | m_CorrespondingSourceObject: {fileID: 0} 1007 | m_PrefabInstance: {fileID: 0} 1008 | m_PrefabAsset: {fileID: 0} 1009 | m_GameObject: {fileID: 142980} 1010 | m_CullTransparentMesh: 0 1011 | --- !u!114 &11447636 1012 | MonoBehaviour: 1013 | m_ObjectHideFlags: 0 1014 | m_CorrespondingSourceObject: {fileID: 0} 1015 | m_PrefabInstance: {fileID: 0} 1016 | m_PrefabAsset: {fileID: 0} 1017 | m_GameObject: {fileID: 142980} 1018 | m_Enabled: 1 1019 | m_EditorHideFlags: 0 1020 | m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 1021 | m_Name: 1022 | m_EditorClassIdentifier: 1023 | m_Material: {fileID: 0} 1024 | m_Color: {r: 0.33333334, g: 0.33333334, b: 0.33333334, a: 0.39215687} 1025 | m_RaycastTarget: 1 1026 | m_OnCullStateChanged: 1027 | m_PersistentCalls: 1028 | m_Calls: [] 1029 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 1030 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 1031 | m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} 1032 | m_Type: 1 1033 | m_PreserveAspect: 0 1034 | m_FillCenter: 1 1035 | m_FillMethod: 4 1036 | m_FillAmount: 1 1037 | m_FillClockwise: 1 1038 | m_FillOrigin: 0 1039 | m_UseSpriteMesh: 0 1040 | --- !u!1 &157190 1041 | GameObject: 1042 | m_ObjectHideFlags: 0 1043 | m_CorrespondingSourceObject: {fileID: 0} 1044 | m_PrefabInstance: {fileID: 0} 1045 | m_PrefabAsset: {fileID: 0} 1046 | serializedVersion: 6 1047 | m_Component: 1048 | - component: {fileID: 22444524} 1049 | - component: {fileID: 22241534} 1050 | - component: {fileID: 11408166} 1051 | m_Layer: 5 1052 | m_Name: Title 1053 | m_TagString: Untagged 1054 | m_Icon: {fileID: 0} 1055 | m_NavMeshLayer: 0 1056 | m_StaticEditorFlags: 0 1057 | m_IsActive: 1 1058 | --- !u!224 &22444524 1059 | RectTransform: 1060 | m_ObjectHideFlags: 0 1061 | m_CorrespondingSourceObject: {fileID: 0} 1062 | m_PrefabInstance: {fileID: 0} 1063 | m_PrefabAsset: {fileID: 0} 1064 | m_GameObject: {fileID: 157190} 1065 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1066 | m_LocalPosition: {x: 0, y: 0, z: 0} 1067 | m_LocalScale: {x: 1, y: 1, z: 1} 1068 | m_Children: [] 1069 | m_Father: {fileID: 22439200} 1070 | m_RootOrder: 0 1071 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1072 | m_AnchorMin: {x: 0.5, y: 1} 1073 | m_AnchorMax: {x: 0.5, y: 1} 1074 | m_AnchoredPosition: {x: 0, y: -30} 1075 | m_SizeDelta: {x: 160, y: 30} 1076 | m_Pivot: {x: 0.5, y: 0.5} 1077 | --- !u!222 &22241534 1078 | CanvasRenderer: 1079 | m_ObjectHideFlags: 0 1080 | m_CorrespondingSourceObject: {fileID: 0} 1081 | m_PrefabInstance: {fileID: 0} 1082 | m_PrefabAsset: {fileID: 0} 1083 | m_GameObject: {fileID: 157190} 1084 | m_CullTransparentMesh: 0 1085 | --- !u!114 &11408166 1086 | MonoBehaviour: 1087 | m_ObjectHideFlags: 0 1088 | m_CorrespondingSourceObject: {fileID: 0} 1089 | m_PrefabInstance: {fileID: 0} 1090 | m_PrefabAsset: {fileID: 0} 1091 | m_GameObject: {fileID: 157190} 1092 | m_Enabled: 1 1093 | m_EditorHideFlags: 0 1094 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 1095 | m_Name: 1096 | m_EditorClassIdentifier: 1097 | m_Material: {fileID: 0} 1098 | m_Color: {r: 0.1953125, g: 0.1953125, b: 0.1953125, a: 1} 1099 | m_RaycastTarget: 1 1100 | m_OnCullStateChanged: 1101 | m_PersistentCalls: 1102 | m_Calls: [] 1103 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 1104 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 1105 | m_FontData: 1106 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 1107 | m_FontSize: 14 1108 | m_FontStyle: 1 1109 | m_BestFit: 0 1110 | m_MinSize: 10 1111 | m_MaxSize: 40 1112 | m_Alignment: 1 1113 | m_AlignByGeometry: 0 1114 | m_RichText: 1 1115 | m_HorizontalOverflow: 0 1116 | m_VerticalOverflow: 0 1117 | m_LineSpacing: 1 1118 | m_Text: Armor 1119 | --- !u!1 &161990 1120 | GameObject: 1121 | m_ObjectHideFlags: 0 1122 | m_CorrespondingSourceObject: {fileID: 0} 1123 | m_PrefabInstance: {fileID: 0} 1124 | m_PrefabAsset: {fileID: 0} 1125 | serializedVersion: 6 1126 | m_Component: 1127 | - component: {fileID: 22491526} 1128 | - component: {fileID: 22200110} 1129 | - component: {fileID: 11400112} 1130 | m_Layer: 5 1131 | m_Name: Title 1132 | m_TagString: Untagged 1133 | m_Icon: {fileID: 0} 1134 | m_NavMeshLayer: 0 1135 | m_StaticEditorFlags: 0 1136 | m_IsActive: 1 1137 | --- !u!224 &22491526 1138 | RectTransform: 1139 | m_ObjectHideFlags: 0 1140 | m_CorrespondingSourceObject: {fileID: 0} 1141 | m_PrefabInstance: {fileID: 0} 1142 | m_PrefabAsset: {fileID: 0} 1143 | m_GameObject: {fileID: 161990} 1144 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1145 | m_LocalPosition: {x: 0, y: 0, z: 0} 1146 | m_LocalScale: {x: 1, y: 1, z: 1} 1147 | m_Children: [] 1148 | m_Father: {fileID: 22468874} 1149 | m_RootOrder: 0 1150 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1151 | m_AnchorMin: {x: 0.5, y: 1} 1152 | m_AnchorMax: {x: 0.5, y: 1} 1153 | m_AnchoredPosition: {x: 0, y: -30} 1154 | m_SizeDelta: {x: 160, y: 30} 1155 | m_Pivot: {x: 0.5, y: 0.5} 1156 | --- !u!222 &22200110 1157 | CanvasRenderer: 1158 | m_ObjectHideFlags: 0 1159 | m_CorrespondingSourceObject: {fileID: 0} 1160 | m_PrefabInstance: {fileID: 0} 1161 | m_PrefabAsset: {fileID: 0} 1162 | m_GameObject: {fileID: 161990} 1163 | m_CullTransparentMesh: 0 1164 | --- !u!114 &11400112 1165 | MonoBehaviour: 1166 | m_ObjectHideFlags: 0 1167 | m_CorrespondingSourceObject: {fileID: 0} 1168 | m_PrefabInstance: {fileID: 0} 1169 | m_PrefabAsset: {fileID: 0} 1170 | m_GameObject: {fileID: 161990} 1171 | m_Enabled: 1 1172 | m_EditorHideFlags: 0 1173 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 1174 | m_Name: 1175 | m_EditorClassIdentifier: 1176 | m_Material: {fileID: 0} 1177 | m_Color: {r: 0.1953125, g: 0.1953125, b: 0.1953125, a: 1} 1178 | m_RaycastTarget: 1 1179 | m_OnCullStateChanged: 1180 | m_PersistentCalls: 1181 | m_Calls: [] 1182 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 1183 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 1184 | m_FontData: 1185 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 1186 | m_FontSize: 14 1187 | m_FontStyle: 1 1188 | m_BestFit: 0 1189 | m_MinSize: 10 1190 | m_MaxSize: 40 1191 | m_Alignment: 1 1192 | m_AlignByGeometry: 0 1193 | m_RichText: 1 1194 | m_HorizontalOverflow: 0 1195 | m_VerticalOverflow: 0 1196 | m_LineSpacing: 1 1197 | m_Text: Crafting 1198 | --- !u!1 &172636 1199 | GameObject: 1200 | m_ObjectHideFlags: 0 1201 | m_CorrespondingSourceObject: {fileID: 0} 1202 | m_PrefabInstance: {fileID: 0} 1203 | m_PrefabAsset: {fileID: 0} 1204 | serializedVersion: 6 1205 | m_Component: 1206 | - component: {fileID: 22495624} 1207 | m_Layer: 5 1208 | m_Name: Fill Area 1209 | m_TagString: Untagged 1210 | m_Icon: {fileID: 0} 1211 | m_NavMeshLayer: 0 1212 | m_StaticEditorFlags: 0 1213 | m_IsActive: 1 1214 | --- !u!224 &22495624 1215 | RectTransform: 1216 | m_ObjectHideFlags: 0 1217 | m_CorrespondingSourceObject: {fileID: 0} 1218 | m_PrefabInstance: {fileID: 0} 1219 | m_PrefabAsset: {fileID: 0} 1220 | m_GameObject: {fileID: 172636} 1221 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1222 | m_LocalPosition: {x: 0, y: 0, z: 0} 1223 | m_LocalScale: {x: 1, y: 1, z: 1} 1224 | m_Children: 1225 | - {fileID: 22470872} 1226 | m_Father: {fileID: 22466960} 1227 | m_RootOrder: 1 1228 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1229 | m_AnchorMin: {x: 0, y: 0.25} 1230 | m_AnchorMax: {x: 1, y: 0.75} 1231 | m_AnchoredPosition: {x: 0, y: 0} 1232 | m_SizeDelta: {x: 0, y: 0} 1233 | m_Pivot: {x: 0.5, y: 0.5} 1234 | --- !u!1 &173172 1235 | GameObject: 1236 | m_ObjectHideFlags: 0 1237 | m_CorrespondingSourceObject: {fileID: 0} 1238 | m_PrefabInstance: {fileID: 0} 1239 | m_PrefabAsset: {fileID: 0} 1240 | serializedVersion: 6 1241 | m_Component: 1242 | - component: {fileID: 22439200} 1243 | - component: {fileID: 22242160} 1244 | - component: {fileID: 11466668} 1245 | m_Layer: 5 1246 | m_Name: Armor 1247 | m_TagString: Untagged 1248 | m_Icon: {fileID: 0} 1249 | m_NavMeshLayer: 0 1250 | m_StaticEditorFlags: 0 1251 | m_IsActive: 1 1252 | --- !u!224 &22439200 1253 | RectTransform: 1254 | m_ObjectHideFlags: 0 1255 | m_CorrespondingSourceObject: {fileID: 0} 1256 | m_PrefabInstance: {fileID: 0} 1257 | m_PrefabAsset: {fileID: 0} 1258 | m_GameObject: {fileID: 173172} 1259 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1260 | m_LocalPosition: {x: 0, y: 0, z: 0} 1261 | m_LocalScale: {x: 1, y: 1, z: 1} 1262 | m_Children: 1263 | - {fileID: 22444524} 1264 | m_Father: {fileID: 22454274} 1265 | m_RootOrder: 0 1266 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1267 | m_AnchorMin: {x: 0.5, y: 0} 1268 | m_AnchorMax: {x: 0.5, y: 0} 1269 | m_AnchoredPosition: {x: -600, y: 350} 1270 | m_SizeDelta: {x: 300, y: 500} 1271 | m_Pivot: {x: 0.5, y: 0.5} 1272 | --- !u!222 &22242160 1273 | CanvasRenderer: 1274 | m_ObjectHideFlags: 0 1275 | m_CorrespondingSourceObject: {fileID: 0} 1276 | m_PrefabInstance: {fileID: 0} 1277 | m_PrefabAsset: {fileID: 0} 1278 | m_GameObject: {fileID: 173172} 1279 | m_CullTransparentMesh: 0 1280 | --- !u!114 &11466668 1281 | MonoBehaviour: 1282 | m_ObjectHideFlags: 0 1283 | m_CorrespondingSourceObject: {fileID: 0} 1284 | m_PrefabInstance: {fileID: 0} 1285 | m_PrefabAsset: {fileID: 0} 1286 | m_GameObject: {fileID: 173172} 1287 | m_Enabled: 1 1288 | m_EditorHideFlags: 0 1289 | m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 1290 | m_Name: 1291 | m_EditorClassIdentifier: 1292 | m_Material: {fileID: 0} 1293 | m_Color: {r: 0.33333334, g: 0.33333334, b: 0.33333334, a: 0.9019608} 1294 | m_RaycastTarget: 1 1295 | m_OnCullStateChanged: 1296 | m_PersistentCalls: 1297 | m_Calls: [] 1298 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 1299 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 1300 | m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} 1301 | m_Type: 1 1302 | m_PreserveAspect: 0 1303 | m_FillCenter: 1 1304 | m_FillMethod: 4 1305 | m_FillAmount: 1 1306 | m_FillClockwise: 1 1307 | m_FillOrigin: 0 1308 | m_UseSpriteMesh: 0 1309 | --- !u!1 &185740 1310 | GameObject: 1311 | m_ObjectHideFlags: 0 1312 | m_CorrespondingSourceObject: {fileID: 0} 1313 | m_PrefabInstance: {fileID: 0} 1314 | m_PrefabAsset: {fileID: 0} 1315 | serializedVersion: 6 1316 | m_Component: 1317 | - component: {fileID: 22473012} 1318 | - component: {fileID: 22217148} 1319 | - component: {fileID: 11438824} 1320 | m_Layer: 5 1321 | m_Name: Background 1322 | m_TagString: Untagged 1323 | m_Icon: {fileID: 0} 1324 | m_NavMeshLayer: 0 1325 | m_StaticEditorFlags: 0 1326 | m_IsActive: 1 1327 | --- !u!224 &22473012 1328 | RectTransform: 1329 | m_ObjectHideFlags: 0 1330 | m_CorrespondingSourceObject: {fileID: 0} 1331 | m_PrefabInstance: {fileID: 0} 1332 | m_PrefabAsset: {fileID: 0} 1333 | m_GameObject: {fileID: 185740} 1334 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1335 | m_LocalPosition: {x: 0, y: 0, z: 0} 1336 | m_LocalScale: {x: 1, y: 1, z: 1} 1337 | m_Children: [] 1338 | m_Father: {fileID: 22466960} 1339 | m_RootOrder: 0 1340 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1341 | m_AnchorMin: {x: 0, y: 0.25} 1342 | m_AnchorMax: {x: 1, y: 0.75} 1343 | m_AnchoredPosition: {x: 0, y: 0} 1344 | m_SizeDelta: {x: 0, y: 0} 1345 | m_Pivot: {x: 0.5, y: 0.5} 1346 | --- !u!222 &22217148 1347 | CanvasRenderer: 1348 | m_ObjectHideFlags: 0 1349 | m_CorrespondingSourceObject: {fileID: 0} 1350 | m_PrefabInstance: {fileID: 0} 1351 | m_PrefabAsset: {fileID: 0} 1352 | m_GameObject: {fileID: 185740} 1353 | m_CullTransparentMesh: 0 1354 | --- !u!114 &11438824 1355 | MonoBehaviour: 1356 | m_ObjectHideFlags: 0 1357 | m_CorrespondingSourceObject: {fileID: 0} 1358 | m_PrefabInstance: {fileID: 0} 1359 | m_PrefabAsset: {fileID: 0} 1360 | m_GameObject: {fileID: 185740} 1361 | m_Enabled: 1 1362 | m_EditorHideFlags: 0 1363 | m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 1364 | m_Name: 1365 | m_EditorClassIdentifier: 1366 | m_Material: {fileID: 0} 1367 | m_Color: {r: 0.33333334, g: 0.33333334, b: 0.33333334, a: 0.39215687} 1368 | m_RaycastTarget: 1 1369 | m_OnCullStateChanged: 1370 | m_PersistentCalls: 1371 | m_Calls: [] 1372 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 1373 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 1374 | m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} 1375 | m_Type: 1 1376 | m_PreserveAspect: 0 1377 | m_FillCenter: 1 1378 | m_FillMethod: 4 1379 | m_FillAmount: 1 1380 | m_FillClockwise: 1 1381 | m_FillOrigin: 0 1382 | m_UseSpriteMesh: 0 1383 | -------------------------------------------------------------------------------- /Assets/Resources/Prefabs/GUI/GUI.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a0df5128e99b40b40b5320e613d1faf1 3 | timeCreated: 1429732110 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources/Prefabs/Scene.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f3b386f07e4f76a4aad2bb914fda9184 3 | folderAsset: yes 4 | timeCreated: 1429732119 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Resources/Prefabs/Scene/Chunk.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &168730 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: 433390} 12 | - component: {fileID: 3354470} 13 | - component: {fileID: 2307034} 14 | - component: {fileID: 6453676} 15 | - component: {fileID: 11473016} 16 | m_Layer: 0 17 | m_Name: Chunk 18 | m_TagString: Untagged 19 | m_Icon: {fileID: 0} 20 | m_NavMeshLayer: 0 21 | m_StaticEditorFlags: 0 22 | m_IsActive: 1 23 | --- !u!4 &433390 24 | Transform: 25 | m_ObjectHideFlags: 0 26 | m_CorrespondingSourceObject: {fileID: 0} 27 | m_PrefabInstance: {fileID: 0} 28 | m_PrefabAsset: {fileID: 0} 29 | m_GameObject: {fileID: 168730} 30 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 31 | m_LocalPosition: {x: 0, y: 0, z: 0} 32 | m_LocalScale: {x: 1, y: 1, z: 1} 33 | m_Children: [] 34 | m_Father: {fileID: 0} 35 | m_RootOrder: 0 36 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 37 | --- !u!33 &3354470 38 | MeshFilter: 39 | m_ObjectHideFlags: 0 40 | m_CorrespondingSourceObject: {fileID: 0} 41 | m_PrefabInstance: {fileID: 0} 42 | m_PrefabAsset: {fileID: 0} 43 | m_GameObject: {fileID: 168730} 44 | m_Mesh: {fileID: 0} 45 | --- !u!23 &2307034 46 | MeshRenderer: 47 | m_ObjectHideFlags: 0 48 | m_CorrespondingSourceObject: {fileID: 0} 49 | m_PrefabInstance: {fileID: 0} 50 | m_PrefabAsset: {fileID: 0} 51 | m_GameObject: {fileID: 168730} 52 | m_Enabled: 1 53 | m_CastShadows: 1 54 | m_ReceiveShadows: 1 55 | m_DynamicOccludee: 1 56 | m_MotionVectors: 1 57 | m_LightProbeUsage: 1 58 | m_ReflectionProbeUsage: 1 59 | m_RenderingLayerMask: 1 60 | m_RendererPriority: 0 61 | m_Materials: 62 | - {fileID: 2100000, guid: 1862f4e1da7ade64cbf658561c36901b, type: 2} 63 | - {fileID: 2100000, guid: 97f670fd2167d6b468d23134548dc87d, type: 2} 64 | m_StaticBatchInfo: 65 | firstSubMesh: 0 66 | subMeshCount: 0 67 | m_StaticBatchRoot: {fileID: 0} 68 | m_ProbeAnchor: {fileID: 0} 69 | m_LightProbeVolumeOverride: {fileID: 0} 70 | m_ScaleInLightmap: 1 71 | m_PreserveUVs: 0 72 | m_IgnoreNormalsForChartDetection: 0 73 | m_ImportantGI: 0 74 | m_StitchLightmapSeams: 0 75 | m_SelectedEditorRenderState: 3 76 | m_MinimumChartSize: 4 77 | m_AutoUVMaxDistance: 0.5 78 | m_AutoUVMaxAngle: 89 79 | m_LightmapParameters: {fileID: 0} 80 | m_SortingLayerID: 0 81 | m_SortingLayer: 0 82 | m_SortingOrder: 0 83 | --- !u!64 &6453676 84 | MeshCollider: 85 | m_ObjectHideFlags: 0 86 | m_CorrespondingSourceObject: {fileID: 0} 87 | m_PrefabInstance: {fileID: 0} 88 | m_PrefabAsset: {fileID: 0} 89 | m_GameObject: {fileID: 168730} 90 | m_Material: {fileID: 0} 91 | m_IsTrigger: 0 92 | m_Enabled: 1 93 | serializedVersion: 3 94 | m_Convex: 0 95 | m_CookingOptions: 14 96 | m_Mesh: {fileID: 0} 97 | --- !u!114 &11473016 98 | MonoBehaviour: 99 | m_ObjectHideFlags: 0 100 | m_CorrespondingSourceObject: {fileID: 0} 101 | m_PrefabInstance: {fileID: 0} 102 | m_PrefabAsset: {fileID: 0} 103 | m_GameObject: {fileID: 168730} 104 | m_Enabled: 1 105 | m_EditorHideFlags: 0 106 | m_Script: {fileID: 11500000, guid: fd9806d236cf35a449ffec65d55535f3, type: 3} 107 | m_Name: 108 | m_EditorClassIdentifier: 109 | mesh: {fileID: 0} 110 | collider: {fileID: 0} 111 | colMesh: {fileID: 0} 112 | chunkX: 0 113 | chunkY: 0 114 | chunkZ: 0 115 | update: 0 116 | isBorderChunk: 1 117 | -------------------------------------------------------------------------------- /Assets/Resources/Prefabs/Scene/Chunk.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9927b4c6388df0c4a9e110386588aac4 3 | timeCreated: 1431524236 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources/Prefabs/Scene/Directional light.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &125838 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: 435362} 12 | - component: {fileID: 10855716} 13 | m_Layer: 0 14 | m_Name: Directional light 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &435362 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 125838} 27 | m_LocalRotation: {x: 0.40821794, y: -0.23456973, z: 0.10938166, w: 0.8754261} 28 | m_LocalPosition: {x: -7.667552, y: 58.49152, z: 93.7599} 29 | m_LocalScale: {x: 1, y: 0.9999999, z: 1} 30 | m_Children: [] 31 | m_Father: {fileID: 0} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!108 &10855716 35 | Light: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 125838} 41 | m_Enabled: 1 42 | serializedVersion: 8 43 | m_Type: 1 44 | m_Color: {r: 1, g: 1, b: 1, a: 1} 45 | m_Intensity: 1.5 46 | m_Range: 10 47 | m_SpotAngle: 30 48 | m_CookieSize: 10 49 | m_Shadows: 50 | m_Type: 2 51 | m_Resolution: -1 52 | m_CustomResolution: -1 53 | m_Strength: 1 54 | m_Bias: 0.05 55 | m_NormalBias: 0.4 56 | m_NearPlane: 0.2 57 | m_Cookie: {fileID: 0} 58 | m_DrawHalo: 0 59 | m_Flare: {fileID: 12100000, guid: 09ebe82dbd1113c3d000dc0b8d76c639, type: 2} 60 | m_RenderMode: 0 61 | m_CullingMask: 62 | serializedVersion: 2 63 | m_Bits: 4294967295 64 | m_Lightmapping: 1 65 | m_LightShadowCasterMode: 0 66 | m_AreaSize: {x: 1, y: 1} 67 | m_BounceIntensity: 1 68 | m_ColorTemperature: 6570 69 | m_UseColorTemperature: 0 70 | m_ShadowRadius: 0 71 | m_ShadowAngle: 0 72 | -------------------------------------------------------------------------------- /Assets/Resources/Prefabs/Scene/Directional light.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0fce80307f0489746ae45e2b24ec9229 3 | timeCreated: 1429732112 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 80ba52f9e9ccacd40ab541616dfe4628 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Resources/Textures/Crosshair.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lischilpp/unity-voxel-engine/d1bd489bdbadab976ec28e179303d296b0ffba0c/Assets/Resources/Textures/Crosshair.png -------------------------------------------------------------------------------- /Assets/Resources/Textures/Crosshair.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3cd106b6df9390f47a0ba7c1d0c2b588 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 0 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | seamlessCubemap: 0 24 | textureFormat: -1 25 | maxTextureSize: 1024 26 | textureSettings: 27 | filterMode: 0 28 | aniso: -1 29 | mipBias: -1 30 | wrapMode: -1 31 | nPOTScale: 0 32 | lightmap: 0 33 | compressionQuality: 50 34 | spriteMode: 0 35 | spriteExtrude: 1 36 | spriteMeshType: 1 37 | alignment: 0 38 | spritePivot: {x: .5, y: .5} 39 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 40 | spritePixelsToUnits: 100 41 | alphaIsTransparency: 0 42 | textureType: 5 43 | buildTargetSettings: [] 44 | spriteSheet: 45 | sprites: [] 46 | spritePackingTag: 47 | userData: 48 | -------------------------------------------------------------------------------- /Assets/Resources/Textures/Dirt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lischilpp/unity-voxel-engine/d1bd489bdbadab976ec28e179303d296b0ffba0c/Assets/Resources/Textures/Dirt.png -------------------------------------------------------------------------------- /Assets/Resources/Textures/Dirt.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1d236397ead574e59b883c24672311c0 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 13 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | flipGreenChannel: 0 24 | isReadable: 0 25 | streamingMipmaps: 0 26 | streamingMipmapsPriority: 0 27 | vTOnly: 0 28 | ignoreMipmapLimit: 0 29 | grayScaleToAlpha: 0 30 | generateCubemap: 6 31 | cubemapConvolution: 0 32 | seamlessCubemap: 0 33 | textureFormat: 1 34 | maxTextureSize: 2048 35 | textureSettings: 36 | serializedVersion: 2 37 | filterMode: 0 38 | aniso: 1 39 | mipBias: 0 40 | wrapU: 0 41 | wrapV: 0 42 | wrapW: 0 43 | nPOTScale: 0 44 | lightmap: 0 45 | compressionQuality: 50 46 | spriteMode: 1 47 | spriteExtrude: 1 48 | spriteMeshType: 1 49 | alignment: 0 50 | spritePivot: {x: 0.5, y: 0.5} 51 | spritePixelsToUnits: 4 52 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 53 | spriteGenerateFallbackPhysicsShape: 1 54 | alphaUsage: 1 55 | alphaIsTransparency: 1 56 | spriteTessellationDetail: -1 57 | textureType: 8 58 | textureShape: 1 59 | singleChannelComponent: 0 60 | flipbookRows: 1 61 | flipbookColumns: 1 62 | maxTextureSizeSet: 0 63 | compressionQualitySet: 0 64 | textureFormatSet: 0 65 | ignorePngGamma: 0 66 | applyGammaDecoding: 0 67 | swizzle: 50462976 68 | cookieLightType: 0 69 | platformSettings: 70 | - serializedVersion: 3 71 | buildTarget: DefaultTexturePlatform 72 | maxTextureSize: 2048 73 | resizeAlgorithm: 0 74 | textureFormat: -1 75 | textureCompression: 1 76 | compressionQuality: 50 77 | crunchedCompression: 0 78 | allowsAlphaSplitting: 0 79 | overridden: 0 80 | ignorePlatformSupport: 0 81 | androidETC2FallbackOverride: 0 82 | forceMaximumCompressionQuality_BC6H_BC7: 0 83 | - serializedVersion: 3 84 | buildTarget: Standalone 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | ignorePlatformSupport: 0 94 | androidETC2FallbackOverride: 0 95 | forceMaximumCompressionQuality_BC6H_BC7: 0 96 | - serializedVersion: 3 97 | buildTarget: WebGL 98 | maxTextureSize: 2048 99 | resizeAlgorithm: 0 100 | textureFormat: -1 101 | textureCompression: 1 102 | compressionQuality: 50 103 | crunchedCompression: 0 104 | allowsAlphaSplitting: 0 105 | overridden: 0 106 | ignorePlatformSupport: 0 107 | androidETC2FallbackOverride: 0 108 | forceMaximumCompressionQuality_BC6H_BC7: 0 109 | spriteSheet: 110 | serializedVersion: 2 111 | sprites: [] 112 | outline: [] 113 | physicsShape: [] 114 | bones: [] 115 | spriteID: 5e97eb03825dee720800000000000000 116 | internalID: 0 117 | vertices: [] 118 | indices: 119 | edges: [] 120 | weights: [] 121 | secondaryTextures: [] 122 | nameFileIdTable: {} 123 | mipmapLimitGroupName: 124 | pSDRemoveMatte: 0 125 | userData: 126 | assetBundleName: 127 | assetBundleVariant: 128 | -------------------------------------------------------------------------------- /Assets/Resources/Textures/Texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lischilpp/unity-voxel-engine/d1bd489bdbadab976ec28e179303d296b0ffba0c/Assets/Resources/Textures/Texture.png -------------------------------------------------------------------------------- /Assets/Resources/Textures/Texture.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e7af95decec559148be9384b1d17e9c0 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 13 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | flipGreenChannel: 0 24 | isReadable: 0 25 | streamingMipmaps: 0 26 | streamingMipmapsPriority: 0 27 | vTOnly: 0 28 | ignoreMipmapLimit: 0 29 | grayScaleToAlpha: 0 30 | generateCubemap: 6 31 | cubemapConvolution: 0 32 | seamlessCubemap: 0 33 | textureFormat: -1 34 | maxTextureSize: 1024 35 | textureSettings: 36 | serializedVersion: 2 37 | filterMode: 0 38 | aniso: 1 39 | mipBias: 0 40 | wrapU: 0 41 | wrapV: 0 42 | wrapW: 0 43 | nPOTScale: 0 44 | lightmap: 0 45 | compressionQuality: 50 46 | spriteMode: 1 47 | spriteExtrude: 1 48 | spriteMeshType: 1 49 | alignment: 0 50 | spritePivot: {x: 0.5, y: 0.5} 51 | spritePixelsToUnits: 100 52 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 53 | spriteGenerateFallbackPhysicsShape: 1 54 | alphaUsage: 1 55 | alphaIsTransparency: 0 56 | spriteTessellationDetail: -1 57 | textureType: 0 58 | textureShape: 1 59 | singleChannelComponent: 0 60 | flipbookRows: 1 61 | flipbookColumns: 1 62 | maxTextureSizeSet: 0 63 | compressionQualitySet: 0 64 | textureFormatSet: 0 65 | ignorePngGamma: 0 66 | applyGammaDecoding: 1 67 | swizzle: 50462976 68 | cookieLightType: 1 69 | platformSettings: 70 | - serializedVersion: 3 71 | buildTarget: DefaultTexturePlatform 72 | maxTextureSize: 1024 73 | resizeAlgorithm: 0 74 | textureFormat: -1 75 | textureCompression: 1 76 | compressionQuality: 50 77 | crunchedCompression: 0 78 | allowsAlphaSplitting: 0 79 | overridden: 0 80 | ignorePlatformSupport: 0 81 | androidETC2FallbackOverride: 0 82 | forceMaximumCompressionQuality_BC6H_BC7: 0 83 | - serializedVersion: 3 84 | buildTarget: Standalone 85 | maxTextureSize: 1024 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | ignorePlatformSupport: 0 94 | androidETC2FallbackOverride: 0 95 | forceMaximumCompressionQuality_BC6H_BC7: 0 96 | - serializedVersion: 3 97 | buildTarget: WebGL 98 | maxTextureSize: 1024 99 | resizeAlgorithm: 0 100 | textureFormat: -1 101 | textureCompression: 1 102 | compressionQuality: 50 103 | crunchedCompression: 0 104 | allowsAlphaSplitting: 0 105 | overridden: 0 106 | ignorePlatformSupport: 0 107 | androidETC2FallbackOverride: 0 108 | forceMaximumCompressionQuality_BC6H_BC7: 0 109 | spriteSheet: 110 | serializedVersion: 2 111 | sprites: [] 112 | outline: [] 113 | physicsShape: [] 114 | bones: [] 115 | spriteID: 5e97eb03825dee720800000000000000 116 | internalID: 0 117 | vertices: [] 118 | indices: 119 | edges: [] 120 | weights: [] 121 | secondaryTextures: [] 122 | nameFileIdTable: {} 123 | mipmapLimitGroupName: 124 | pSDRemoveMatte: 0 125 | userData: 126 | assetBundleName: 127 | assetBundleVariant: 128 | -------------------------------------------------------------------------------- /Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a12a4451fca1817429aceaa97fa5c2a2 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f3359aff4b2e86444a416cc8ff5d7e0d 3 | folderAsset: yes 4 | timeCreated: 1430928758 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/LoadingScreen.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | using System.Collections; 4 | 5 | public class LoadingScreenClass { 6 | public GameObject gameObject; 7 | public Slider progres; 8 | public LoadingScreenClass(GameObject gameObject) { 9 | this.gameObject = gameObject; 10 | this.progres = gameObject.transform.Find("Progres").gameObject.GetComponent(); 11 | } 12 | 13 | public void Show() { 14 | this.gameObject.SetActive(true); 15 | } 16 | 17 | public void Hide() { 18 | this.gameObject.SetActive(false); 19 | } 20 | 21 | public void Toggle() { 22 | this.gameObject.SetActive(!this.gameObject.activeSelf); 23 | } 24 | 25 | public void SetProgres(float value) { 26 | this.progres.normalizedValue = value; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/LoadingScreen.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 989c0e36cff9d124c956575bc26ab8b7 3 | timeCreated: 1430928803 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/PlayerGUI.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class PlayerGUI : MonoBehaviour { 5 | 6 | public Material defaultMaterial; 7 | public Material transparentMaterial; 8 | public Texture2D defaultTexture; 9 | 10 | public static LoadingScreenClass LoadingScreen; 11 | 12 | // Use this for initialization 13 | void Awake () { 14 | LoadingScreen = new LoadingScreenClass(GameObject.Find ("LoadingScreen")); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/PlayerGUI.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4029939da1b6274429a1e2bd66b6acfc 3 | timeCreated: 1430928768 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/Lib.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f664650c5739d7f4c8746f7779e594ec 3 | folderAsset: yes 4 | timeCreated: 1429444442 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scripts/Lib/Vector3i.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public struct Vector3i { 5 | public int x, y, z; 6 | public Vector3i(int x, int y, int z) { 7 | this.x = x; 8 | this.y = y; 9 | this.z = z; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Lib/Vector3i.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9bd38b8f2ed84f6419c60e1d511a6d9a 3 | timeCreated: 1429444466 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/Player.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7138f3cdaeffd684087101fe2703e76e 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Scripts/Player/FPController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | [RequireComponent(typeof(CharacterController))] 6 | public class FPController : MonoBehaviour 7 | { 8 | public static Camera playerCamera; 9 | public float movementSpeed = 5f; 10 | public float jumpHeight = 0.8f; 11 | public float gravity = 9.81f; 12 | public float lookSpeed = 2f; 13 | public float lookXLimit = 45f; 14 | public bool freeFlyMode = false; 15 | public float freeFlySpeedMultiplier = 4f; 16 | 17 | public bool canMove = false; 18 | 19 | private CharacterController controller; 20 | private Vector3 playerVelocity; 21 | private bool isGrounded; 22 | 23 | float rotationX = 0; 24 | 25 | private void Start() 26 | { 27 | playerCamera = GameObject.Find("Main Camera").GetComponent(); 28 | controller = GetComponent(); 29 | Cursor.lockState = CursorLockMode.Locked; 30 | Cursor.visible = false; 31 | } 32 | 33 | private void Update() 34 | { 35 | if (!canMove) 36 | { 37 | return; 38 | } 39 | UpdateMovement(); 40 | UpdateCameraRotation(); 41 | } 42 | 43 | private void UpdateMovement() { 44 | float moveX = Input.GetAxis("Horizontal"); 45 | float moveZ = Input.GetAxis("Vertical"); 46 | 47 | Vector3 move = transform.right * moveX + transform.forward * moveZ; 48 | 49 | if (freeFlyMode) { 50 | if (Input.GetKey(KeyCode.Space)) { 51 | controller.Move(Vector3.up * movementSpeed * freeFlySpeedMultiplier * Time.deltaTime); 52 | }else if (Input.GetKey(KeyCode.LeftShift)) { 53 | controller.Move(Vector3.down * movementSpeed * freeFlySpeedMultiplier * Time.deltaTime); 54 | } 55 | move *= freeFlySpeedMultiplier; 56 | } 57 | else { 58 | // Handle jumping 59 | if (Input.GetButton("Jump") && controller.isGrounded) 60 | { 61 | playerVelocity.y = Mathf.Sqrt(2 * jumpHeight * gravity); 62 | } 63 | 64 | // Apply gravity 65 | playerVelocity.y -= gravity * Time.deltaTime; 66 | 67 | if (controller.isGrounded && playerVelocity.y < 0) 68 | { 69 | // Reset velocity 70 | playerVelocity.y = 0f; 71 | } 72 | } 73 | controller.Move(move * movementSpeed * Time.deltaTime + playerVelocity * Time.deltaTime); 74 | } 75 | 76 | private void UpdateCameraRotation() { 77 | rotationX += -Input.GetAxis("Mouse Y") * lookSpeed; 78 | rotationX = Mathf.Clamp(rotationX, -lookXLimit, lookXLimit); 79 | playerCamera.transform.localRotation = Quaternion.Euler(rotationX, 0, 0); 80 | transform.rotation *= Quaternion.Euler(0, Input.GetAxis("Mouse X") * lookSpeed, 0); 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /Assets/Scripts/Player/FPController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e67049d366213479885c44c4b8476707 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Player/PlayerController.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | 5 | public class PlayerController : MonoBehaviour { 6 | public static FPController fpController; 7 | 8 | void Start () { 9 | GameObject playerGO = GameObject.Find("Player"); 10 | fpController = playerGO.GetComponent(); 11 | } 12 | 13 | public static void Spawn() { 14 | fpController.canMove = true; 15 | PlayerOptions.playerSpawned = true; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Assets/Scripts/Player/PlayerController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9939bdf9d96b72c44bf404d3a7dc594c 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/Player/PlayerHotbar.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | using System.Collections; 4 | 5 | public class PlayerHotbar { 6 | 7 | public Vector2 textureIndexToPosition(int i) { 8 | int y = Mathf.FloorToInt(i/Blocks.textureSize); 9 | int x = i - y * Blocks.textureSize; 10 | return new Vector2(x, y); 11 | } 12 | 13 | public int size; 14 | GameObject gameObject; 15 | //int[] slots; 16 | public int selectedSlot = 0; 17 | 18 | public PlayerHotbar(ref GameObject target, int size) { 19 | this.size = size; 20 | this.gameObject = target; 21 | //slots = new int[size]; 22 | } 23 | 24 | public void setActiveSlot(int i) { 25 | gameObject.transform.GetChild(selectedSlot).GetComponent().color = new Color(255, 255, 255); 26 | selectedSlot = i; 27 | gameObject.transform.GetChild(i).GetComponent().color = new Color(255, 0, 0); 28 | } 29 | 30 | public void switchSlot(bool right) { 31 | int newSlot = selectedSlot; 32 | if (right) { 33 | if (newSlot < size -1 ) 34 | newSlot++; 35 | else 36 | newSlot = 0; 37 | }else { 38 | if (newSlot > 0 ) 39 | newSlot--; 40 | else 41 | newSlot = size - 1; 42 | } 43 | setActiveSlot(newSlot); 44 | } 45 | 46 | public void Update() { 47 | 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Assets/Scripts/Player/PlayerHotbar.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f3d90cfe68f735148b08f6ceae22824e 3 | timeCreated: 1431093562 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/Player/PlayerInventory.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class PlayerInventory: MonoBehaviour { 5 | 6 | public GameObject hotbarGO; 7 | 8 | public int size = 32; 9 | public static PlayerHotbar Hotbar; 10 | 11 | void Start() { 12 | Hotbar = new PlayerHotbar(ref hotbarGO, 8); 13 | } 14 | 15 | 16 | void Update() { 17 | if (Input.GetKeyDown(KeyCode.Alpha1)) { 18 | Hotbar.setActiveSlot(0); 19 | }else if (Input.GetKeyDown(KeyCode.Alpha2)) { 20 | Hotbar.setActiveSlot(1); 21 | }else if (Input.GetKeyDown(KeyCode.Alpha3)) { 22 | Hotbar.setActiveSlot(2); 23 | }else if (Input.GetKeyDown(KeyCode.Alpha4)) { 24 | Hotbar.setActiveSlot(3); 25 | }else if (Input.GetKeyDown(KeyCode.Alpha5)) { 26 | Hotbar.setActiveSlot(4); 27 | }else if (Input.GetKeyDown(KeyCode.Alpha6)) { 28 | Hotbar.setActiveSlot(5); 29 | }else if (Input.GetKeyDown(KeyCode.Alpha7)) { 30 | Hotbar.setActiveSlot(6); 31 | }else if (Input.GetKeyDown(KeyCode.Alpha8)) { 32 | Hotbar.setActiveSlot(7); 33 | } 34 | 35 | if (Input.mouseScrollDelta.y != 0) 36 | Hotbar.switchSlot((Input.mouseScrollDelta.y != 1)); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Assets/Scripts/Player/PlayerInventory.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 88db9102984031948bb37d0da6b6d4d1 3 | timeCreated: 1431093405 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/Player/PlayerOptions.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public static class PlayerOptions { 5 | public static int interactionRange = 10; 6 | public static int renderDistance = 100; 7 | public static bool playerSpawned = false; 8 | public static PlayerInventory Inventory; 9 | } -------------------------------------------------------------------------------- /Assets/Scripts/Player/PlayerOptions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 68b88ce0936d65d4fb74cef491c74a4b 3 | timeCreated: 1430665280 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/Terrain.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 06b329b80970d0042a9109c74e273931 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Scripts/Terrain/Blocks.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class BlockTexture { 5 | public Vector2 textureIndexToPosition(int i) { 6 | int y = Mathf.FloorToInt(i/Blocks.textureSize); 7 | int x = i - y * Blocks.textureSize; 8 | return new Vector2(x, y); 9 | } 10 | 11 | public Vector2 top, front, right, back, left, bottom; 12 | 13 | public BlockTexture(int _top, int _front, int _right, int _back, int _left, int _bottom) { 14 | top = textureIndexToPosition(_top); 15 | front = textureIndexToPosition(_front); 16 | right = textureIndexToPosition(_right); 17 | back = textureIndexToPosition(_back); 18 | left = textureIndexToPosition(_left); 19 | bottom = textureIndexToPosition(_bottom); 20 | } 21 | } 22 | 23 | public class BlockPhysics { 24 | public bool isSolid; 25 | public bool isTranslucent; 26 | public bool isTransparent = false; 27 | public bool willConnect = false; 28 | public float light = 0; 29 | public BlockPhysics(bool _isSolid, bool _isTranslucent) { 30 | isSolid = _isSolid; 31 | isTranslucent = _isTranslucent; 32 | } 33 | public BlockPhysics(bool _isSolid, bool _isTranslucent, bool _isTransparent) { 34 | isSolid = _isSolid; 35 | isTranslucent = _isTranslucent; 36 | isTransparent = _isTransparent; 37 | } 38 | public BlockPhysics(bool _isSolid, bool _isTranslucent, bool _isTransparent, bool _willConnect) { 39 | isSolid = _isSolid; 40 | isTranslucent = _isTranslucent; 41 | isTransparent = _isTransparent; 42 | willConnect = _willConnect; 43 | } 44 | } 45 | 46 | public class BlockEntry { 47 | public int id; 48 | public string name; 49 | public BlockTexture texture; 50 | public BlockPhysics physics; 51 | 52 | public BlockEntry(int _id, string _name, BlockTexture _texture, BlockPhysics _physics) { 53 | id = _id; 54 | name = _name; 55 | texture = _texture; 56 | physics = _physics; 57 | } 58 | } 59 | 60 | public enum BlockType: byte { 61 | Air, 62 | Bedrock, 63 | Stone, 64 | Dirt, 65 | GrassBlock, 66 | Wood, 67 | Leaves, 68 | Glass, 69 | Water, 70 | Sand, 71 | IronOre, 72 | SilverOre, 73 | GoldOre, 74 | Grass 75 | } 76 | 77 | public static class Blocks { 78 | 79 | public static int textureSize = 10; 80 | 81 | public static BlockEntry[] blockList = { 82 | new BlockEntry (0, "Air", new BlockTexture (0, 0, 0, 0, 0, 0), new BlockPhysics (false, true)), 83 | new BlockEntry (1, "Bedrock", new BlockTexture (0, 0, 0, 0, 0, 0), new BlockPhysics (true, false)), 84 | new BlockEntry (2, "Stone", new BlockTexture (1, 1, 1, 1, 1, 1), new BlockPhysics (true, false)), 85 | new BlockEntry (3, "Dirt", new BlockTexture (2, 2, 2, 2, 2, 2), new BlockPhysics (true, false)), 86 | new BlockEntry (4, "Grass Block", new BlockTexture (4, 3, 3, 3, 3, 2), new BlockPhysics (true, false)), 87 | new BlockEntry (5, "Wood", new BlockTexture (6, 5, 5, 5, 5, 6), new BlockPhysics (true, false)), 88 | new BlockEntry (6, "Leaves", new BlockTexture (7, 7, 7, 7, 7, 7), new BlockPhysics (true, true)), 89 | new BlockEntry (7, "Glass", new BlockTexture (8, 8, 8, 8, 8, 8), new BlockPhysics (true, true, true, false)), 90 | new BlockEntry (8, "Water", new BlockTexture (9, 9, 9, 9, 9, 9), new BlockPhysics (false, true, true, true)), 91 | new BlockEntry (9, "Sand", new BlockTexture (10, 10, 10, 10, 10, 10), new BlockPhysics (true, false)), 92 | new BlockEntry (10, "Iron Ore",new BlockTexture (11, 11, 11, 11, 11, 11), new BlockPhysics (true, false)), 93 | new BlockEntry (11, "Silver Ore",new BlockTexture (12, 12, 12, 12, 12, 12), new BlockPhysics (true, false)), 94 | new BlockEntry (12, "Gold Ore",new BlockTexture (13, 13, 13, 13, 13, 13), new BlockPhysics (true, false)) 95 | }; 96 | 97 | public static BlockEntry getBlockById(int id) { 98 | return blockList[id]; 99 | } 100 | } -------------------------------------------------------------------------------- /Assets/Scripts/Terrain/Blocks.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aa074560a6884e2409755e39b32646f9 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/Terrain/Chunk.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0d3037657784bb1498ea905668f560f5 3 | folderAsset: yes 4 | timeCreated: 1429445175 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scripts/Terrain/Chunk/Chunk.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | 5 | public class Chunk : MonoBehaviour { 6 | 7 | // ### variables 8 | public MeshCreator meshCreator; 9 | 10 | public Mesh mesh; 11 | public MeshCollider collider; 12 | public Mesh colMesh; 13 | 14 | // position of the chunk 15 | public int chunkX; 16 | public int chunkY; 17 | public int chunkZ; 18 | 19 | // update chunk if necessary 20 | public bool update = false; 21 | public bool isBorderChunk; // faster way to get voxel data if false 22 | 23 | // ### functions 24 | 25 | public delegate int BlockDel(int x, int y, int z); 26 | public BlockDel Block; 27 | 28 | public bool isInBoundariesAndAir(int x, int y, int z) { 29 | int currentBlock = Block (x, y, z); 30 | BlockEntry blockData = Blocks.getBlockById(currentBlock); 31 | return (blockData.physics.isTranslucent); 32 | } 33 | 34 | public bool needToDrawAdjacendBlock(int x1, int y1, int z1, int x2, int y2, int z2) { 35 | int currentBlock = Block (x1, y1, z1); 36 | int adjacendBlock = Block (x2, y2, z2); 37 | BlockEntry adjacendBlockData = Blocks.getBlockById(adjacendBlock); 38 | bool isAir = (adjacendBlock == 0); 39 | if (isAir || adjacendBlockData.physics.isTranslucent ) { 40 | if (!adjacendBlockData.physics.willConnect || !isAir && currentBlock != adjacendBlock) 41 | return true; 42 | } 43 | 44 | return false; 45 | } 46 | 47 | public void GenerateMesh() { 48 | int x,y,z, currentBlock; 49 | for (x = 0; x < VoxelTerrain.chunkManager.chunkSize; x++) { 50 | for (y = 0; y < VoxelTerrain.chunkManager.chunkSize; y++) { 51 | for (z = 0; z < VoxelTerrain.chunkManager.chunkSize; z++) { 52 | currentBlock = Block(x,y,z); 53 | if (currentBlock != 0) { 54 | BlockEntry blockData = Blocks.getBlockById(currentBlock); 55 | if (isInBoundariesAndAir(x, y + 1, z)) { 56 | bool isVisible = needToDrawAdjacendBlock(x,y,z, x, y + 1, z); 57 | meshCreator.CubeTop(x, y, z, blockData.texture.top, isVisible, blockData.physics.isSolid, blockData.physics.isTransparent); 58 | } 59 | if (isInBoundariesAndAir(x, y, z - 1)) { 60 | bool isVisible = needToDrawAdjacendBlock(x,y,z, x, y, z - 1); 61 | meshCreator.CubeFront(x, y, z, blockData.texture.front, isVisible, blockData.physics.isSolid, blockData.physics.isTransparent); 62 | } 63 | if (isInBoundariesAndAir(x + 1, y, z)) { 64 | bool isVisible = needToDrawAdjacendBlock(x,y,z, x + 1, y, z); 65 | meshCreator.CubeRight(x, y, z, blockData.texture.right, isVisible, blockData.physics.isSolid, blockData.physics.isTransparent); 66 | } 67 | if (isInBoundariesAndAir(x, y, z + 1)) { 68 | bool isVisible = needToDrawAdjacendBlock(x,y,z, x, y, z + 1); 69 | meshCreator.CubeBack(x, y, z, blockData.texture.back, isVisible, blockData.physics.isSolid, blockData.physics.isTransparent); 70 | } 71 | if (isInBoundariesAndAir(x - 1, y, z)) { 72 | bool isVisible = needToDrawAdjacendBlock(x,y,z, x - 1, y, z); 73 | meshCreator.CubeLeft(x, y, z, blockData.texture.left, isVisible, blockData.physics.isSolid, blockData.physics.isTransparent); 74 | } 75 | if (isInBoundariesAndAir(x, y - 1, z)) { 76 | bool isVisible = needToDrawAdjacendBlock(x,y,z, x, y - 1, z); 77 | meshCreator.CubeBottom(x, y, z, blockData.texture.bottom, isVisible, blockData.physics.isSolid, blockData.physics.isTransparent); 78 | } 79 | } 80 | } 81 | } 82 | } 83 | 84 | meshCreator.updateMesh(); 85 | meshCreator.updateCollider(); 86 | meshCreator.clearMeshData(); 87 | } 88 | 89 | void LateUpdate() { 90 | if (update) { 91 | //float startTime = Time.realtimeSinceStartup; 92 | GenerateMesh (); 93 | update = false; 94 | //Debug.Log ("Chunk update took " + (Time.realtimeSinceStartup - startTime) + "s"); 95 | } 96 | } 97 | 98 | void Start () { 99 | mesh = GetComponent ().mesh; 100 | collider = GetComponent (); 101 | colMesh = new Mesh(); 102 | if (isBorderChunk) { 103 | Block = delegate(int x, int y, int z) {; 104 | return VoxelTerrain.getBlockAt ( 105 | x + chunkX, 106 | y + chunkY, 107 | z + chunkZ 108 | ); 109 | }; 110 | }else { 111 | Block = delegate(int x, int y, int z) { 112 | return VoxelTerrain.data[x + chunkX, 113 | y + chunkY, 114 | z + chunkZ]; 115 | }; 116 | } 117 | meshCreator = new MeshCreator(ref mesh, ref colMesh, ref collider); 118 | GenerateMesh (); 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /Assets/Scripts/Terrain/Chunk/Chunk.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fd9806d236cf35a449ffec65d55535f3 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/Terrain/Chunk/ChunkLoadingQueue.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | 5 | public class ChunkLoadingQueue { 6 | 7 | public ChunkManager chunkManager; 8 | 9 | List queue = new List (); 10 | public GameObject playerGO; 11 | 12 | public float loadingProgres = 0; 13 | public int chunksCount; 14 | float startTime; 15 | 16 | bool chunkRefresh = true; 17 | int chunkLoadsPerFrame = 12; 18 | 19 | public ChunkLoadingQueue(ChunkManager chunkManager, GameObject playerGO) { 20 | this.playerGO = playerGO; 21 | this.chunkManager = chunkManager; 22 | VoxelTerrain.activeChunkPosition = chunkManager.getChunkPosOfBlockPos((int)playerGO.transform.position.x, (int)playerGO.transform.position.y, (int)playerGO.transform.position.z); 23 | chunksCount = chunkManager.chunkCount.x * chunkManager.chunkCount.y * chunkManager.chunkCount.z; 24 | startTime = Time.time; 25 | chunkManager.voxelTerrain.StartCoroutine(loadChunksForPlayer()); 26 | } 27 | 28 | public void addChunk(int x, int y, int z) { 29 | queue.Add(new Vector3i(x, y, z)); 30 | chunkManager.inQueue[x, y, z] = true; 31 | } 32 | 33 | public void loadChunk() { 34 | if (queue.Count > 0) { 35 | Vector3i pos = queue[0]; 36 | int x = pos.x; 37 | int y = pos.y; 38 | int z = pos.z; 39 | 40 | if (x + 1 < chunkManager.chunkCount.x) { // chunk above 41 | if (chunkManager.chunkStates[x + 1, y , z] == 0) { 42 | chunkManager.generateChunk(x + 1, y , z); 43 | return; 44 | } 45 | } 46 | if (x - 1 >= 0) { // chunk left 47 | if (chunkManager.chunkStates[x - 1, y , z] == 0) { 48 | chunkManager.generateChunk(x - 1, y , z); 49 | return; 50 | } 51 | } 52 | if (y + 1 < chunkManager.chunkCount.y) { // chunk above 53 | if (chunkManager.chunkStates[x, y + 1, z] == 0) { 54 | chunkManager.generateChunk(x, y + 1, z); 55 | return; 56 | } 57 | } 58 | if (y - 1 >= 0) { // chunk beneath 59 | if (chunkManager.chunkStates[x, y - 1 , z] == 0) { 60 | chunkManager.generateChunk(x, y - 1 , z); 61 | return; 62 | } 63 | } 64 | if (z + 1 < chunkManager.chunkCount.z) { // chunk behind 65 | if (chunkManager.chunkStates[x, y, z + 1] == 0) { 66 | chunkManager.generateChunk(x, y, z + 1); 67 | return; 68 | } 69 | } 70 | if (z - 1 >= 0) { // chunk front 71 | if (chunkManager.chunkStates[x, y , z - 1] == 0) { 72 | chunkManager.generateChunk(x, y , z - 1); 73 | return; 74 | } 75 | } 76 | if (chunkManager.chunkStates[x, y, z] == 0) { 77 | chunkManager.generateChunk(x, y , z); 78 | return; 79 | } 80 | 81 | 82 | chunkManager.loadChunk(x, y, z); 83 | chunkManager.chunkStates[x,y,z] = (int)ChunkState.Loaded; 84 | chunkManager.inQueue[x, y, z] = false; 85 | queue.Remove (pos); 86 | 87 | if (!PlayerOptions.playerSpawned) { 88 | loadingProgres = (chunksCount - queue.Count)/ (float)chunksCount; 89 | PlayerGUI.LoadingScreen.SetProgres(loadingProgres); 90 | } 91 | 92 | }else { 93 | if (!chunkManager.allChunksLoaded) { 94 | chunkManager.allChunksLoaded = true; 95 | if (!PlayerOptions.playerSpawned) { 96 | PlayerGUI.LoadingScreen.Hide(); 97 | PlayerController.Spawn(); 98 | chunkLoadsPerFrame = 2; 99 | Debug.Log ("It took "+(Time.time - startTime)+"s to generate the terrain"); 100 | 101 | } 102 | } 103 | chunkRefresh = false; 104 | } 105 | } 106 | 107 | public void Update() { 108 | Vector3i newPos = chunkManager.getChunkPosOfBlockPos((int)playerGO.transform.position.x, (int)playerGO.transform.position.y, (int)playerGO.transform.position.z);; 109 | if (newPos.x != VoxelTerrain.activeChunkPosition.x || newPos.y != VoxelTerrain.activeChunkPosition.y || newPos.z != VoxelTerrain.activeChunkPosition.z) { 110 | chunkRefresh = true; 111 | VoxelTerrain.activeChunkPosition = newPos; 112 | } 113 | } 114 | 115 | public IEnumerator loadChunksForPlayer() { 116 | int i, x, y, z, 117 | cCountX = chunkManager.chunkData.GetLength(0), 118 | cCountY = chunkManager.chunkData.GetLength(1), 119 | cCountZ = chunkManager.chunkData.GetLength(2); 120 | Vector3 activeChunkPosition; 121 | while(true) { 122 | if (chunkRefresh) { 123 | activeChunkPosition = new Vector3((float)VoxelTerrain.activeChunkPosition.x, (float)VoxelTerrain.activeChunkPosition.y, (float)VoxelTerrain.activeChunkPosition.z); 124 | //Debug.Log (activeChunkPosition); 125 | for (x = 0; x < cCountX; x++) { 126 | for (y = 0; y < cCountY; y++) { 127 | for (z = 0; z < cCountZ; z++) { 128 | float distanceToPos = Vector3.Distance(new Vector3(x, y, z), activeChunkPosition); 129 | if (chunkManager.chunkData[x, y, z] != null) { 130 | float distanceToChunk = Vector3.Distance(new Vector3(chunkManager.chunkData[x, y, z].chunkX / chunkManager.chunkSize, chunkManager.chunkData[x, y, z].chunkY / chunkManager.chunkSize, chunkManager.chunkData[x, y, z].chunkZ / chunkManager.chunkSize), activeChunkPosition); 131 | if (distanceToChunk > PlayerOptions.renderDistance) { 132 | if(chunkManager.chunkData[x, y, z] != null){ 133 | chunkManager.unloadChunk(x, y, z); 134 | }else if (chunkManager.inQueue[x,y,z]) { 135 | chunkManager.inQueue[x,y,z] = false; 136 | queue.Remove(new Vector3i(x, y, z)); 137 | } 138 | } 139 | }else { 140 | if (distanceToPos < PlayerOptions.renderDistance) { 141 | if (!chunkManager.inQueue[x, y, z]) { 142 | if (chunkManager.chunkStates[x, y, z] != (int)ChunkState.Loaded) { 143 | addChunk(x, y, z); 144 | if (chunkManager.allChunksLoaded) 145 | chunkManager.allChunksLoaded = false; 146 | } 147 | } 148 | } 149 | } 150 | } 151 | } 152 | } 153 | for (i=0; i> VoxelTerrain.chunkSizeShift, 25 | VoxelTerrain.size.y >> VoxelTerrain.chunkSizeShift, 26 | VoxelTerrain.size.z >> VoxelTerrain.chunkSizeShift 27 | ); 28 | chunkData = new Chunk[chunkCount.x, chunkCount.y, chunkCount.z]; 29 | chunkStates = new int[chunkCount.x, chunkCount.y, chunkCount.z]; 30 | inQueue = new bool[chunkCount.x, chunkCount.y, chunkCount.z]; 31 | 32 | 33 | loadingQueue = new ChunkLoadingQueue(this, playerGO); 34 | } 35 | 36 | public void generateChunk(int chunkX, int chunkY, int chunkZ) { 37 | VoxelTerrain.terrainGenerator.generateMapDataFor( 38 | chunkX << VoxelTerrain.chunkSizeShift, 39 | chunkY << VoxelTerrain.chunkSizeShift, 40 | chunkZ << VoxelTerrain.chunkSizeShift 41 | ); 42 | chunkStates[chunkX, chunkY, chunkZ] = (int)ChunkState.Generated; 43 | } 44 | 45 | public void loadChunk(int x, int y, int z) { 46 | 47 | Vector3 pos = new Vector3( 48 | x << VoxelTerrain.chunkSizeShift, 49 | y << VoxelTerrain.chunkSizeShift, 50 | z << VoxelTerrain.chunkSizeShift 51 | ); 52 | 53 | GameObject meshGO = new GameObject ("Chunk"); 54 | meshGO.AddComponent (); 55 | meshGO.AddComponent(); 56 | meshGO.AddComponent(); 57 | meshGO.AddComponent(); 58 | 59 | Chunk chunk = meshGO.GetComponent(); 60 | chunk.chunkX = (int)pos.x; 61 | chunk.chunkY = (int)pos.y; 62 | chunk.chunkZ = (int)pos.z; 63 | chunk.isBorderChunk = isBorderChunk(x, y, z); 64 | 65 | //chunk.VoxelTerrain = VoxelTerrain; 66 | chunk.transform.position = pos; 67 | meshGO.GetComponent().materials = new Material[] { 68 | voxelTerrain.defaultMaterial, 69 | voxelTerrain.transparentMaterial 70 | }; 71 | chunkData [x, y, z] = chunk; 72 | chunkStates[x, y, z] = (int)ChunkState.Loaded; 73 | } 74 | 75 | public void unloadChunk(int x, int y, int z) { 76 | VoxelTerrain.Destroy(chunkData [x,y,z].transform.gameObject); 77 | chunkData [x,y,z] = null; 78 | chunkStates[x,y,z] = (int)ChunkState.Generated; 79 | inQueue[x,y,z] = false; 80 | } 81 | 82 | public void updateChunk(int x, int y, int z) { 83 | if (isChunkPosInBoundaries(x, y, z)) { 84 | if (chunkData[x, y, z] != null) 85 | chunkData[x, y, z].update = true; 86 | } 87 | } 88 | 89 | public void updateChunkOfBlockPos(int x, int y, int z) { 90 | Vector3i chunkPos = getChunkPosOfBlockPos(x, y, z); 91 | updateChunk(chunkPos.x, chunkPos.y, chunkPos.z); 92 | } 93 | 94 | public bool isChunkPosInBoundaries(int x, int y, int z) { 95 | if (x >= 0 && y >= 0 && z >= 0 && x < chunkCount.x && y < chunkCount.y && z < chunkCount.z) 96 | return true; 97 | return false; 98 | } 99 | 100 | public bool isBorderChunk(int x, int y, int z) { 101 | if (x == 0 || y == 0 || z == 0 || x == chunkCount.x - 1 || y == chunkCount.y - 1 || z == chunkCount.z - 1) 102 | return true; 103 | return false; 104 | } 105 | 106 | public Vector3i getChunkPosOfBlockPos(int x, int y, int z) { 107 | return new Vector3i( 108 | Mathf.FloorToInt(x >> VoxelTerrain.chunkSizeShift), 109 | Mathf.FloorToInt(y >> VoxelTerrain.chunkSizeShift), 110 | Mathf.FloorToInt(z >> VoxelTerrain.chunkSizeShift) 111 | ); 112 | } 113 | 114 | public Chunk getChunkForBlockPos(int x, int y, int z) { 115 | return chunkData[ 116 | Mathf.FloorToInt(x >> VoxelTerrain.chunkSizeShift), 117 | Mathf.FloorToInt(y >> VoxelTerrain.chunkSizeShift), 118 | Mathf.FloorToInt(z >> VoxelTerrain.chunkSizeShift) 119 | ]; 120 | } 121 | 122 | public void Update() { 123 | loadingQueue.Update(); 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /Assets/Scripts/Terrain/Chunk/ChunkManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d87f2ce584d7ac94fb4ecacb0d834c54 3 | timeCreated: 1429442302 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/Terrain/Chunk/MeshCreator.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | 5 | public class MeshCreator { 6 | float tUnit = 0.1f; 7 | 8 | int verticesCount = 0, 9 | colliderVerticesCount = 0; 10 | 11 | List newTriangles = new List(), 12 | newTransparentTriangles = new List(), 13 | newColliderTriangles = new List(); 14 | 15 | List newVertices = new List(), 16 | newColliderVertices = new List(); 17 | 18 | List newUV = new List(); 19 | 20 | Mesh mesh, colliderMesh; 21 | MeshCollider collider; 22 | 23 | 24 | public MeshCreator(ref Mesh mesh, ref Mesh colliderMesh, ref MeshCollider collider) { 25 | this.mesh = mesh; 26 | this.colliderMesh = colliderMesh; 27 | this.collider = collider; 28 | } 29 | 30 | public Mesh updateMesh() { 31 | mesh.Clear (); 32 | mesh.vertices = newVertices.ToArray (); 33 | mesh.subMeshCount = 2; 34 | mesh.SetTriangles(newTriangles.ToArray(), 0); 35 | mesh.SetTriangles(newTransparentTriangles.ToArray(), 1); 36 | mesh.uv = newUV.ToArray(); 37 | mesh.RecalculateNormals (); 38 | return mesh; 39 | } 40 | 41 | public void updateCollider() { 42 | colliderMesh.Clear (); 43 | colliderMesh.vertices = newColliderVertices.ToArray (); 44 | colliderMesh.triangles = newColliderTriangles.ToArray (); 45 | collider.sharedMesh = null; 46 | collider.sharedMesh = colliderMesh; 47 | } 48 | 49 | public void clearMeshData() { 50 | newVertices.Clear (); 51 | newTriangles.Clear (); 52 | newTransparentTriangles.Clear (); 53 | newUV.Clear (); 54 | newColliderVertices.Clear (); 55 | newColliderTriangles.Clear (); 56 | 57 | verticesCount = 0; 58 | colliderVerticesCount = 0; 59 | } 60 | 61 | public void addTriangles(ref List target, int[] tris) { 62 | for (int i=0; i 28 | 29 | 30 | namespace SimplexNoise 31 | { 32 | /// 33 | /// Implementation of the Perlin simplex noise, an improved Perlin noise algorithm. 34 | /// Based loosely on SimplexNoise1234 by Stefan Gustavson 35 | /// 36 | /// 37 | public class Noise 38 | { 39 | /// 40 | /// 1D simplex noise 41 | /// 42 | /// 43 | /// 44 | public static float Generate(float x) 45 | { 46 | int i0 = FastFloor(x); 47 | int i1 = i0 + 1; 48 | float x0 = x - i0; 49 | float x1 = x0 - 1.0f; 50 | 51 | float n0, n1; 52 | 53 | float t0 = 1.0f - x0*x0; 54 | t0 *= t0; 55 | n0 = t0 * t0 * grad(perm[i0 & 0xff], x0); 56 | 57 | float t1 = 1.0f - x1*x1; 58 | t1 *= t1; 59 | n1 = t1 * t1 * grad(perm[i1 & 0xff], x1); 60 | // The maximum value of this noise is 8*(3/4)^4 = 2.53125 61 | // A factor of 0.395 scales to fit exactly within [-1,1] 62 | return 0.395f * (n0 + n1); 63 | } 64 | 65 | /// 66 | /// 2D simplex noise 67 | /// 68 | /// 69 | /// 70 | /// 71 | public static float Generate(float x, float y) 72 | { 73 | const float F2 = 0.366025403f; // F2 = 0.5*(sqrt(3.0)-1.0) 74 | const float G2 = 0.211324865f; // G2 = (3.0-Math.sqrt(3.0))/6.0 75 | 76 | float n0, n1, n2; // Noise contributions from the three corners 77 | 78 | // Skew the input space to determine which simplex cell we're in 79 | float s = (x+y)*F2; // Hairy factor for 2D 80 | float xs = x + s; 81 | float ys = y + s; 82 | int i = FastFloor(xs); 83 | int j = FastFloor(ys); 84 | 85 | float t = (float)(i+j)*G2; 86 | float X0 = i-t; // Unskew the cell origin back to (x,y) space 87 | float Y0 = j-t; 88 | float x0 = x-X0; // The x,y distances from the cell origin 89 | float y0 = y-Y0; 90 | 91 | // For the 2D case, the simplex shape is an equilateral triangle. 92 | // Determine which simplex we are in. 93 | int i1, j1; // Offsets for second (middle) corner of simplex in (i,j) coords 94 | if(x0>y0) {i1=1; j1=0;} // lower triangle, XY order: (0,0)->(1,0)->(1,1) 95 | else {i1=0; j1=1;} // upper triangle, YX order: (0,0)->(0,1)->(1,1) 96 | 97 | // A step of (1,0) in (i,j) means a step of (1-c,-c) in (x,y), and 98 | // a step of (0,1) in (i,j) means a step of (-c,1-c) in (x,y), where 99 | // c = (3-sqrt(3))/6 100 | 101 | float x1 = x0 - i1 + G2; // Offsets for middle corner in (x,y) unskewed coords 102 | float y1 = y0 - j1 + G2; 103 | float x2 = x0 - 1.0f + 2.0f * G2; // Offsets for last corner in (x,y) unskewed coords 104 | float y2 = y0 - 1.0f + 2.0f * G2; 105 | 106 | // Wrap the integer indices at 256, to avoid indexing perm[] out of bounds 107 | int ii = i % 256; 108 | int jj = j % 256; 109 | 110 | // Calculate the contribution from the three corners 111 | float t0 = 0.5f - x0*x0-y0*y0; 112 | if(t0 < 0.0f) n0 = 0.0f; 113 | else { 114 | t0 *= t0; 115 | n0 = t0 * t0 * grad(perm[ii+perm[jj]], x0, y0); 116 | } 117 | 118 | float t1 = 0.5f - x1*x1-y1*y1; 119 | if(t1 < 0.0f) n1 = 0.0f; 120 | else { 121 | t1 *= t1; 122 | n1 = t1 * t1 * grad(perm[ii+i1+perm[jj+j1]], x1, y1); 123 | } 124 | 125 | float t2 = 0.5f - x2*x2-y2*y2; 126 | if(t2 < 0.0f) n2 = 0.0f; 127 | else { 128 | t2 *= t2; 129 | n2 = t2 * t2 * grad(perm[ii+1+perm[jj+1]], x2, y2); 130 | } 131 | 132 | // Add contributions from each corner to get the final noise value. 133 | // The result is scaled to return values in the interval [-1,1]. 134 | return 40.0f * (n0 + n1 + n2); // TODO: The scale factor is preliminary! 135 | } 136 | 137 | 138 | public static float Generate(float x, float y, float z) 139 | { 140 | // Simple skewing factors for the 3D case 141 | const float F3 = 0.333333333f; 142 | const float G3 = 0.166666667f; 143 | 144 | float n0, n1, n2, n3; // Noise contributions from the four corners 145 | 146 | // Skew the input space to determine which simplex cell we're in 147 | float s = (x+y+z)*F3; // Very nice and simple skew factor for 3D 148 | float xs = x+s; 149 | float ys = y+s; 150 | float zs = z+s; 151 | int i = FastFloor(xs); 152 | int j = FastFloor(ys); 153 | int k = FastFloor(zs); 154 | 155 | float t = (float)(i+j+k)*G3; 156 | float X0 = i-t; // Unskew the cell origin back to (x,y,z) space 157 | float Y0 = j-t; 158 | float Z0 = k-t; 159 | float x0 = x-X0; // The x,y,z distances from the cell origin 160 | float y0 = y-Y0; 161 | float z0 = z-Z0; 162 | 163 | // For the 3D case, the simplex shape is a slightly irregular tetrahedron. 164 | // Determine which simplex we are in. 165 | int i1, j1, k1; // Offsets for second corner of simplex in (i,j,k) coords 166 | int i2, j2, k2; // Offsets for third corner of simplex in (i,j,k) coords 167 | 168 | /* This code would benefit from a backport from the GLSL version! */ 169 | if(x0>=y0) { 170 | if(y0>=z0) 171 | { i1=1; j1=0; k1=0; i2=1; j2=1; k2=0; } // X Y Z order 172 | else if(x0>=z0) { i1=1; j1=0; k1=0; i2=1; j2=0; k2=1; } // X Z Y order 173 | else { i1=0; j1=0; k1=1; i2=1; j2=0; k2=1; } // Z X Y order 174 | } 175 | else { // x0 0) ? ((int)x) : (((int)x) - 1); 266 | } 267 | 268 | private static int Mod(int x, int m) 269 | { 270 | int a = x % m; 271 | return a < 0 ? a + m : a; 272 | } 273 | 274 | private static float grad( int hash, float x ) 275 | { 276 | int h = hash & 15; 277 | float grad = 1.0f + (h & 7); // Gradient value 1.0, 2.0, ..., 8.0 278 | if ((h & 8) != 0) grad = -grad; // Set a random sign for the gradient 279 | return ( grad * x ); // Multiply the gradient with the distance 280 | } 281 | 282 | private static float grad( int hash, float x, float y ) 283 | { 284 | int h = hash & 7; // Convert low 3 bits of hash code 285 | float u = h<4 ? x : y; // into 8 simple gradient directions, 286 | float v = h<4 ? y : x; // and compute the dot product with (x,y). 287 | return ((h&1) != 0 ? -u : u) + ((h&2) != 0 ? -2.0f*v : 2.0f*v); 288 | } 289 | 290 | private static float grad( int hash, float x, float y , float z ) { 291 | int h = hash & 15; // Convert low 4 bits of hash code into 12 simple 292 | float u = h<8 ? x : y; // gradient directions, and compute dot product. 293 | float v = h<4 ? y : h==12||h==14 ? x : z; // Fix repeats at h = 12 to 15 294 | return ((h&1) != 0 ? -u : u) + ((h&2) != 0 ? -v : v); 295 | } 296 | 297 | private static float grad( int hash, float x, float y, float z, float t ) { 298 | int h = hash & 31; // Convert low 5 bits of hash code into 32 simple 299 | float u = h<24 ? x : y; // gradient directions, and compute dot product. 300 | float v = h<16 ? y : z; 301 | float w = h<8 ? z : t; 302 | return ((h&1) != 0 ? -u : u) + ((h&2) != 0 ? -v : v) + ((h&4) != 0 ? -w : w); 303 | } 304 | } 305 | } 306 | -------------------------------------------------------------------------------- /Assets/Scripts/Terrain/SimplexNoise.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c09590ff2929d1e429ec1d1bbbd3dbed 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/Terrain/VoxelTerrain.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | 5 | public class VoxelTerrain : MonoBehaviour { 6 | 7 | public static Vector3i size = new Vector3i (128, 128, 128); 8 | public Material defaultMaterial; 9 | public Material transparentMaterial; 10 | public static GameObject player; 11 | public int chunkSize = 16; 12 | public static int chunkSizeShift; 13 | public GameObject playerGO; 14 | 15 | public static int[,,] data; 16 | public static ChunkManager chunkManager; 17 | public static TerrainGenerator terrainGenerator; 18 | public static Vector3i activeChunkPosition; 19 | 20 | void Start() { 21 | chunkSizeShift = (int)Mathf.Log (chunkSize, 2); 22 | data = new int[size.x, size.y, size.z]; 23 | terrainGenerator = new TerrainGenerator(chunkSize); 24 | chunkManager = new ChunkManager(this, playerGO); 25 | } 26 | 27 | void Update() { 28 | chunkManager.Update(); 29 | } 30 | 31 | public static bool isInMapBoundaries(int x, int y, int z) { 32 | if ( 33 | x >= 0 && x < size.x && 34 | y >= 0 && y < size.y && 35 | z >= 0 && z < size.z 36 | ) return true; 37 | return false; 38 | } 39 | 40 | public static int getBlockAt(int x, int y, int z) { 41 | if (isInMapBoundaries(x,y,z)) { 42 | return data[x, y, z]; 43 | } 44 | return 0; 45 | } 46 | 47 | public void setBlockAt(int x, int y, int z, int id) { 48 | if (isInMapBoundaries(x,y,z)) 49 | data[x, y, z] = id; 50 | } 51 | 52 | } -------------------------------------------------------------------------------- /Assets/Scripts/Terrain/VoxelTerrain.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 023258d56b591524188c8179c3e496ab 3 | timeCreated: 1429442776 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Linus Schilpp 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. -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.2d.sprite": "1.0.0", 4 | "com.unity.ugui": "1.0.0", 5 | "com.unity.modules.ai": "1.0.0", 6 | "com.unity.modules.androidjni": "1.0.0", 7 | "com.unity.modules.animation": "1.0.0", 8 | "com.unity.modules.assetbundle": "1.0.0", 9 | "com.unity.modules.audio": "1.0.0", 10 | "com.unity.modules.cloth": "1.0.0", 11 | "com.unity.modules.director": "1.0.0", 12 | "com.unity.modules.imageconversion": "1.0.0", 13 | "com.unity.modules.imgui": "1.0.0", 14 | "com.unity.modules.jsonserialize": "1.0.0", 15 | "com.unity.modules.particlesystem": "1.0.0", 16 | "com.unity.modules.physics": "1.0.0", 17 | "com.unity.modules.physics2d": "1.0.0", 18 | "com.unity.modules.screencapture": "1.0.0", 19 | "com.unity.modules.terrain": "1.0.0", 20 | "com.unity.modules.terrainphysics": "1.0.0", 21 | "com.unity.modules.tilemap": "1.0.0", 22 | "com.unity.modules.ui": "1.0.0", 23 | "com.unity.modules.uielements": "1.0.0", 24 | "com.unity.modules.umbra": "1.0.0", 25 | "com.unity.modules.unityanalytics": "1.0.0", 26 | "com.unity.modules.unitywebrequest": "1.0.0", 27 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 28 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 29 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 30 | "com.unity.modules.unitywebrequestwww": "1.0.0", 31 | "com.unity.modules.vehicles": "1.0.0", 32 | "com.unity.modules.video": "1.0.0", 33 | "com.unity.modules.vr": "1.0.0", 34 | "com.unity.modules.wind": "1.0.0", 35 | "com.unity.modules.xr": "1.0.0" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Packages/packages-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.2d.sprite": { 4 | "version": "1.0.0", 5 | "depth": 0, 6 | "source": "builtin", 7 | "dependencies": {} 8 | }, 9 | "com.unity.ugui": { 10 | "version": "1.0.0", 11 | "depth": 0, 12 | "source": "builtin", 13 | "dependencies": { 14 | "com.unity.modules.ui": "1.0.0", 15 | "com.unity.modules.imgui": "1.0.0" 16 | } 17 | }, 18 | "com.unity.modules.ai": { 19 | "version": "1.0.0", 20 | "depth": 0, 21 | "source": "builtin", 22 | "dependencies": {} 23 | }, 24 | "com.unity.modules.androidjni": { 25 | "version": "1.0.0", 26 | "depth": 0, 27 | "source": "builtin", 28 | "dependencies": {} 29 | }, 30 | "com.unity.modules.animation": { 31 | "version": "1.0.0", 32 | "depth": 0, 33 | "source": "builtin", 34 | "dependencies": {} 35 | }, 36 | "com.unity.modules.assetbundle": { 37 | "version": "1.0.0", 38 | "depth": 0, 39 | "source": "builtin", 40 | "dependencies": {} 41 | }, 42 | "com.unity.modules.audio": { 43 | "version": "1.0.0", 44 | "depth": 0, 45 | "source": "builtin", 46 | "dependencies": {} 47 | }, 48 | "com.unity.modules.cloth": { 49 | "version": "1.0.0", 50 | "depth": 0, 51 | "source": "builtin", 52 | "dependencies": { 53 | "com.unity.modules.physics": "1.0.0" 54 | } 55 | }, 56 | "com.unity.modules.director": { 57 | "version": "1.0.0", 58 | "depth": 0, 59 | "source": "builtin", 60 | "dependencies": { 61 | "com.unity.modules.audio": "1.0.0", 62 | "com.unity.modules.animation": "1.0.0" 63 | } 64 | }, 65 | "com.unity.modules.imageconversion": { 66 | "version": "1.0.0", 67 | "depth": 0, 68 | "source": "builtin", 69 | "dependencies": {} 70 | }, 71 | "com.unity.modules.imgui": { 72 | "version": "1.0.0", 73 | "depth": 0, 74 | "source": "builtin", 75 | "dependencies": {} 76 | }, 77 | "com.unity.modules.jsonserialize": { 78 | "version": "1.0.0", 79 | "depth": 0, 80 | "source": "builtin", 81 | "dependencies": {} 82 | }, 83 | "com.unity.modules.particlesystem": { 84 | "version": "1.0.0", 85 | "depth": 0, 86 | "source": "builtin", 87 | "dependencies": {} 88 | }, 89 | "com.unity.modules.physics": { 90 | "version": "1.0.0", 91 | "depth": 0, 92 | "source": "builtin", 93 | "dependencies": {} 94 | }, 95 | "com.unity.modules.physics2d": { 96 | "version": "1.0.0", 97 | "depth": 0, 98 | "source": "builtin", 99 | "dependencies": {} 100 | }, 101 | "com.unity.modules.screencapture": { 102 | "version": "1.0.0", 103 | "depth": 0, 104 | "source": "builtin", 105 | "dependencies": { 106 | "com.unity.modules.imageconversion": "1.0.0" 107 | } 108 | }, 109 | "com.unity.modules.subsystems": { 110 | "version": "1.0.0", 111 | "depth": 1, 112 | "source": "builtin", 113 | "dependencies": { 114 | "com.unity.modules.jsonserialize": "1.0.0" 115 | } 116 | }, 117 | "com.unity.modules.terrain": { 118 | "version": "1.0.0", 119 | "depth": 0, 120 | "source": "builtin", 121 | "dependencies": {} 122 | }, 123 | "com.unity.modules.terrainphysics": { 124 | "version": "1.0.0", 125 | "depth": 0, 126 | "source": "builtin", 127 | "dependencies": { 128 | "com.unity.modules.physics": "1.0.0", 129 | "com.unity.modules.terrain": "1.0.0" 130 | } 131 | }, 132 | "com.unity.modules.tilemap": { 133 | "version": "1.0.0", 134 | "depth": 0, 135 | "source": "builtin", 136 | "dependencies": { 137 | "com.unity.modules.physics2d": "1.0.0" 138 | } 139 | }, 140 | "com.unity.modules.ui": { 141 | "version": "1.0.0", 142 | "depth": 0, 143 | "source": "builtin", 144 | "dependencies": {} 145 | }, 146 | "com.unity.modules.uielements": { 147 | "version": "1.0.0", 148 | "depth": 0, 149 | "source": "builtin", 150 | "dependencies": { 151 | "com.unity.modules.ui": "1.0.0", 152 | "com.unity.modules.imgui": "1.0.0", 153 | "com.unity.modules.jsonserialize": "1.0.0" 154 | } 155 | }, 156 | "com.unity.modules.umbra": { 157 | "version": "1.0.0", 158 | "depth": 0, 159 | "source": "builtin", 160 | "dependencies": {} 161 | }, 162 | "com.unity.modules.unityanalytics": { 163 | "version": "1.0.0", 164 | "depth": 0, 165 | "source": "builtin", 166 | "dependencies": { 167 | "com.unity.modules.unitywebrequest": "1.0.0", 168 | "com.unity.modules.jsonserialize": "1.0.0" 169 | } 170 | }, 171 | "com.unity.modules.unitywebrequest": { 172 | "version": "1.0.0", 173 | "depth": 0, 174 | "source": "builtin", 175 | "dependencies": {} 176 | }, 177 | "com.unity.modules.unitywebrequestassetbundle": { 178 | "version": "1.0.0", 179 | "depth": 0, 180 | "source": "builtin", 181 | "dependencies": { 182 | "com.unity.modules.assetbundle": "1.0.0", 183 | "com.unity.modules.unitywebrequest": "1.0.0" 184 | } 185 | }, 186 | "com.unity.modules.unitywebrequestaudio": { 187 | "version": "1.0.0", 188 | "depth": 0, 189 | "source": "builtin", 190 | "dependencies": { 191 | "com.unity.modules.unitywebrequest": "1.0.0", 192 | "com.unity.modules.audio": "1.0.0" 193 | } 194 | }, 195 | "com.unity.modules.unitywebrequesttexture": { 196 | "version": "1.0.0", 197 | "depth": 0, 198 | "source": "builtin", 199 | "dependencies": { 200 | "com.unity.modules.unitywebrequest": "1.0.0", 201 | "com.unity.modules.imageconversion": "1.0.0" 202 | } 203 | }, 204 | "com.unity.modules.unitywebrequestwww": { 205 | "version": "1.0.0", 206 | "depth": 0, 207 | "source": "builtin", 208 | "dependencies": { 209 | "com.unity.modules.unitywebrequest": "1.0.0", 210 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 211 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 212 | "com.unity.modules.audio": "1.0.0", 213 | "com.unity.modules.assetbundle": "1.0.0", 214 | "com.unity.modules.imageconversion": "1.0.0" 215 | } 216 | }, 217 | "com.unity.modules.vehicles": { 218 | "version": "1.0.0", 219 | "depth": 0, 220 | "source": "builtin", 221 | "dependencies": { 222 | "com.unity.modules.physics": "1.0.0" 223 | } 224 | }, 225 | "com.unity.modules.video": { 226 | "version": "1.0.0", 227 | "depth": 0, 228 | "source": "builtin", 229 | "dependencies": { 230 | "com.unity.modules.audio": "1.0.0", 231 | "com.unity.modules.ui": "1.0.0", 232 | "com.unity.modules.unitywebrequest": "1.0.0" 233 | } 234 | }, 235 | "com.unity.modules.vr": { 236 | "version": "1.0.0", 237 | "depth": 0, 238 | "source": "builtin", 239 | "dependencies": { 240 | "com.unity.modules.jsonserialize": "1.0.0", 241 | "com.unity.modules.physics": "1.0.0", 242 | "com.unity.modules.xr": "1.0.0" 243 | } 244 | }, 245 | "com.unity.modules.wind": { 246 | "version": "1.0.0", 247 | "depth": 0, 248 | "source": "builtin", 249 | "dependencies": {} 250 | }, 251 | "com.unity.modules.xr": { 252 | "version": "1.0.0", 253 | "depth": 0, 254 | "source": "builtin", 255 | "dependencies": { 256 | "com.unity.modules.physics": "1.0.0", 257 | "com.unity.modules.jsonserialize": "1.0.0", 258 | "com.unity.modules.subsystems": "1.0.0" 259 | } 260 | } 261 | } 262 | } 263 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lischilpp/unity-voxel-engine/d1bd489bdbadab976ec28e179303d296b0ffba0c/ProjectSettings/AudioManager.asset -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lischilpp/unity-voxel-engine/d1bd489bdbadab976ec28e179303d296b0ffba0c/ProjectSettings/ClusterInputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lischilpp/unity-voxel-engine/d1bd489bdbadab976ec28e179303d296b0ffba0c/ProjectSettings/DynamicsManager.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lischilpp/unity-voxel-engine/d1bd489bdbadab976ec28e179303d296b0ffba0c/ProjectSettings/EditorBuildSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lischilpp/unity-voxel-engine/d1bd489bdbadab976ec28e179303d296b0ffba0c/ProjectSettings/EditorSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lischilpp/unity-voxel-engine/d1bd489bdbadab976ec28e179303d296b0ffba0c/ProjectSettings/GraphicsSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lischilpp/unity-voxel-engine/d1bd489bdbadab976ec28e179303d296b0ffba0c/ProjectSettings/InputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/MemorySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!387306366 &1 4 | MemorySettings: 5 | m_ObjectHideFlags: 0 6 | m_EditorMemorySettings: 7 | m_MainAllocatorBlockSize: -1 8 | m_ThreadAllocatorBlockSize: -1 9 | m_MainGfxBlockSize: -1 10 | m_ThreadGfxBlockSize: -1 11 | m_CacheBlockSize: -1 12 | m_TypetreeBlockSize: -1 13 | m_ProfilerBlockSize: -1 14 | m_ProfilerEditorBlockSize: -1 15 | m_BucketAllocatorGranularity: -1 16 | m_BucketAllocatorBucketsCount: -1 17 | m_BucketAllocatorBlockSize: -1 18 | m_BucketAllocatorBlockCount: -1 19 | m_ProfilerBucketAllocatorGranularity: -1 20 | m_ProfilerBucketAllocatorBucketsCount: -1 21 | m_ProfilerBucketAllocatorBlockSize: -1 22 | m_ProfilerBucketAllocatorBlockCount: -1 23 | m_TempAllocatorSizeMain: -1 24 | m_JobTempAllocatorBlockSize: -1 25 | m_BackgroundJobTempAllocatorBlockSize: -1 26 | m_JobTempAllocatorReducedBlockSize: -1 27 | m_TempAllocatorSizeGIBakingWorker: -1 28 | m_TempAllocatorSizeNavMeshWorker: -1 29 | m_TempAllocatorSizeAudioWorker: -1 30 | m_TempAllocatorSizeCloudWorker: -1 31 | m_TempAllocatorSizeGfx: -1 32 | m_TempAllocatorSizeJobWorker: -1 33 | m_TempAllocatorSizeBackgroundWorker: -1 34 | m_TempAllocatorSizePreloadManager: -1 35 | m_PlatformMemorySettings: {} 36 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lischilpp/unity-voxel-engine/d1bd489bdbadab976ec28e179303d296b0ffba0c/ProjectSettings/NavMeshAreas.asset -------------------------------------------------------------------------------- /ProjectSettings/NavMeshLayers.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lischilpp/unity-voxel-engine/d1bd489bdbadab976ec28e179303d296b0ffba0c/ProjectSettings/NavMeshLayers.asset -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lischilpp/unity-voxel-engine/d1bd489bdbadab976ec28e179303d296b0ffba0c/ProjectSettings/NetworkManager.asset -------------------------------------------------------------------------------- /ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 53 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: 0 16 | m_AdvancedSettingsExpanded: 1 17 | m_ScopedRegistriesSettingsExpanded: 1 18 | m_SeeAllPackageVersions: 0 19 | m_DismissPreviewPackagesInUse: 0 20 | oneTimeWarningShown: 0 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_ConfigSource: 0 29 | m_UserSelectedRegistryName: 30 | m_UserAddingNewScopedRegistry: 0 31 | m_RegistryInfoDraft: 32 | m_Modified: 0 33 | m_ErrorMessage: 34 | m_UserModificationsInstanceId: -856 35 | m_OriginalInstanceId: -858 36 | m_LoadAssets: 0 37 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lischilpp/unity-voxel-engine/d1bd489bdbadab976ec28e179303d296b0ffba0c/ProjectSettings/Physics2DSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lischilpp/unity-voxel-engine/d1bd489bdbadab976ec28e179303d296b0ffba0c/ProjectSettings/PresetManager.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lischilpp/unity-voxel-engine/d1bd489bdbadab976ec28e179303d296b0ffba0c/ProjectSettings/ProjectSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2022.3.34f1 2 | m_EditorVersionWithRevision: 2022.3.34f1 (4886f5360533) 3 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lischilpp/unity-voxel-engine/d1bd489bdbadab976ec28e179303d296b0ffba0c/ProjectSettings/QualitySettings.asset -------------------------------------------------------------------------------- /ProjectSettings/SceneTemplateSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "templatePinStates": [], 3 | "dependencyTypeInfos": [ 4 | { 5 | "userAdded": false, 6 | "type": "UnityEngine.AnimationClip", 7 | "defaultInstantiationMode": 0 8 | }, 9 | { 10 | "userAdded": false, 11 | "type": "UnityEditor.Animations.AnimatorController", 12 | "defaultInstantiationMode": 0 13 | }, 14 | { 15 | "userAdded": false, 16 | "type": "UnityEngine.AnimatorOverrideController", 17 | "defaultInstantiationMode": 0 18 | }, 19 | { 20 | "userAdded": false, 21 | "type": "UnityEditor.Audio.AudioMixerController", 22 | "defaultInstantiationMode": 0 23 | }, 24 | { 25 | "userAdded": false, 26 | "type": "UnityEngine.ComputeShader", 27 | "defaultInstantiationMode": 1 28 | }, 29 | { 30 | "userAdded": false, 31 | "type": "UnityEngine.Cubemap", 32 | "defaultInstantiationMode": 0 33 | }, 34 | { 35 | "userAdded": false, 36 | "type": "UnityEngine.GameObject", 37 | "defaultInstantiationMode": 0 38 | }, 39 | { 40 | "userAdded": false, 41 | "type": "UnityEditor.LightingDataAsset", 42 | "defaultInstantiationMode": 0 43 | }, 44 | { 45 | "userAdded": false, 46 | "type": "UnityEngine.LightingSettings", 47 | "defaultInstantiationMode": 0 48 | }, 49 | { 50 | "userAdded": false, 51 | "type": "UnityEngine.Material", 52 | "defaultInstantiationMode": 0 53 | }, 54 | { 55 | "userAdded": false, 56 | "type": "UnityEditor.MonoScript", 57 | "defaultInstantiationMode": 1 58 | }, 59 | { 60 | "userAdded": false, 61 | "type": "UnityEngine.PhysicMaterial", 62 | "defaultInstantiationMode": 0 63 | }, 64 | { 65 | "userAdded": false, 66 | "type": "UnityEngine.PhysicsMaterial2D", 67 | "defaultInstantiationMode": 0 68 | }, 69 | { 70 | "userAdded": false, 71 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile", 72 | "defaultInstantiationMode": 0 73 | }, 74 | { 75 | "userAdded": false, 76 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessResources", 77 | "defaultInstantiationMode": 0 78 | }, 79 | { 80 | "userAdded": false, 81 | "type": "UnityEngine.Rendering.VolumeProfile", 82 | "defaultInstantiationMode": 0 83 | }, 84 | { 85 | "userAdded": false, 86 | "type": "UnityEditor.SceneAsset", 87 | "defaultInstantiationMode": 1 88 | }, 89 | { 90 | "userAdded": false, 91 | "type": "UnityEngine.Shader", 92 | "defaultInstantiationMode": 1 93 | }, 94 | { 95 | "userAdded": false, 96 | "type": "UnityEngine.ShaderVariantCollection", 97 | "defaultInstantiationMode": 1 98 | }, 99 | { 100 | "userAdded": false, 101 | "type": "UnityEngine.Texture", 102 | "defaultInstantiationMode": 0 103 | }, 104 | { 105 | "userAdded": false, 106 | "type": "UnityEngine.Texture2D", 107 | "defaultInstantiationMode": 0 108 | }, 109 | { 110 | "userAdded": false, 111 | "type": "UnityEngine.Timeline.TimelineAsset", 112 | "defaultInstantiationMode": 0 113 | } 114 | ], 115 | "defaultDependencyTypeInfo": { 116 | "userAdded": false, 117 | "type": "", 118 | "defaultInstantiationMode": 1 119 | }, 120 | "newSceneOverride": 0 121 | } -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lischilpp/unity-voxel-engine/d1bd489bdbadab976ec28e179303d296b0ffba0c/ProjectSettings/TagManager.asset -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lischilpp/unity-voxel-engine/d1bd489bdbadab976ec28e179303d296b0ffba0c/ProjectSettings/TimeManager.asset -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lischilpp/unity-voxel-engine/d1bd489bdbadab976ec28e179303d296b0ffba0c/ProjectSettings/UnityConnectSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lischilpp/unity-voxel-engine/d1bd489bdbadab976ec28e179303d296b0ffba0c/ProjectSettings/VFXManager.asset -------------------------------------------------------------------------------- /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 |
2 | Logo 3 |

Unity Voxel Engine

4 |

5 | 6 | 7 |

8 |

An interactive Voxel Engine

9 |

Live Demo

10 |
11 | 12 | ## Table of Contents 13 | - [Screenshots](#screenshots) 14 | - [Features](#features) 15 | - [Getting started](#getting-started) 16 | - [License](#license) 17 | 18 | ## Screenshots 19 | 20 | 21 | 22 | 23 | 24 |
screenshot1screenshot2
25 | 26 | ## Features 27 | - Fixed size spherical chunk loading 28 | - Support for transparent materials (like glass) and connected blocks (like water) 29 | - Different block types 30 | - Terrain generator from noise 31 | - Place and destroy blocks (right and left click) 32 | - Fast block destroying (press and hold **f** key) 33 | 34 | ## Getting Started 35 | 1. Clone this repository and open it in Unity3D 36 | 2. Open the scene "Main" from Assets 37 | 5. Press play and have fun! 38 | 39 | ## License 40 | This project is distributed under the MIT License - see the [LICENSE](LICENSE) file for details 41 | -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lischilpp/unity-voxel-engine/d1bd489bdbadab976ec28e179303d296b0ffba0c/logo.png -------------------------------------------------------------------------------- /screenshots/screenshot1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lischilpp/unity-voxel-engine/d1bd489bdbadab976ec28e179303d296b0ffba0c/screenshots/screenshot1.png -------------------------------------------------------------------------------- /screenshots/screenshot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lischilpp/unity-voxel-engine/d1bd489bdbadab976ec28e179303d296b0ffba0c/screenshots/screenshot2.png -------------------------------------------------------------------------------- /screenshots/screenshot3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lischilpp/unity-voxel-engine/d1bd489bdbadab976ec28e179303d296b0ffba0c/screenshots/screenshot3.png -------------------------------------------------------------------------------- /screenshots/screenshot4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lischilpp/unity-voxel-engine/d1bd489bdbadab976ec28e179303d296b0ffba0c/screenshots/screenshot4.png --------------------------------------------------------------------------------