├── .gitignore ├── Demo Scene.unity ├── Demo Scene.unity.meta ├── Icons.meta ├── Icons ├── pantone.png └── pantone.png.meta ├── LICENSE ├── LICENSE.meta ├── Materials.meta ├── Materials ├── Bush_1.mat ├── Bush_1.mat.meta ├── Grass_1.mat ├── Grass_1.mat.meta ├── TreeLeaf_1.mat ├── TreeLeaf_1.mat.meta ├── TrunkDamage_1.mat ├── TrunkDamage_1.mat.meta ├── Trunk_1.mat └── Trunk_1.mat.meta ├── Models.meta ├── Models ├── Vegetation.fbx └── Vegetation.fbx.meta ├── Palettes.meta ├── Palettes ├── Trees.asset └── Trees.asset.meta ├── Prefabs.meta ├── Prefabs ├── FallenTree_1_1.prefab ├── FallenTree_1_1.prefab.meta ├── FallenTree_1_2.prefab ├── FallenTree_1_2.prefab.meta ├── Tree_1_1.prefab ├── Tree_1_1.prefab.meta ├── Tree_1_2.prefab └── Tree_1_2.prefab.meta ├── README.md ├── README.md.meta ├── Scripts.meta ├── Scripts ├── PaintObject.cs ├── PaintObject.cs.meta ├── PaintPalette.cs ├── PaintPalette.cs.meta ├── PrefabPainter.cs ├── PrefabPainter.cs.meta ├── ameye.prefabpainter.asmdef └── ameye.prefabpainter.asmdef.meta ├── Textures.meta ├── Textures ├── GrassColor.png ├── GrassColor.png.meta ├── LowPolyNormal.png └── LowPolyNormal.png.meta ├── package.json └── package.json.meta /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | [Ll]ibrary/ 4 | [Tt]emp/ 5 | [Oo]bj/ 6 | [Bb]uild/ 7 | [Bb]uilds/ 8 | [Ll]ogs/ 9 | [Aa]ssets/AssetStoreTools* 10 | 11 | # Visual Studio cache directory 12 | **/.vs/ 13 | 14 | # Autogenerated VS/MD/Consulo solution and project files 15 | ExportedObj/ 16 | .consulo/ 17 | *.csproj 18 | *.unityproj 19 | *.sln 20 | *.suo 21 | *.tmp 22 | *.user 23 | *.userprefs 24 | *.pidb 25 | *.booproj 26 | *.svd 27 | *.pdb 28 | 29 | # Unity3D generated meta files 30 | *.pidb.meta 31 | 32 | # Unity3D Generated File On Crash Reports 33 | sysinfo.txt 34 | 35 | # Builds 36 | *.apk 37 | *.unitypackage 38 | -------------------------------------------------------------------------------- /Demo Scene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 93253d59a5045044ca39e92df981aad3 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Icons.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 038eaea052f58624db212d0da422319b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Icons/pantone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexanderameye/prefab-painter/f78b6b205ab54296ca4fd27c509a665367f84347/Icons/pantone.png -------------------------------------------------------------------------------- /Icons/pantone.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f110ec9a79f47224381dbaee6f29a13e 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 7 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 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: 2 35 | aniso: 1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: -1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 2 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 0 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | - serializedVersion: 2 73 | buildTarget: Standalone 74 | maxTextureSize: 2048 75 | resizeAlgorithm: 0 76 | textureFormat: -1 77 | textureCompression: 0 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | androidETC2FallbackOverride: 0 83 | spriteSheet: 84 | serializedVersion: 2 85 | sprites: [] 86 | outline: [] 87 | physicsShape: [] 88 | bones: [] 89 | spriteID: 90 | vertices: [] 91 | indices: 92 | edges: [] 93 | weights: [] 94 | spritePackingTag: 95 | pSDRemoveMatte: 0 96 | pSDShowRemoveMatteOption: 0 97 | userData: 98 | assetBundleName: 99 | assetBundleVariant: 100 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Alexander Ameye 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LICENSE.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6fb323916db68504688c3d3c8c45f723 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 189c958b09fc89940b718880ca67d7e2 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Materials/Bush_1.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Bush_1 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | - _WindNoise: 58 | m_Texture: {fileID: 2800000, guid: ca74d73074b70e543859d58a3e6bf912, type: 3} 59 | m_Scale: {x: 1, y: 1} 60 | m_Offset: {x: 0, y: 0} 61 | m_Floats: 62 | - _BumpScale: 1 63 | - _Cutoff: 0.5 64 | - _DetailNormalMapScale: 1 65 | - _DstBlend: 0 66 | - _GlossMapScale: 1 67 | - _Glossiness: 0 68 | - _GlossyReflections: 1 69 | - _Metallic: 0 70 | - _Mode: 0 71 | - _NoiseScale: 0.1 72 | - _OcclusionStrength: 1 73 | - _Parallax: 0.02 74 | - _SmoothnessTextureChannel: 0 75 | - _SpecularHighlights: 1 76 | - _SrcBlend: 1 77 | - _UVSec: 0 78 | - _ZWrite: 1 79 | m_Colors: 80 | - _Color: {r: 0.2176664, g: 0.3490566, b: 0.13007298, a: 1} 81 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 82 | - _NoiseAmount: {r: 0.01, g: 0.05, b: 0.01, a: 0} 83 | -------------------------------------------------------------------------------- /Materials/Bush_1.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 41543f25990715d47b8829388b91cd6a 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Materials/Grass_1.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Grass_1 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _GlossMap: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MainTex: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _MetallicGlossMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _OcclusionMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | - _ParallaxMap: 58 | m_Texture: {fileID: 0} 59 | m_Scale: {x: 1, y: 1} 60 | m_Offset: {x: 0, y: 0} 61 | - _ShadowOffset: 62 | m_Texture: {fileID: 0} 63 | m_Scale: {x: 1, y: 1} 64 | m_Offset: {x: 0, y: 0} 65 | - _TranslucencyMap: 66 | m_Texture: {fileID: 0} 67 | m_Scale: {x: 1, y: 1} 68 | m_Offset: {x: 0, y: 0} 69 | - _WindNoise: 70 | m_Texture: {fileID: 2800000, guid: ca74d73074b70e543859d58a3e6bf912, type: 3} 71 | m_Scale: {x: 1, y: 1} 72 | m_Offset: {x: 0, y: 0} 73 | m_Floats: 74 | - _AO: 1.01 75 | - _BaseLight: 0.28 76 | - _BumpScale: 1 77 | - _Cutoff: 0.25 78 | - _DetailNormalMapScale: 1 79 | - _DstBlend: 0 80 | - _GlossMapScale: 1 81 | - _Glossiness: 0 82 | - _GlossyReflections: 1 83 | - _Metallic: 0 84 | - _Mode: 0 85 | - _NoiseScale: 0.1 86 | - _Occlusion: 4.7 87 | - _OcclusionStrength: 1 88 | - _Parallax: 0.02 89 | - _ShadowStrength: 1 90 | - _Shininess: 0.078125 91 | - _SmoothnessTextureChannel: 0 92 | - _SpecularHighlights: 1 93 | - _SquashAmount: 1 94 | - _SrcBlend: 1 95 | - _TranslucencyViewDependency: 0.7 96 | - _UVSec: 0 97 | - _ZWrite: 1 98 | m_Colors: 99 | - _Color: {r: 0.42091, g: 0.6509434, b: 0.13203098, a: 1} 100 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 101 | - _NoiseAmount: {r: 0.01, g: 0.01, b: 0.01, a: 0} 102 | - _TranslucencyColor: {r: 0.73, g: 0.85, b: 0.41, a: 1} 103 | - _TreeInstanceColor: {r: 1, g: 1, b: 1, a: 1} 104 | - _TreeInstanceScale: {r: 1, g: 1, b: 1, a: 1} 105 | -------------------------------------------------------------------------------- /Materials/Grass_1.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7e9e3cb396458b84aada10e45759c373 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Materials/TreeLeaf_1.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: TreeLeaf_1 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | - _WindNoise: 58 | m_Texture: {fileID: 2800000, guid: ca74d73074b70e543859d58a3e6bf912, type: 3} 59 | m_Scale: {x: 1, y: 1} 60 | m_Offset: {x: 0, y: 0} 61 | m_Floats: 62 | - _BumpScale: 1 63 | - _Cutoff: 0.5 64 | - _DetailNormalMapScale: 1 65 | - _DstBlend: 0 66 | - _GlossMapScale: 1 67 | - _Glossiness: 0 68 | - _GlossyReflections: 1 69 | - _Metallic: 0 70 | - _Mode: 0 71 | - _NoiseScale: 0.1 72 | - _OcclusionStrength: 1 73 | - _Parallax: 0.02 74 | - _SmoothnessTextureChannel: 0 75 | - _SpecularHighlights: 1 76 | - _SrcBlend: 1 77 | - _UVSec: 0 78 | - _ZWrite: 1 79 | m_Colors: 80 | - _Color: {r: 0.26544946, g: 0.4811321, b: 0.13389997, a: 1} 81 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 82 | - _NoiseAmount: {r: 0.01, g: 0.05, b: 0.01, a: 0} 83 | -------------------------------------------------------------------------------- /Materials/TreeLeaf_1.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 22ae8ca533ae0ff45a92966006a65514 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Materials/TrunkDamage_1.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: TrunkDamage_1 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 0.6981132, g: 0.58328664, b: 0.44455323, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /Materials/TrunkDamage_1.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 23c20ac7f6d472942a1dd905e69fc6f6 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Materials/Trunk_1.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Trunk_1 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 0.2924528, g: 0.16573054, b: 0.1448469, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /Materials/Trunk_1.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 94bf847a9b88c60428243d160955ba6f 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Models.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 404b72b585f845b4884931187e240179 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Models/Vegetation.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexanderameye/prefab-painter/f78b6b205ab54296ca4fd27c509a665367f84347/Models/Vegetation.fbx -------------------------------------------------------------------------------- /Models/Vegetation.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2072bd79c1ae41441b0d087f04e9ec49 3 | ModelImporter: 4 | serializedVersion: 23 5 | fileIDToRecycleName: 6 | 100000: Bush_1_1_LOD0 7 | 100002: Bush_1_1_LOD1 8 | 100004: Bush_1_2_LOD0 9 | 100006: Bush_1_2_LOD1 10 | 100008: FallenTree_1_1_LOD0 11 | 100010: FallenTree_1_1_LOD1 12 | 100012: FallenTree_1_2_2 13 | 100014: FallenTree_1_2_LOD0 14 | 100016: FallenTree_1_2_LOD1 15 | 100018: FallenTree_1_2_LOD1_2 16 | 100020: Grass_1_1 17 | 100022: Grass_1_2 18 | 100024: Grass_2_1 19 | 100026: //RootNode 20 | 100028: Plant_1_1 21 | 100030: Tree_1_1_LOD0 22 | 100032: Tree_1_1_LOD1 23 | 100034: Tree_1_1_LOD2 24 | 100036: Tree_1_2_LOD0 25 | 100038: Tree_1_2_LOD1 26 | 100040: Tree_1_2_LOD2 27 | 400000: Bush_1_1_LOD0 28 | 400002: Bush_1_1_LOD1 29 | 400004: Bush_1_2_LOD0 30 | 400006: Bush_1_2_LOD1 31 | 400008: FallenTree_1_1_LOD0 32 | 400010: FallenTree_1_1_LOD1 33 | 400012: FallenTree_1_2_2 34 | 400014: FallenTree_1_2_LOD0 35 | 400016: FallenTree_1_2_LOD1 36 | 400018: FallenTree_1_2_LOD1_2 37 | 400020: Grass_1_1 38 | 400022: Grass_1_2 39 | 400024: Grass_2_1 40 | 400026: //RootNode 41 | 400028: Plant_1_1 42 | 400030: Tree_1_1_LOD0 43 | 400032: Tree_1_1_LOD1 44 | 400034: Tree_1_1_LOD2 45 | 400036: Tree_1_2_LOD0 46 | 400038: Tree_1_2_LOD1 47 | 400040: Tree_1_2_LOD2 48 | 2100000: Material.001 49 | 2100002: Material.003 50 | 2100004: Material.002 51 | 2100006: Material.004 52 | 2300000: Bush_1_1_LOD0 53 | 2300002: Bush_1_1_LOD1 54 | 2300004: Bush_1_2_LOD0 55 | 2300006: Bush_1_2_LOD1 56 | 2300008: FallenTree_1_1_LOD0 57 | 2300010: FallenTree_1_1_LOD1 58 | 2300012: FallenTree_1_2_2 59 | 2300014: FallenTree_1_2_LOD0 60 | 2300016: FallenTree_1_2_LOD1 61 | 2300018: FallenTree_1_2_LOD1_2 62 | 2300020: Grass_1_1 63 | 2300022: Grass_1_2 64 | 2300024: Grass_2_1 65 | 2300026: Plant_1_1 66 | 2300028: Tree_1_1_LOD0 67 | 2300030: Tree_1_1_LOD1 68 | 2300032: Tree_1_1_LOD2 69 | 2300034: Tree_1_2_LOD0 70 | 2300036: Tree_1_2_LOD1 71 | 2300038: Tree_1_2_LOD2 72 | 3300000: Bush_1_1_LOD0 73 | 3300002: Bush_1_1_LOD1 74 | 3300004: Bush_1_2_LOD0 75 | 3300006: Bush_1_2_LOD1 76 | 3300008: FallenTree_1_1_LOD0 77 | 3300010: FallenTree_1_1_LOD1 78 | 3300012: FallenTree_1_2_2 79 | 3300014: FallenTree_1_2_LOD0 80 | 3300016: FallenTree_1_2_LOD1 81 | 3300018: FallenTree_1_2_LOD1_2 82 | 3300020: Grass_1_1 83 | 3300022: Grass_1_2 84 | 3300024: Grass_2_1 85 | 3300026: Plant_1_1 86 | 3300028: Tree_1_1_LOD0 87 | 3300030: Tree_1_1_LOD1 88 | 3300032: Tree_1_1_LOD2 89 | 3300034: Tree_1_2_LOD0 90 | 3300036: Tree_1_2_LOD1 91 | 3300038: Tree_1_2_LOD2 92 | 4300000: Tree_1_1_LOD2 93 | 4300002: Tree_1_2_LOD2 94 | 4300004: FallenTree_1_2_LOD1 95 | 4300006: FallenTree_1_2_LOD1_2 96 | 4300008: FallenTree_1_1_LOD1 97 | 4300010: Grass_2_1 98 | 4300012: Plant_1_1 99 | 4300014: FallenTree_1_1_LOD0 100 | 4300016: FallenTree_1_2_LOD0 101 | 4300018: FallenTree_1_2_2 102 | 4300020: Grass_1_2 103 | 4300022: Grass_1_1 104 | 4300024: Bush_1_1_LOD1 105 | 4300026: Bush_1_2_LOD1 106 | 4300028: Bush_1_2_LOD0 107 | 4300030: Bush_1_1_LOD0 108 | 4300032: Tree_1_2_LOD1 109 | 4300034: Tree_1_2_LOD0 110 | 4300036: Tree_1_1_LOD1 111 | 4300038: Tree_1_1_LOD0 112 | 20500000: //RootNode 113 | 2186277476908879412: ImportLogs 114 | externalObjects: {} 115 | materials: 116 | importMaterials: 1 117 | materialName: 0 118 | materialSearch: 1 119 | materialLocation: 1 120 | animations: 121 | legacyGenerateAnimations: 4 122 | bakeSimulation: 0 123 | resampleCurves: 1 124 | optimizeGameObjects: 0 125 | motionNodeName: 126 | rigImportErrors: 127 | rigImportWarnings: 128 | animationImportErrors: 129 | animationImportWarnings: 130 | animationRetargetingWarnings: 131 | animationDoRetargetingWarnings: 0 132 | importAnimatedCustomProperties: 0 133 | importConstraints: 0 134 | animationCompression: 1 135 | animationRotationError: 0.5 136 | animationPositionError: 0.5 137 | animationScaleError: 0.5 138 | animationWrapMode: 0 139 | extraExposedTransformPaths: [] 140 | extraUserProperties: [] 141 | clipAnimations: [] 142 | isReadable: 1 143 | meshes: 144 | lODScreenPercentages: 145 | - 0.25 146 | - 0.125 147 | - 0.01 148 | globalScale: 1 149 | meshCompression: 0 150 | addColliders: 0 151 | importVisibility: 1 152 | importBlendShapes: 1 153 | importCameras: 1 154 | importLights: 1 155 | swapUVChannels: 0 156 | generateSecondaryUV: 0 157 | useFileUnits: 1 158 | optimizeMeshForGPU: 1 159 | keepQuads: 0 160 | weldVertices: 1 161 | preserveHierarchy: 0 162 | indexFormat: 0 163 | secondaryUVAngleDistortion: 8 164 | secondaryUVAreaDistortion: 15.000001 165 | secondaryUVHardAngle: 88 166 | secondaryUVPackMargin: 4 167 | useFileScale: 1 168 | previousCalculatedGlobalScale: 1 169 | hasPreviousCalculatedGlobalScale: 0 170 | tangentSpace: 171 | normalSmoothAngle: 60 172 | normalImportMode: 0 173 | tangentImportMode: 3 174 | normalCalculationMode: 4 175 | importAnimation: 1 176 | copyAvatar: 0 177 | humanDescription: 178 | serializedVersion: 2 179 | human: [] 180 | skeleton: [] 181 | armTwist: 0.5 182 | foreArmTwist: 0.5 183 | upperLegTwist: 0.5 184 | legTwist: 0.5 185 | armStretch: 0.05 186 | legStretch: 0.05 187 | feetSpacing: 0 188 | rootMotionBoneName: 189 | rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} 190 | hasTranslationDoF: 0 191 | hasExtraRoot: 0 192 | skeletonHasParents: 1 193 | lastHumanDescriptionAvatarSource: {instanceID: 0} 194 | animationType: 0 195 | humanoidOversampling: 1 196 | additionalBone: 0 197 | userData: 198 | assetBundleName: 199 | assetBundleVariant: 200 | -------------------------------------------------------------------------------- /Palettes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d0cee1b8b8246004e977b69eea277dae 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Palettes/Trees.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 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: 11500000, guid: 44ff22f473f9dda4c9ea762b0d49f037, type: 3} 13 | m_Name: Trees 14 | m_EditorClassIdentifier: 15 | palette: 16 | - gameObjectEditor: {fileID: 0} 17 | - gameObjectEditor: {fileID: 0} 18 | - gameObjectEditor: {fileID: 0} 19 | - gameObjectEditor: {fileID: 0} 20 | -------------------------------------------------------------------------------- /Palettes/Trees.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 41f73b5e52f1255449c5164be2fc48ee 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 971d39227c226004995f7cb4fd79e10f 3 | folderAsset: yes 4 | timeCreated: 1511563570 5 | licenseType: Free 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Prefabs/FallenTree_1_1.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_SourcePrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1752188049916452} 13 | m_IsPrefabAsset: 1 14 | --- !u!1 &1752188049916452 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_CorrespondingSourceObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 6 20 | m_Component: 21 | - component: {fileID: 4425891714653858} 22 | - component: {fileID: 205113164073682918} 23 | m_Layer: 0 24 | m_Name: FallenTree_1_1 25 | m_TagString: Untagged 26 | m_Icon: {fileID: 0} 27 | m_NavMeshLayer: 0 28 | m_StaticEditorFlags: 0 29 | m_IsActive: 1 30 | --- !u!1 &1874889580073250 31 | GameObject: 32 | m_ObjectHideFlags: 0 33 | m_CorrespondingSourceObject: {fileID: 0} 34 | m_PrefabInternal: {fileID: 100100000} 35 | serializedVersion: 6 36 | m_Component: 37 | - component: {fileID: 4119606981717082} 38 | - component: {fileID: 33039221488955492} 39 | - component: {fileID: 23273550922175380} 40 | - component: {fileID: 136828566481799644} 41 | m_Layer: 0 42 | m_Name: FallenTree_1_1_LOD0 43 | m_TagString: Untagged 44 | m_Icon: {fileID: 0} 45 | m_NavMeshLayer: 0 46 | m_StaticEditorFlags: 0 47 | m_IsActive: 1 48 | --- !u!1 &1922290694309860 49 | GameObject: 50 | m_ObjectHideFlags: 0 51 | m_CorrespondingSourceObject: {fileID: 0} 52 | m_PrefabInternal: {fileID: 100100000} 53 | serializedVersion: 6 54 | m_Component: 55 | - component: {fileID: 4067738495509626} 56 | - component: {fileID: 33818918804977882} 57 | - component: {fileID: 23732060537020350} 58 | m_Layer: 0 59 | m_Name: FallenTree_1_1_LOD1 60 | m_TagString: Untagged 61 | m_Icon: {fileID: 0} 62 | m_NavMeshLayer: 0 63 | m_StaticEditorFlags: 0 64 | m_IsActive: 1 65 | --- !u!4 &4067738495509626 66 | Transform: 67 | m_ObjectHideFlags: 1 68 | m_CorrespondingSourceObject: {fileID: 0} 69 | m_PrefabInternal: {fileID: 100100000} 70 | m_GameObject: {fileID: 1922290694309860} 71 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 72 | m_LocalPosition: {x: 0, y: 0, z: 0} 73 | m_LocalScale: {x: 1, y: 1, z: 1} 74 | m_Children: [] 75 | m_Father: {fileID: 4425891714653858} 76 | m_RootOrder: 1 77 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 78 | --- !u!4 &4119606981717082 79 | Transform: 80 | m_ObjectHideFlags: 1 81 | m_CorrespondingSourceObject: {fileID: 0} 82 | m_PrefabInternal: {fileID: 100100000} 83 | m_GameObject: {fileID: 1874889580073250} 84 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 85 | m_LocalPosition: {x: 0, y: 0, z: 0} 86 | m_LocalScale: {x: 1, y: 1, z: 1} 87 | m_Children: [] 88 | m_Father: {fileID: 4425891714653858} 89 | m_RootOrder: 0 90 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 91 | --- !u!4 &4425891714653858 92 | Transform: 93 | m_ObjectHideFlags: 1 94 | m_CorrespondingSourceObject: {fileID: 0} 95 | m_PrefabInternal: {fileID: 100100000} 96 | m_GameObject: {fileID: 1752188049916452} 97 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 98 | m_LocalPosition: {x: -20.34832, y: 0.9092536, z: -6.007515} 99 | m_LocalScale: {x: 1, y: 1, z: 1} 100 | m_Children: 101 | - {fileID: 4119606981717082} 102 | - {fileID: 4067738495509626} 103 | m_Father: {fileID: 0} 104 | m_RootOrder: 0 105 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 106 | --- !u!23 &23273550922175380 107 | MeshRenderer: 108 | m_ObjectHideFlags: 1 109 | m_CorrespondingSourceObject: {fileID: 0} 110 | m_PrefabInternal: {fileID: 100100000} 111 | m_GameObject: {fileID: 1874889580073250} 112 | m_Enabled: 1 113 | m_CastShadows: 1 114 | m_ReceiveShadows: 1 115 | m_DynamicOccludee: 1 116 | m_MotionVectors: 1 117 | m_LightProbeUsage: 1 118 | m_ReflectionProbeUsage: 1 119 | m_RenderingLayerMask: 4294967295 120 | m_Materials: 121 | - {fileID: 2100000, guid: 94bf847a9b88c60428243d160955ba6f, type: 2} 122 | - {fileID: 2100000, guid: 23c20ac7f6d472942a1dd905e69fc6f6, type: 2} 123 | m_StaticBatchInfo: 124 | firstSubMesh: 0 125 | subMeshCount: 0 126 | m_StaticBatchRoot: {fileID: 0} 127 | m_ProbeAnchor: {fileID: 0} 128 | m_LightProbeVolumeOverride: {fileID: 0} 129 | m_ScaleInLightmap: 1 130 | m_PreserveUVs: 0 131 | m_IgnoreNormalsForChartDetection: 0 132 | m_ImportantGI: 0 133 | m_StitchLightmapSeams: 0 134 | m_SelectedEditorRenderState: 3 135 | m_MinimumChartSize: 4 136 | m_AutoUVMaxDistance: 0.5 137 | m_AutoUVMaxAngle: 89 138 | m_LightmapParameters: {fileID: 0} 139 | m_SortingLayerID: 0 140 | m_SortingLayer: 0 141 | m_SortingOrder: 0 142 | --- !u!23 &23732060537020350 143 | MeshRenderer: 144 | m_ObjectHideFlags: 1 145 | m_CorrespondingSourceObject: {fileID: 0} 146 | m_PrefabInternal: {fileID: 100100000} 147 | m_GameObject: {fileID: 1922290694309860} 148 | m_Enabled: 1 149 | m_CastShadows: 1 150 | m_ReceiveShadows: 1 151 | m_DynamicOccludee: 1 152 | m_MotionVectors: 1 153 | m_LightProbeUsage: 1 154 | m_ReflectionProbeUsage: 1 155 | m_RenderingLayerMask: 4294967295 156 | m_Materials: 157 | - {fileID: 2100000, guid: 94bf847a9b88c60428243d160955ba6f, type: 2} 158 | - {fileID: 2100000, guid: 23c20ac7f6d472942a1dd905e69fc6f6, type: 2} 159 | m_StaticBatchInfo: 160 | firstSubMesh: 0 161 | subMeshCount: 0 162 | m_StaticBatchRoot: {fileID: 0} 163 | m_ProbeAnchor: {fileID: 0} 164 | m_LightProbeVolumeOverride: {fileID: 0} 165 | m_ScaleInLightmap: 1 166 | m_PreserveUVs: 0 167 | m_IgnoreNormalsForChartDetection: 0 168 | m_ImportantGI: 0 169 | m_StitchLightmapSeams: 0 170 | m_SelectedEditorRenderState: 3 171 | m_MinimumChartSize: 4 172 | m_AutoUVMaxDistance: 0.5 173 | m_AutoUVMaxAngle: 89 174 | m_LightmapParameters: {fileID: 0} 175 | m_SortingLayerID: 0 176 | m_SortingLayer: 0 177 | m_SortingOrder: 0 178 | --- !u!33 &33039221488955492 179 | MeshFilter: 180 | m_ObjectHideFlags: 1 181 | m_CorrespondingSourceObject: {fileID: 0} 182 | m_PrefabInternal: {fileID: 100100000} 183 | m_GameObject: {fileID: 1874889580073250} 184 | m_Mesh: {fileID: 4300014, guid: 2072bd79c1ae41441b0d087f04e9ec49, type: 3} 185 | --- !u!33 &33818918804977882 186 | MeshFilter: 187 | m_ObjectHideFlags: 1 188 | m_CorrespondingSourceObject: {fileID: 0} 189 | m_PrefabInternal: {fileID: 100100000} 190 | m_GameObject: {fileID: 1922290694309860} 191 | m_Mesh: {fileID: 4300008, guid: 2072bd79c1ae41441b0d087f04e9ec49, type: 3} 192 | --- !u!136 &136828566481799644 193 | CapsuleCollider: 194 | m_ObjectHideFlags: 1 195 | m_CorrespondingSourceObject: {fileID: 0} 196 | m_PrefabInternal: {fileID: 100100000} 197 | m_GameObject: {fileID: 1874889580073250} 198 | m_Material: {fileID: 0} 199 | m_IsTrigger: 0 200 | m_Enabled: 1 201 | m_Radius: 0.27 202 | m_Height: 3.55 203 | m_Direction: 0 204 | m_Center: {x: -0.27397662, y: 0.3446039, z: 0.164999} 205 | --- !u!205 &205113164073682918 206 | LODGroup: 207 | m_ObjectHideFlags: 1 208 | m_CorrespondingSourceObject: {fileID: 0} 209 | m_PrefabInternal: {fileID: 100100000} 210 | m_GameObject: {fileID: 1752188049916452} 211 | serializedVersion: 2 212 | m_LocalReferencePoint: {x: -0.27397656, y: 0.34279928, z: 0.16499901} 213 | m_Size: 3.3435698 214 | m_FadeMode: 0 215 | m_AnimateCrossFading: 0 216 | m_LODs: 217 | - screenRelativeHeight: 0.38038495 218 | fadeTransitionWidth: 0 219 | renderers: 220 | - renderer: {fileID: 23273550922175380} 221 | - screenRelativeHeight: 0.09787728 222 | fadeTransitionWidth: 0 223 | renderers: 224 | - renderer: {fileID: 23732060537020350} 225 | m_Enabled: 1 226 | -------------------------------------------------------------------------------- /Prefabs/FallenTree_1_1.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c33d23e7dff87c94bbbf8303e2318397 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Prefabs/FallenTree_1_2.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_SourcePrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1305952025177006} 13 | m_IsPrefabAsset: 1 14 | --- !u!1 &1008231187660264 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_CorrespondingSourceObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 6 20 | m_Component: 21 | - component: {fileID: 4022393412896704} 22 | - component: {fileID: 33139388719999900} 23 | - component: {fileID: 23271295731109784} 24 | m_Layer: 0 25 | m_Name: FallenTree_1_2_LOD1 26 | m_TagString: Untagged 27 | m_Icon: {fileID: 0} 28 | m_NavMeshLayer: 0 29 | m_StaticEditorFlags: 0 30 | m_IsActive: 1 31 | --- !u!1 &1305952025177006 32 | GameObject: 33 | m_ObjectHideFlags: 0 34 | m_CorrespondingSourceObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | serializedVersion: 6 37 | m_Component: 38 | - component: {fileID: 4932408772013542} 39 | - component: {fileID: 205761805516688568} 40 | m_Layer: 0 41 | m_Name: FallenTree_1_2 42 | m_TagString: Untagged 43 | m_Icon: {fileID: 0} 44 | m_NavMeshLayer: 0 45 | m_StaticEditorFlags: 0 46 | m_IsActive: 1 47 | --- !u!1 &1329185427316014 48 | GameObject: 49 | m_ObjectHideFlags: 1 50 | m_CorrespondingSourceObject: {fileID: 0} 51 | m_PrefabInternal: {fileID: 100100000} 52 | serializedVersion: 6 53 | m_Component: 54 | - component: {fileID: 4163366795491536} 55 | - component: {fileID: 33320826186501648} 56 | - component: {fileID: 23728744388220046} 57 | m_Layer: 0 58 | m_Name: FallenTree_1_2_LOD1_2 59 | m_TagString: Untagged 60 | m_Icon: {fileID: 0} 61 | m_NavMeshLayer: 0 62 | m_StaticEditorFlags: 0 63 | m_IsActive: 1 64 | --- !u!1 &1665681759173964 65 | GameObject: 66 | m_ObjectHideFlags: 0 67 | m_CorrespondingSourceObject: {fileID: 0} 68 | m_PrefabInternal: {fileID: 100100000} 69 | serializedVersion: 6 70 | m_Component: 71 | - component: {fileID: 4722370594380300} 72 | - component: {fileID: 33320837886700086} 73 | - component: {fileID: 23266738428522786} 74 | - component: {fileID: 136803515927760366} 75 | m_Layer: 0 76 | m_Name: FallenTree_1_2_LOD0 77 | m_TagString: Untagged 78 | m_Icon: {fileID: 0} 79 | m_NavMeshLayer: 0 80 | m_StaticEditorFlags: 0 81 | m_IsActive: 1 82 | --- !u!1 &1895141887827254 83 | GameObject: 84 | m_ObjectHideFlags: 1 85 | m_CorrespondingSourceObject: {fileID: 0} 86 | m_PrefabInternal: {fileID: 100100000} 87 | serializedVersion: 6 88 | m_Component: 89 | - component: {fileID: 4144940386724496} 90 | - component: {fileID: 33453623215053390} 91 | - component: {fileID: 23086777199137626} 92 | m_Layer: 0 93 | m_Name: FallenTree_1_2_2 94 | m_TagString: Untagged 95 | m_Icon: {fileID: 0} 96 | m_NavMeshLayer: 0 97 | m_StaticEditorFlags: 0 98 | m_IsActive: 1 99 | --- !u!4 &4022393412896704 100 | Transform: 101 | m_ObjectHideFlags: 1 102 | m_CorrespondingSourceObject: {fileID: 0} 103 | m_PrefabInternal: {fileID: 100100000} 104 | m_GameObject: {fileID: 1008231187660264} 105 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 106 | m_LocalPosition: {x: 0, y: 0, z: 0} 107 | m_LocalScale: {x: 1, y: 1, z: 1} 108 | m_Children: 109 | - {fileID: 4163366795491536} 110 | m_Father: {fileID: 4932408772013542} 111 | m_RootOrder: 1 112 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 113 | --- !u!4 &4144940386724496 114 | Transform: 115 | m_ObjectHideFlags: 1 116 | m_CorrespondingSourceObject: {fileID: 0} 117 | m_PrefabInternal: {fileID: 100100000} 118 | m_GameObject: {fileID: 1895141887827254} 119 | m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} 120 | m_LocalPosition: {x: -0.37391418, y: 1.1705898, z: -0.0026968382} 121 | m_LocalScale: {x: 1, y: 1, z: 1} 122 | m_Children: [] 123 | m_Father: {fileID: 4722370594380300} 124 | m_RootOrder: 0 125 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 126 | --- !u!4 &4163366795491536 127 | Transform: 128 | m_ObjectHideFlags: 1 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInternal: {fileID: 100100000} 131 | m_GameObject: {fileID: 1329185427316014} 132 | m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} 133 | m_LocalPosition: {x: -0.37391418, y: 1.1705898, z: -0.0026968382} 134 | m_LocalScale: {x: 1, y: 1, z: 1} 135 | m_Children: [] 136 | m_Father: {fileID: 4022393412896704} 137 | m_RootOrder: 0 138 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 139 | --- !u!4 &4722370594380300 140 | Transform: 141 | m_ObjectHideFlags: 1 142 | m_CorrespondingSourceObject: {fileID: 0} 143 | m_PrefabInternal: {fileID: 100100000} 144 | m_GameObject: {fileID: 1665681759173964} 145 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 146 | m_LocalPosition: {x: 0, y: 0, z: 0} 147 | m_LocalScale: {x: 1, y: 1, z: 1} 148 | m_Children: 149 | - {fileID: 4144940386724496} 150 | m_Father: {fileID: 4932408772013542} 151 | m_RootOrder: 0 152 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 153 | --- !u!4 &4932408772013542 154 | Transform: 155 | m_ObjectHideFlags: 1 156 | m_CorrespondingSourceObject: {fileID: 0} 157 | m_PrefabInternal: {fileID: 100100000} 158 | m_GameObject: {fileID: 1305952025177006} 159 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 160 | m_LocalPosition: {x: -5.92, y: 0.89255834, z: -7.6} 161 | m_LocalScale: {x: 1, y: 1, z: 1} 162 | m_Children: 163 | - {fileID: 4722370594380300} 164 | - {fileID: 4022393412896704} 165 | m_Father: {fileID: 0} 166 | m_RootOrder: 0 167 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 168 | --- !u!23 &23086777199137626 169 | MeshRenderer: 170 | m_ObjectHideFlags: 1 171 | m_CorrespondingSourceObject: {fileID: 0} 172 | m_PrefabInternal: {fileID: 100100000} 173 | m_GameObject: {fileID: 1895141887827254} 174 | m_Enabled: 1 175 | m_CastShadows: 1 176 | m_ReceiveShadows: 1 177 | m_DynamicOccludee: 1 178 | m_MotionVectors: 1 179 | m_LightProbeUsage: 1 180 | m_ReflectionProbeUsage: 1 181 | m_RenderingLayerMask: 4294967295 182 | m_Materials: 183 | - {fileID: 2100000, guid: 23c20ac7f6d472942a1dd905e69fc6f6, type: 2} 184 | - {fileID: 2100000, guid: 94bf847a9b88c60428243d160955ba6f, type: 2} 185 | m_StaticBatchInfo: 186 | firstSubMesh: 0 187 | subMeshCount: 0 188 | m_StaticBatchRoot: {fileID: 0} 189 | m_ProbeAnchor: {fileID: 0} 190 | m_LightProbeVolumeOverride: {fileID: 0} 191 | m_ScaleInLightmap: 1 192 | m_PreserveUVs: 0 193 | m_IgnoreNormalsForChartDetection: 0 194 | m_ImportantGI: 0 195 | m_StitchLightmapSeams: 0 196 | m_SelectedEditorRenderState: 3 197 | m_MinimumChartSize: 4 198 | m_AutoUVMaxDistance: 0.5 199 | m_AutoUVMaxAngle: 89 200 | m_LightmapParameters: {fileID: 0} 201 | m_SortingLayerID: 0 202 | m_SortingLayer: 0 203 | m_SortingOrder: 0 204 | --- !u!23 &23266738428522786 205 | MeshRenderer: 206 | m_ObjectHideFlags: 1 207 | m_CorrespondingSourceObject: {fileID: 0} 208 | m_PrefabInternal: {fileID: 100100000} 209 | m_GameObject: {fileID: 1665681759173964} 210 | m_Enabled: 1 211 | m_CastShadows: 1 212 | m_ReceiveShadows: 1 213 | m_DynamicOccludee: 1 214 | m_MotionVectors: 1 215 | m_LightProbeUsage: 1 216 | m_ReflectionProbeUsage: 1 217 | m_RenderingLayerMask: 4294967295 218 | m_Materials: 219 | - {fileID: 2100000, guid: 94bf847a9b88c60428243d160955ba6f, type: 2} 220 | - {fileID: 2100000, guid: 23c20ac7f6d472942a1dd905e69fc6f6, type: 2} 221 | m_StaticBatchInfo: 222 | firstSubMesh: 0 223 | subMeshCount: 0 224 | m_StaticBatchRoot: {fileID: 0} 225 | m_ProbeAnchor: {fileID: 0} 226 | m_LightProbeVolumeOverride: {fileID: 0} 227 | m_ScaleInLightmap: 1 228 | m_PreserveUVs: 0 229 | m_IgnoreNormalsForChartDetection: 0 230 | m_ImportantGI: 0 231 | m_StitchLightmapSeams: 0 232 | m_SelectedEditorRenderState: 3 233 | m_MinimumChartSize: 4 234 | m_AutoUVMaxDistance: 0.5 235 | m_AutoUVMaxAngle: 89 236 | m_LightmapParameters: {fileID: 0} 237 | m_SortingLayerID: 0 238 | m_SortingLayer: 0 239 | m_SortingOrder: 0 240 | --- !u!23 &23271295731109784 241 | MeshRenderer: 242 | m_ObjectHideFlags: 1 243 | m_CorrespondingSourceObject: {fileID: 0} 244 | m_PrefabInternal: {fileID: 100100000} 245 | m_GameObject: {fileID: 1008231187660264} 246 | m_Enabled: 1 247 | m_CastShadows: 1 248 | m_ReceiveShadows: 1 249 | m_DynamicOccludee: 1 250 | m_MotionVectors: 1 251 | m_LightProbeUsage: 1 252 | m_ReflectionProbeUsage: 1 253 | m_RenderingLayerMask: 4294967295 254 | m_Materials: 255 | - {fileID: 2100000, guid: 94bf847a9b88c60428243d160955ba6f, type: 2} 256 | - {fileID: 2100002, guid: 2072bd79c1ae41441b0d087f04e9ec49, type: 3} 257 | m_StaticBatchInfo: 258 | firstSubMesh: 0 259 | subMeshCount: 0 260 | m_StaticBatchRoot: {fileID: 0} 261 | m_ProbeAnchor: {fileID: 0} 262 | m_LightProbeVolumeOverride: {fileID: 0} 263 | m_ScaleInLightmap: 1 264 | m_PreserveUVs: 0 265 | m_IgnoreNormalsForChartDetection: 0 266 | m_ImportantGI: 0 267 | m_StitchLightmapSeams: 0 268 | m_SelectedEditorRenderState: 3 269 | m_MinimumChartSize: 4 270 | m_AutoUVMaxDistance: 0.5 271 | m_AutoUVMaxAngle: 89 272 | m_LightmapParameters: {fileID: 0} 273 | m_SortingLayerID: 0 274 | m_SortingLayer: 0 275 | m_SortingOrder: 0 276 | --- !u!23 &23728744388220046 277 | MeshRenderer: 278 | m_ObjectHideFlags: 1 279 | m_CorrespondingSourceObject: {fileID: 0} 280 | m_PrefabInternal: {fileID: 100100000} 281 | m_GameObject: {fileID: 1329185427316014} 282 | m_Enabled: 1 283 | m_CastShadows: 1 284 | m_ReceiveShadows: 1 285 | m_DynamicOccludee: 1 286 | m_MotionVectors: 1 287 | m_LightProbeUsage: 1 288 | m_ReflectionProbeUsage: 1 289 | m_RenderingLayerMask: 4294967295 290 | m_Materials: 291 | - {fileID: 2100000, guid: 94bf847a9b88c60428243d160955ba6f, type: 2} 292 | - {fileID: 2100000, guid: 23c20ac7f6d472942a1dd905e69fc6f6, type: 2} 293 | m_StaticBatchInfo: 294 | firstSubMesh: 0 295 | subMeshCount: 0 296 | m_StaticBatchRoot: {fileID: 0} 297 | m_ProbeAnchor: {fileID: 0} 298 | m_LightProbeVolumeOverride: {fileID: 0} 299 | m_ScaleInLightmap: 1 300 | m_PreserveUVs: 0 301 | m_IgnoreNormalsForChartDetection: 0 302 | m_ImportantGI: 0 303 | m_StitchLightmapSeams: 0 304 | m_SelectedEditorRenderState: 3 305 | m_MinimumChartSize: 4 306 | m_AutoUVMaxDistance: 0.5 307 | m_AutoUVMaxAngle: 89 308 | m_LightmapParameters: {fileID: 0} 309 | m_SortingLayerID: 0 310 | m_SortingLayer: 0 311 | m_SortingOrder: 0 312 | --- !u!33 &33139388719999900 313 | MeshFilter: 314 | m_ObjectHideFlags: 1 315 | m_CorrespondingSourceObject: {fileID: 0} 316 | m_PrefabInternal: {fileID: 100100000} 317 | m_GameObject: {fileID: 1008231187660264} 318 | m_Mesh: {fileID: 4300004, guid: 2072bd79c1ae41441b0d087f04e9ec49, type: 3} 319 | --- !u!33 &33320826186501648 320 | MeshFilter: 321 | m_ObjectHideFlags: 1 322 | m_CorrespondingSourceObject: {fileID: 0} 323 | m_PrefabInternal: {fileID: 100100000} 324 | m_GameObject: {fileID: 1329185427316014} 325 | m_Mesh: {fileID: 4300006, guid: 2072bd79c1ae41441b0d087f04e9ec49, type: 3} 326 | --- !u!33 &33320837886700086 327 | MeshFilter: 328 | m_ObjectHideFlags: 1 329 | m_CorrespondingSourceObject: {fileID: 0} 330 | m_PrefabInternal: {fileID: 100100000} 331 | m_GameObject: {fileID: 1665681759173964} 332 | m_Mesh: {fileID: 4300016, guid: 2072bd79c1ae41441b0d087f04e9ec49, type: 3} 333 | --- !u!33 &33453623215053390 334 | MeshFilter: 335 | m_ObjectHideFlags: 1 336 | m_CorrespondingSourceObject: {fileID: 0} 337 | m_PrefabInternal: {fileID: 100100000} 338 | m_GameObject: {fileID: 1895141887827254} 339 | m_Mesh: {fileID: 4300018, guid: 2072bd79c1ae41441b0d087f04e9ec49, type: 3} 340 | --- !u!136 &136803515927760366 341 | CapsuleCollider: 342 | m_ObjectHideFlags: 1 343 | m_CorrespondingSourceObject: {fileID: 0} 344 | m_PrefabInternal: {fileID: 100100000} 345 | m_GameObject: {fileID: 1665681759173964} 346 | m_Material: {fileID: 0} 347 | m_IsTrigger: 0 348 | m_Enabled: 1 349 | m_Radius: 0.465623 350 | m_Height: 1.97 351 | m_Direction: 1 352 | m_Center: {x: -0.1514842, y: 0.52, z: 0.02891469} 353 | --- !u!205 &205761805516688568 354 | LODGroup: 355 | m_ObjectHideFlags: 1 356 | m_CorrespondingSourceObject: {fileID: 0} 357 | m_PrefabInternal: {fileID: 100100000} 358 | m_GameObject: {fileID: 1305952025177006} 359 | serializedVersion: 2 360 | m_LocalReferencePoint: {x: -3.947372, y: 0.7690802, z: -0.20038033} 361 | m_Size: 8.516812 362 | m_FadeMode: 0 363 | m_AnimateCrossFading: 0 364 | m_LODs: 365 | - screenRelativeHeight: 0.5753949 366 | fadeTransitionWidth: 0 367 | renderers: 368 | - renderer: {fileID: 23266738428522786} 369 | - renderer: {fileID: 23086777199137626} 370 | - screenRelativeHeight: 0.11074153 371 | fadeTransitionWidth: 0 372 | renderers: 373 | - renderer: {fileID: 23271295731109784} 374 | - renderer: {fileID: 23728744388220046} 375 | m_Enabled: 1 376 | -------------------------------------------------------------------------------- /Prefabs/FallenTree_1_2.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7bd8a99d77d246b41b47d6f0958d6e89 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Prefabs/Tree_1_1.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_SourcePrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1955936618837180} 13 | m_IsPrefabAsset: 1 14 | --- !u!1 &1357836753698172 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_CorrespondingSourceObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 6 20 | m_Component: 21 | - component: {fileID: 4549656930938624} 22 | - component: {fileID: 33940563774944222} 23 | - component: {fileID: 23286278398569414} 24 | - component: {fileID: 136261872817750516} 25 | m_Layer: 0 26 | m_Name: Tree_1_1_LOD0 27 | m_TagString: Untagged 28 | m_Icon: {fileID: 0} 29 | m_NavMeshLayer: 0 30 | m_StaticEditorFlags: 0 31 | m_IsActive: 1 32 | --- !u!1 &1630978763993220 33 | GameObject: 34 | m_ObjectHideFlags: 0 35 | m_CorrespondingSourceObject: {fileID: 0} 36 | m_PrefabInternal: {fileID: 100100000} 37 | serializedVersion: 6 38 | m_Component: 39 | - component: {fileID: 4051071743000218} 40 | - component: {fileID: 33944501838770734} 41 | - component: {fileID: 23517603412684074} 42 | m_Layer: 0 43 | m_Name: Tree_1_1_LOD2 44 | m_TagString: Untagged 45 | m_Icon: {fileID: 0} 46 | m_NavMeshLayer: 0 47 | m_StaticEditorFlags: 0 48 | m_IsActive: 1 49 | --- !u!1 &1729174505132776 50 | GameObject: 51 | m_ObjectHideFlags: 0 52 | m_CorrespondingSourceObject: {fileID: 0} 53 | m_PrefabInternal: {fileID: 100100000} 54 | serializedVersion: 6 55 | m_Component: 56 | - component: {fileID: 4615417611742108} 57 | - component: {fileID: 33033039739478526} 58 | - component: {fileID: 23429896088179530} 59 | m_Layer: 0 60 | m_Name: Tree_1_1_LOD1 61 | m_TagString: Untagged 62 | m_Icon: {fileID: 0} 63 | m_NavMeshLayer: 0 64 | m_StaticEditorFlags: 0 65 | m_IsActive: 1 66 | --- !u!1 &1955936618837180 67 | GameObject: 68 | m_ObjectHideFlags: 0 69 | m_CorrespondingSourceObject: {fileID: 0} 70 | m_PrefabInternal: {fileID: 100100000} 71 | serializedVersion: 6 72 | m_Component: 73 | - component: {fileID: 4433883364020248} 74 | - component: {fileID: 205220412653419092} 75 | m_Layer: 0 76 | m_Name: Tree_1_1 77 | m_TagString: Untagged 78 | m_Icon: {fileID: 0} 79 | m_NavMeshLayer: 0 80 | m_StaticEditorFlags: 0 81 | m_IsActive: 1 82 | --- !u!4 &4051071743000218 83 | Transform: 84 | m_ObjectHideFlags: 1 85 | m_CorrespondingSourceObject: {fileID: 0} 86 | m_PrefabInternal: {fileID: 100100000} 87 | m_GameObject: {fileID: 1630978763993220} 88 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 89 | m_LocalPosition: {x: 0, y: 0, z: 0} 90 | m_LocalScale: {x: 1, y: 1, z: 1} 91 | m_Children: [] 92 | m_Father: {fileID: 4433883364020248} 93 | m_RootOrder: 2 94 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 95 | --- !u!4 &4433883364020248 96 | Transform: 97 | m_ObjectHideFlags: 1 98 | m_CorrespondingSourceObject: {fileID: 0} 99 | m_PrefabInternal: {fileID: 100100000} 100 | m_GameObject: {fileID: 1955936618837180} 101 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 102 | m_LocalPosition: {x: -21.819054, y: 0.81094456, z: 1.0602722} 103 | m_LocalScale: {x: 1, y: 1, z: 1} 104 | m_Children: 105 | - {fileID: 4549656930938624} 106 | - {fileID: 4615417611742108} 107 | - {fileID: 4051071743000218} 108 | m_Father: {fileID: 0} 109 | m_RootOrder: 0 110 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 111 | --- !u!4 &4549656930938624 112 | Transform: 113 | m_ObjectHideFlags: 1 114 | m_CorrespondingSourceObject: {fileID: 0} 115 | m_PrefabInternal: {fileID: 100100000} 116 | m_GameObject: {fileID: 1357836753698172} 117 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 118 | m_LocalPosition: {x: 0, y: 0, z: 0} 119 | m_LocalScale: {x: 1, y: 1, z: 1} 120 | m_Children: [] 121 | m_Father: {fileID: 4433883364020248} 122 | m_RootOrder: 0 123 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 124 | --- !u!4 &4615417611742108 125 | Transform: 126 | m_ObjectHideFlags: 1 127 | m_CorrespondingSourceObject: {fileID: 0} 128 | m_PrefabInternal: {fileID: 100100000} 129 | m_GameObject: {fileID: 1729174505132776} 130 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 131 | m_LocalPosition: {x: 0, y: 0, z: 0} 132 | m_LocalScale: {x: 1, y: 1, z: 1} 133 | m_Children: [] 134 | m_Father: {fileID: 4433883364020248} 135 | m_RootOrder: 1 136 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 137 | --- !u!23 &23286278398569414 138 | MeshRenderer: 139 | m_ObjectHideFlags: 1 140 | m_CorrespondingSourceObject: {fileID: 0} 141 | m_PrefabInternal: {fileID: 100100000} 142 | m_GameObject: {fileID: 1357836753698172} 143 | m_Enabled: 1 144 | m_CastShadows: 1 145 | m_ReceiveShadows: 1 146 | m_DynamicOccludee: 1 147 | m_MotionVectors: 1 148 | m_LightProbeUsage: 1 149 | m_ReflectionProbeUsage: 1 150 | m_RenderingLayerMask: 4294967295 151 | m_Materials: 152 | - {fileID: 2100000, guid: 94bf847a9b88c60428243d160955ba6f, type: 2} 153 | - {fileID: 2100000, guid: 22ae8ca533ae0ff45a92966006a65514, type: 2} 154 | - {fileID: 2100000, guid: 23c20ac7f6d472942a1dd905e69fc6f6, type: 2} 155 | m_StaticBatchInfo: 156 | firstSubMesh: 0 157 | subMeshCount: 0 158 | m_StaticBatchRoot: {fileID: 0} 159 | m_ProbeAnchor: {fileID: 0} 160 | m_LightProbeVolumeOverride: {fileID: 0} 161 | m_ScaleInLightmap: 1 162 | m_PreserveUVs: 0 163 | m_IgnoreNormalsForChartDetection: 0 164 | m_ImportantGI: 0 165 | m_StitchLightmapSeams: 0 166 | m_SelectedEditorRenderState: 3 167 | m_MinimumChartSize: 4 168 | m_AutoUVMaxDistance: 0.5 169 | m_AutoUVMaxAngle: 89 170 | m_LightmapParameters: {fileID: 0} 171 | m_SortingLayerID: 0 172 | m_SortingLayer: 0 173 | m_SortingOrder: 0 174 | --- !u!23 &23429896088179530 175 | MeshRenderer: 176 | m_ObjectHideFlags: 1 177 | m_CorrespondingSourceObject: {fileID: 0} 178 | m_PrefabInternal: {fileID: 100100000} 179 | m_GameObject: {fileID: 1729174505132776} 180 | m_Enabled: 1 181 | m_CastShadows: 1 182 | m_ReceiveShadows: 1 183 | m_DynamicOccludee: 1 184 | m_MotionVectors: 1 185 | m_LightProbeUsage: 1 186 | m_ReflectionProbeUsage: 1 187 | m_RenderingLayerMask: 4294967295 188 | m_Materials: 189 | - {fileID: 2100000, guid: 94bf847a9b88c60428243d160955ba6f, type: 2} 190 | - {fileID: 2100000, guid: 23c20ac7f6d472942a1dd905e69fc6f6, type: 2} 191 | - {fileID: 2100000, guid: 22ae8ca533ae0ff45a92966006a65514, type: 2} 192 | m_StaticBatchInfo: 193 | firstSubMesh: 0 194 | subMeshCount: 0 195 | m_StaticBatchRoot: {fileID: 0} 196 | m_ProbeAnchor: {fileID: 0} 197 | m_LightProbeVolumeOverride: {fileID: 0} 198 | m_ScaleInLightmap: 1 199 | m_PreserveUVs: 0 200 | m_IgnoreNormalsForChartDetection: 0 201 | m_ImportantGI: 0 202 | m_StitchLightmapSeams: 0 203 | m_SelectedEditorRenderState: 3 204 | m_MinimumChartSize: 4 205 | m_AutoUVMaxDistance: 0.5 206 | m_AutoUVMaxAngle: 89 207 | m_LightmapParameters: {fileID: 0} 208 | m_SortingLayerID: 0 209 | m_SortingLayer: 0 210 | m_SortingOrder: 0 211 | --- !u!23 &23517603412684074 212 | MeshRenderer: 213 | m_ObjectHideFlags: 1 214 | m_CorrespondingSourceObject: {fileID: 0} 215 | m_PrefabInternal: {fileID: 100100000} 216 | m_GameObject: {fileID: 1630978763993220} 217 | m_Enabled: 1 218 | m_CastShadows: 1 219 | m_ReceiveShadows: 1 220 | m_DynamicOccludee: 1 221 | m_MotionVectors: 1 222 | m_LightProbeUsage: 1 223 | m_ReflectionProbeUsage: 1 224 | m_RenderingLayerMask: 4294967295 225 | m_Materials: 226 | - {fileID: 2100000, guid: 94bf847a9b88c60428243d160955ba6f, type: 2} 227 | - {fileID: 2100002, guid: 2072bd79c1ae41441b0d087f04e9ec49, type: 3} 228 | - {fileID: 2100000, guid: 22ae8ca533ae0ff45a92966006a65514, type: 2} 229 | m_StaticBatchInfo: 230 | firstSubMesh: 0 231 | subMeshCount: 0 232 | m_StaticBatchRoot: {fileID: 0} 233 | m_ProbeAnchor: {fileID: 0} 234 | m_LightProbeVolumeOverride: {fileID: 0} 235 | m_ScaleInLightmap: 1 236 | m_PreserveUVs: 0 237 | m_IgnoreNormalsForChartDetection: 0 238 | m_ImportantGI: 0 239 | m_StitchLightmapSeams: 0 240 | m_SelectedEditorRenderState: 3 241 | m_MinimumChartSize: 4 242 | m_AutoUVMaxDistance: 0.5 243 | m_AutoUVMaxAngle: 89 244 | m_LightmapParameters: {fileID: 0} 245 | m_SortingLayerID: 0 246 | m_SortingLayer: 0 247 | m_SortingOrder: 0 248 | --- !u!33 &33033039739478526 249 | MeshFilter: 250 | m_ObjectHideFlags: 1 251 | m_CorrespondingSourceObject: {fileID: 0} 252 | m_PrefabInternal: {fileID: 100100000} 253 | m_GameObject: {fileID: 1729174505132776} 254 | m_Mesh: {fileID: 4300036, guid: 2072bd79c1ae41441b0d087f04e9ec49, type: 3} 255 | --- !u!33 &33940563774944222 256 | MeshFilter: 257 | m_ObjectHideFlags: 1 258 | m_CorrespondingSourceObject: {fileID: 0} 259 | m_PrefabInternal: {fileID: 100100000} 260 | m_GameObject: {fileID: 1357836753698172} 261 | m_Mesh: {fileID: 4300038, guid: 2072bd79c1ae41441b0d087f04e9ec49, type: 3} 262 | --- !u!33 &33944501838770734 263 | MeshFilter: 264 | m_ObjectHideFlags: 1 265 | m_CorrespondingSourceObject: {fileID: 0} 266 | m_PrefabInternal: {fileID: 100100000} 267 | m_GameObject: {fileID: 1630978763993220} 268 | m_Mesh: {fileID: 4300000, guid: 2072bd79c1ae41441b0d087f04e9ec49, type: 3} 269 | --- !u!136 &136261872817750516 270 | CapsuleCollider: 271 | m_ObjectHideFlags: 1 272 | m_CorrespondingSourceObject: {fileID: 0} 273 | m_PrefabInternal: {fileID: 100100000} 274 | m_GameObject: {fileID: 1357836753698172} 275 | m_Material: {fileID: 0} 276 | m_IsTrigger: 0 277 | m_Enabled: 1 278 | m_Radius: 0.36 279 | m_Height: 3.8 280 | m_Direction: 1 281 | m_Center: {x: -0.01, y: 1.54, z: 0.0006586313} 282 | --- !u!205 &205220412653419092 283 | LODGroup: 284 | m_ObjectHideFlags: 1 285 | m_CorrespondingSourceObject: {fileID: 0} 286 | m_PrefabInternal: {fileID: 100100000} 287 | m_GameObject: {fileID: 1955936618837180} 288 | serializedVersion: 2 289 | m_LocalReferencePoint: {x: -0.18765974, y: 4.6580067, z: 0.0006585121} 290 | m_Size: 9.322132 291 | m_FadeMode: 0 292 | m_AnimateCrossFading: 0 293 | m_LODs: 294 | - screenRelativeHeight: 0.55831754 295 | fadeTransitionWidth: 0 296 | renderers: 297 | - renderer: {fileID: 23286278398569414} 298 | - screenRelativeHeight: 0.25041845 299 | fadeTransitionWidth: 0 300 | renderers: 301 | - renderer: {fileID: 23429896088179530} 302 | - screenRelativeHeight: 0.06256683 303 | fadeTransitionWidth: 0 304 | renderers: 305 | - renderer: {fileID: 23517603412684074} 306 | m_Enabled: 1 307 | -------------------------------------------------------------------------------- /Prefabs/Tree_1_1.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 465cbb465c9880c45887d824bd1f720b 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Prefabs/Tree_1_2.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_SourcePrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1600545553093010} 13 | m_IsPrefabAsset: 1 14 | --- !u!1 &1228787484623168 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_CorrespondingSourceObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 6 20 | m_Component: 21 | - component: {fileID: 4119931793260534} 22 | - component: {fileID: 33533546772742986} 23 | - component: {fileID: 23712581823451684} 24 | m_Layer: 0 25 | m_Name: Tree_1_2_LOD2 26 | m_TagString: Untagged 27 | m_Icon: {fileID: 0} 28 | m_NavMeshLayer: 0 29 | m_StaticEditorFlags: 0 30 | m_IsActive: 1 31 | --- !u!1 &1527765430585842 32 | GameObject: 33 | m_ObjectHideFlags: 0 34 | m_CorrespondingSourceObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | serializedVersion: 6 37 | m_Component: 38 | - component: {fileID: 4881118163134010} 39 | - component: {fileID: 33244646109365364} 40 | - component: {fileID: 23657480971582912} 41 | m_Layer: 0 42 | m_Name: Tree_1_2_LOD1 43 | m_TagString: Untagged 44 | m_Icon: {fileID: 0} 45 | m_NavMeshLayer: 0 46 | m_StaticEditorFlags: 0 47 | m_IsActive: 1 48 | --- !u!1 &1600545553093010 49 | GameObject: 50 | m_ObjectHideFlags: 0 51 | m_CorrespondingSourceObject: {fileID: 0} 52 | m_PrefabInternal: {fileID: 100100000} 53 | serializedVersion: 6 54 | m_Component: 55 | - component: {fileID: 4471724834614440} 56 | - component: {fileID: 205557346800865596} 57 | m_Layer: 0 58 | m_Name: Tree_1_2 59 | m_TagString: Untagged 60 | m_Icon: {fileID: 0} 61 | m_NavMeshLayer: 0 62 | m_StaticEditorFlags: 0 63 | m_IsActive: 1 64 | --- !u!1 &1956810342624834 65 | GameObject: 66 | m_ObjectHideFlags: 0 67 | m_CorrespondingSourceObject: {fileID: 0} 68 | m_PrefabInternal: {fileID: 100100000} 69 | serializedVersion: 6 70 | m_Component: 71 | - component: {fileID: 4228861086155150} 72 | - component: {fileID: 33649867626934952} 73 | - component: {fileID: 23413134272489158} 74 | - component: {fileID: 136835660467181680} 75 | m_Layer: 0 76 | m_Name: Tree_1_2_LOD0 77 | m_TagString: Untagged 78 | m_Icon: {fileID: 0} 79 | m_NavMeshLayer: 0 80 | m_StaticEditorFlags: 0 81 | m_IsActive: 1 82 | --- !u!4 &4119931793260534 83 | Transform: 84 | m_ObjectHideFlags: 1 85 | m_CorrespondingSourceObject: {fileID: 0} 86 | m_PrefabInternal: {fileID: 100100000} 87 | m_GameObject: {fileID: 1228787484623168} 88 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 89 | m_LocalPosition: {x: 0, y: 0, z: 0} 90 | m_LocalScale: {x: 1, y: 1, z: 1} 91 | m_Children: [] 92 | m_Father: {fileID: 4471724834614440} 93 | m_RootOrder: 2 94 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 95 | --- !u!4 &4228861086155150 96 | Transform: 97 | m_ObjectHideFlags: 1 98 | m_CorrespondingSourceObject: {fileID: 0} 99 | m_PrefabInternal: {fileID: 100100000} 100 | m_GameObject: {fileID: 1956810342624834} 101 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 102 | m_LocalPosition: {x: 0, y: 0, z: 0} 103 | m_LocalScale: {x: 1, y: 1, z: 1} 104 | m_Children: [] 105 | m_Father: {fileID: 4471724834614440} 106 | m_RootOrder: 0 107 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 108 | --- !u!4 &4471724834614440 109 | Transform: 110 | m_ObjectHideFlags: 1 111 | m_CorrespondingSourceObject: {fileID: 0} 112 | m_PrefabInternal: {fileID: 100100000} 113 | m_GameObject: {fileID: 1600545553093010} 114 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 115 | m_LocalPosition: {x: -23.667656, y: 0.7766118, z: 0.42324066} 116 | m_LocalScale: {x: 1, y: 1, z: 1} 117 | m_Children: 118 | - {fileID: 4228861086155150} 119 | - {fileID: 4881118163134010} 120 | - {fileID: 4119931793260534} 121 | m_Father: {fileID: 0} 122 | m_RootOrder: 0 123 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 124 | --- !u!4 &4881118163134010 125 | Transform: 126 | m_ObjectHideFlags: 1 127 | m_CorrespondingSourceObject: {fileID: 0} 128 | m_PrefabInternal: {fileID: 100100000} 129 | m_GameObject: {fileID: 1527765430585842} 130 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 131 | m_LocalPosition: {x: 0, y: 0, z: 0} 132 | m_LocalScale: {x: 1, y: 1, z: 1} 133 | m_Children: [] 134 | m_Father: {fileID: 4471724834614440} 135 | m_RootOrder: 1 136 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 137 | --- !u!23 &23413134272489158 138 | MeshRenderer: 139 | m_ObjectHideFlags: 1 140 | m_CorrespondingSourceObject: {fileID: 0} 141 | m_PrefabInternal: {fileID: 100100000} 142 | m_GameObject: {fileID: 1956810342624834} 143 | m_Enabled: 1 144 | m_CastShadows: 1 145 | m_ReceiveShadows: 1 146 | m_DynamicOccludee: 1 147 | m_MotionVectors: 1 148 | m_LightProbeUsage: 1 149 | m_ReflectionProbeUsage: 1 150 | m_RenderingLayerMask: 4294967295 151 | m_Materials: 152 | - {fileID: 2100000, guid: 94bf847a9b88c60428243d160955ba6f, type: 2} 153 | - {fileID: 2100000, guid: 22ae8ca533ae0ff45a92966006a65514, type: 2} 154 | - {fileID: 2100000, guid: 23c20ac7f6d472942a1dd905e69fc6f6, type: 2} 155 | m_StaticBatchInfo: 156 | firstSubMesh: 0 157 | subMeshCount: 0 158 | m_StaticBatchRoot: {fileID: 0} 159 | m_ProbeAnchor: {fileID: 0} 160 | m_LightProbeVolumeOverride: {fileID: 0} 161 | m_ScaleInLightmap: 1 162 | m_PreserveUVs: 0 163 | m_IgnoreNormalsForChartDetection: 0 164 | m_ImportantGI: 0 165 | m_StitchLightmapSeams: 0 166 | m_SelectedEditorRenderState: 3 167 | m_MinimumChartSize: 4 168 | m_AutoUVMaxDistance: 0.5 169 | m_AutoUVMaxAngle: 89 170 | m_LightmapParameters: {fileID: 0} 171 | m_SortingLayerID: 0 172 | m_SortingLayer: 0 173 | m_SortingOrder: 0 174 | --- !u!23 &23657480971582912 175 | MeshRenderer: 176 | m_ObjectHideFlags: 1 177 | m_CorrespondingSourceObject: {fileID: 0} 178 | m_PrefabInternal: {fileID: 100100000} 179 | m_GameObject: {fileID: 1527765430585842} 180 | m_Enabled: 1 181 | m_CastShadows: 1 182 | m_ReceiveShadows: 1 183 | m_DynamicOccludee: 1 184 | m_MotionVectors: 1 185 | m_LightProbeUsage: 1 186 | m_ReflectionProbeUsage: 1 187 | m_RenderingLayerMask: 4294967295 188 | m_Materials: 189 | - {fileID: 2100000, guid: 94bf847a9b88c60428243d160955ba6f, type: 2} 190 | - {fileID: 2100000, guid: 22ae8ca533ae0ff45a92966006a65514, type: 2} 191 | - {fileID: 2100000, guid: 23c20ac7f6d472942a1dd905e69fc6f6, type: 2} 192 | m_StaticBatchInfo: 193 | firstSubMesh: 0 194 | subMeshCount: 0 195 | m_StaticBatchRoot: {fileID: 0} 196 | m_ProbeAnchor: {fileID: 0} 197 | m_LightProbeVolumeOverride: {fileID: 0} 198 | m_ScaleInLightmap: 1 199 | m_PreserveUVs: 0 200 | m_IgnoreNormalsForChartDetection: 0 201 | m_ImportantGI: 0 202 | m_StitchLightmapSeams: 0 203 | m_SelectedEditorRenderState: 3 204 | m_MinimumChartSize: 4 205 | m_AutoUVMaxDistance: 0.5 206 | m_AutoUVMaxAngle: 89 207 | m_LightmapParameters: {fileID: 0} 208 | m_SortingLayerID: 0 209 | m_SortingLayer: 0 210 | m_SortingOrder: 0 211 | --- !u!23 &23712581823451684 212 | MeshRenderer: 213 | m_ObjectHideFlags: 1 214 | m_CorrespondingSourceObject: {fileID: 0} 215 | m_PrefabInternal: {fileID: 100100000} 216 | m_GameObject: {fileID: 1228787484623168} 217 | m_Enabled: 1 218 | m_CastShadows: 1 219 | m_ReceiveShadows: 1 220 | m_DynamicOccludee: 1 221 | m_MotionVectors: 1 222 | m_LightProbeUsage: 1 223 | m_ReflectionProbeUsage: 1 224 | m_RenderingLayerMask: 4294967295 225 | m_Materials: 226 | - {fileID: 2100000, guid: 94bf847a9b88c60428243d160955ba6f, type: 2} 227 | - {fileID: 2100000, guid: 22ae8ca533ae0ff45a92966006a65514, type: 2} 228 | m_StaticBatchInfo: 229 | firstSubMesh: 0 230 | subMeshCount: 0 231 | m_StaticBatchRoot: {fileID: 0} 232 | m_ProbeAnchor: {fileID: 0} 233 | m_LightProbeVolumeOverride: {fileID: 0} 234 | m_ScaleInLightmap: 1 235 | m_PreserveUVs: 0 236 | m_IgnoreNormalsForChartDetection: 0 237 | m_ImportantGI: 0 238 | m_StitchLightmapSeams: 0 239 | m_SelectedEditorRenderState: 3 240 | m_MinimumChartSize: 4 241 | m_AutoUVMaxDistance: 0.5 242 | m_AutoUVMaxAngle: 89 243 | m_LightmapParameters: {fileID: 0} 244 | m_SortingLayerID: 0 245 | m_SortingLayer: 0 246 | m_SortingOrder: 0 247 | --- !u!33 &33244646109365364 248 | MeshFilter: 249 | m_ObjectHideFlags: 1 250 | m_CorrespondingSourceObject: {fileID: 0} 251 | m_PrefabInternal: {fileID: 100100000} 252 | m_GameObject: {fileID: 1527765430585842} 253 | m_Mesh: {fileID: 4300032, guid: 2072bd79c1ae41441b0d087f04e9ec49, type: 3} 254 | --- !u!33 &33533546772742986 255 | MeshFilter: 256 | m_ObjectHideFlags: 1 257 | m_CorrespondingSourceObject: {fileID: 0} 258 | m_PrefabInternal: {fileID: 100100000} 259 | m_GameObject: {fileID: 1228787484623168} 260 | m_Mesh: {fileID: 4300002, guid: 2072bd79c1ae41441b0d087f04e9ec49, type: 3} 261 | --- !u!33 &33649867626934952 262 | MeshFilter: 263 | m_ObjectHideFlags: 1 264 | m_CorrespondingSourceObject: {fileID: 0} 265 | m_PrefabInternal: {fileID: 100100000} 266 | m_GameObject: {fileID: 1956810342624834} 267 | m_Mesh: {fileID: 4300034, guid: 2072bd79c1ae41441b0d087f04e9ec49, type: 3} 268 | --- !u!136 &136835660467181680 269 | CapsuleCollider: 270 | m_ObjectHideFlags: 1 271 | m_CorrespondingSourceObject: {fileID: 0} 272 | m_PrefabInternal: {fileID: 100100000} 273 | m_GameObject: {fileID: 1956810342624834} 274 | m_Material: {fileID: 0} 275 | m_IsTrigger: 0 276 | m_Enabled: 1 277 | m_Radius: 0.36 278 | m_Height: 4.54 279 | m_Direction: 1 280 | m_Center: {x: -0.04, y: 1.95, z: -0.02} 281 | --- !u!205 &205557346800865596 282 | LODGroup: 283 | m_ObjectHideFlags: 1 284 | m_CorrespondingSourceObject: {fileID: 0} 285 | m_PrefabInternal: {fileID: 100100000} 286 | m_GameObject: {fileID: 1600545553093010} 287 | serializedVersion: 2 288 | m_LocalReferencePoint: {x: 0.3765583, y: 6.1107016, z: 0.5905149} 289 | m_Size: 12.269554 290 | m_FadeMode: 0 291 | m_AnimateCrossFading: 0 292 | m_LODs: 293 | - screenRelativeHeight: 0.55831754 294 | fadeTransitionWidth: 0 295 | renderers: 296 | - renderer: {fileID: 23413134272489158} 297 | - screenRelativeHeight: 0.25041845 298 | fadeTransitionWidth: 0 299 | renderers: 300 | - renderer: {fileID: 23657480971582912} 301 | - screenRelativeHeight: 0.06256683 302 | fadeTransitionWidth: 0 303 | renderers: 304 | - renderer: {fileID: 23712581823451684} 305 | m_Enabled: 1 306 | -------------------------------------------------------------------------------- /Prefabs/Tree_1_2.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d855296cdd38f1d43a9018c918395080 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | ![](https://img.shields.io/badge/unity-2018.1%2B-blue.svg) 3 | [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-blue.svg)](http://makeapullrequest.com) 4 | [![](https://img.shields.io/twitter/follow/alexanderameye.svg?label=Follow&style=social)](https://twitter.com/intent/follow?screen_name=alexanderameye) 5 | 6 | # Free Prefab Painter 7 | A free, basic prefab-painter for Unity3D. 8 | 9 | ![UI](https://i.imgur.com/T3jS9Cp.png) 10 | 11 | # Installation 12 | After you've downloaded the files, you have 3 options to 'install' this tool. 13 | 14 | * Download this repository and put the downloaded files in your Assets/ folder. 15 | * Download this repository somewhere in your files. Then in Unity locate the package.json file through the package manager UI. 16 | 17 | ![UPM](https://i.imgur.com/HiaOKBa.png) 18 | 19 | * Reference this git repository in your project manifest file under dependencies. This will add the package to you project. 20 | 21 | ```json 22 | "me.ameye.prefab-painter": "https://github.com/alexanderameye/prefab-painter.git" 23 | ``` 24 | 25 | # Features 26 | - Paint on every type of surface (plane, terrain, sphere,...) 27 | - Paint multiple types of prefabs at once 28 | - Paint with random prefab rotations 29 | - Paint with random prefab sizes 30 | - Prefab previewer 31 | - Customizable brush size, density 32 | - Paint on selected layers 33 | - Palettes/presets functionality with useful toolbar 34 | - Dynamic prefab list 35 | 36 | ## Painting 37 | 38 | > ctrl + left mouse button to paint 39 | 40 | > ctrl + scroll to change the brush size 41 | 42 | > alt + scroll to change the brush density 43 | 44 | Make sure that the layer settings in the prefab painter are set up correctly! 45 | 46 | Important! The prefabs need colliders in order for the tool to work. 47 | 48 | ## Palettes 49 | Palettes are 'painting presets'. You can for example create a 'Trees' that contains 3 different types of trees. 50 | You can manage your palettes using the palette toolbar. You can use the 'Load' button to load a custom palette from your project folder, or you can create a new palette by clicking 'palettes > New Palette'. After you've edited a palette, don't forget to save it. 51 | You can relocate or rename palettes however you want. 52 | 53 | ![Palettes](https://i.imgur.com/skjtNka.png) 54 | 55 | # Compatibility 56 | This tool has been tested with Unity 2018.3.0f2. 57 | 58 | # Unity forum thread 59 | https://forum.unity.com/threads/released-free-prefab-painter-github.506118/ 60 | 61 | # Roadmap 62 | These are the planned features in no particular order. Not all features marked 'done' are on GitHub already. 63 | 64 | > :heavy_check_mark: Improved palette system with new toolbar 65 | 66 | > :heavy_check_mark: Undo/redo support 67 | 68 | > :heavy_check_mark: Package manager support 69 | 70 | > :heavy_check_mark: Better prefab list UI with drag-and-drop functionality 71 | 72 | > :heavy_check_mark: Palette save location menu and renaming functionality 73 | 74 | > :x: Prefab list multi-select and delete functionality 75 | 76 | > :x: Painting code cleanup 77 | 78 | > :x: Slope and altitude painting rules 79 | 80 | > :x: New painting handle look 81 | 82 | > :x: Probability settings per prefab 83 | 84 | > :x: Erase brush 85 | 86 | > :x: Grid brush 87 | 88 | > :x: Runtime prefab placing 89 | 90 | > :x: Paint aligned to painting stroke 91 | 92 | 93 | # Known Issues 94 | These are some known issues and inconveniences I'd like to fix. 95 | 96 | > :beetle: Sometimes when you edit the settings of a prefab, the settings don't get registered without pressing enter 97 | 98 | > :beetle: Some prefabs don't get placed 99 | 100 | > :beetle: Undo error when undo object is null 101 | 102 | -------------------------------------------------------------------------------- /README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 57a874e2b3ee88846a338c3c756d7720 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 78ce90a6de7bee245b026e9a3a8f4271 3 | folderAsset: yes 4 | timeCreated: 1511563501 5 | licenseType: Free 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Scripts/PaintObject.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | 4 | namespace PrefabPainter 5 | { 6 | [System.Serializable] 7 | public class PaintObject 8 | { 9 | private GameObject go; 10 | private Vector2 size = Vector2.one; 11 | private bool randomRotationX = false; 12 | private bool randomRotationY = false; 13 | private bool randomRotationZ = false; 14 | private string prefabName; 15 | 16 | private bool settingsToggled; 17 | 18 | [HideInInspector] public Editor gameObjectEditor; 19 | 20 | public PaintObject(GameObject go) 21 | { 22 | this.go = go; 23 | } 24 | 25 | public void displaySettings() 26 | { 27 | EditorGUILayout.BeginVertical(PrefabPainter.BoxStyle); 28 | GUILayout.Space(3); 29 | 30 | if (prefabName == "") GUILayout.Label("Prefab Settings", EditorStyles.boldLabel); 31 | else GUILayout.Label("Prefab Settings - " + prefabName, EditorStyles.boldLabel); 32 | 33 | size.x = EditorGUILayout.FloatField("Min Size", size.x); 34 | size.y = EditorGUILayout.FloatField("Max Size", size.y); 35 | GUILayout.Label("Random Rotation :"); 36 | EditorGUILayout.BeginHorizontal(); 37 | randomRotationX = GUILayout.Toggle(randomRotationX, "X"); 38 | randomRotationY = GUILayout.Toggle(randomRotationY, "Y"); 39 | randomRotationZ = GUILayout.Toggle(randomRotationZ, "Z"); 40 | EditorGUILayout.EndHorizontal(); 41 | 42 | GUILayout.Space(3); 43 | EditorGUILayout.EndVertical(); 44 | GUILayout.Space(0); 45 | } 46 | 47 | public bool getRandomRotationX() 48 | { 49 | return randomRotationX; 50 | } 51 | 52 | public bool getRandomRotationY() 53 | { 54 | return randomRotationY; 55 | } 56 | 57 | public bool getRandomRotationZ() 58 | { 59 | return randomRotationZ; 60 | } 61 | 62 | public Vector2 getSize() 63 | { 64 | return size; 65 | } 66 | 67 | public GameObject GetGameObject() 68 | { 69 | return go; 70 | } 71 | 72 | public void setName(string name) 73 | { 74 | prefabName = name; 75 | } 76 | 77 | public string getName() 78 | { 79 | return prefabName; 80 | } 81 | } 82 | } -------------------------------------------------------------------------------- /Scripts/PaintObject.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ea518f03cd0f4f94c8f74eb95bd88cdf 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/PaintPalette.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace PrefabPainter 6 | { 7 | [CreateAssetMenu(fileName = "prefabpainter_palette", menuName = "Prefab Painter/Create Palette", order = 1)] 8 | public class PaintPalette : ScriptableObject 9 | { 10 | public List palette = new List(); 11 | } 12 | } -------------------------------------------------------------------------------- /Scripts/PaintPalette.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 44ff22f473f9dda4c9ea762b0d49f037 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {fileID: 2800000, guid: f110ec9a79f47224381dbaee6f29a13e, type: 3} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/PrefabPainter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | using UnityEditor; 4 | 5 | namespace PrefabPainter 6 | { 7 | public class PrefabPainter : EditorWindow 8 | { 9 | Vector2 scrollPos; 10 | Rect windowBounds = new Rect(0, 0, 0, 0); 11 | 12 | // Layout Processing 13 | Event currentEvent; 14 | 15 | // Palettes 16 | private Texture2D deleteIcon; 17 | private Texture2D saveIcon; 18 | [SerializeField] 19 | PaintPalette activePalette; 20 | List palettes = new List(); 21 | bool creatingNewPalette = false; 22 | public float SizeInterval = 0.10f; 23 | public bool displayOverrideWarning = true; 24 | 25 | // Prefab List 26 | PaintObject selectedPrefab; 27 | float prefabListHeight; 28 | private Texture2D blueTexture; 29 | private Texture2D greyTexture; 30 | private bool displayPrefabSettings; 31 | 32 | // Brush Gizmo 33 | Color activeOuterColor = new Color(0.15f, 0.75f, 1f); 34 | Color passiveOuterColor = new Color(0.15f, 0.75f, 1f); 35 | Color innerColor = new Color(0.15f, 0.75f, 1f, 0.1f); 36 | float gizmoNormalLength = 1; 37 | 38 | // Mouse Information 39 | Vector3 currentMousePosition = Vector3.zero; 40 | Vector3 previousMousePosition = Vector3.zero; 41 | RaycastHit mouseHitPoint; 42 | string MouseLocationName = "Mouse Location"; 43 | Transform MouseLocation; 44 | 45 | // Brush Settings 46 | public bool displayDebugInfo = true; 47 | public float brushSize = 4f; 48 | public int brushDensity = 2; 49 | public LayerMask paintMask = 1; 50 | public float maxYPosition = 400; 51 | 52 | // Paint Objects 53 | GameObject paintGroup; 54 | string paintGroupName = "Paint"; 55 | public int listSize = 0; 56 | public List paintObjects; 57 | bool isPainting; 58 | List layerNames; 59 | 60 | [MenuItem("Tools/Prefab Painter")] 61 | static void Init() 62 | { 63 | PrefabPainter window = (PrefabPainter)GetWindow(typeof(PrefabPainter)); 64 | window.titleContent = new GUIContent("Prefab Painter"); 65 | window.Show(); 66 | window.Focus(); 67 | window.Repaint(); 68 | } 69 | 70 | void OnEnable() 71 | { 72 | listSize = 0; 73 | SceneView.duringSceneGui += SceneGUI; 74 | EditorApplication.hierarchyChanged += HierarchyChanged; 75 | if (paintObjects == null) paintObjects = new List(); 76 | layerNames = new List(); 77 | for (int i = 0; i <= 10; i++) layerNames.Add(LayerMask.LayerToName(i)); 78 | 79 | deleteIcon = EditorGUIUtility.Load("icons/d_TreeEditor.Trash.png") as Texture2D; 80 | saveIcon = EditorGUIUtility.Load("icons/SaveActive.png") as Texture2D; 81 | 82 | blueTexture = new Texture2D(64, 64); 83 | greyTexture = new Texture2D(64, 64); 84 | 85 | for (int y = 0; y < blueTexture.height; y++) 86 | { 87 | for (int x = 0; x < blueTexture.width; x++) 88 | { 89 | //rgb(0,191,255) 90 | // blueTexture.SetPixel(x, y, new Color(0.25f, 0.42f, 0.66f)); 91 | blueTexture.SetPixel(x, y, new Color(0f, 0.8f, 1f)); 92 | greyTexture.SetPixel(x, y, new Color(0.75f, 0.75f, 0.75f)); 93 | } 94 | } 95 | 96 | blueTexture.Apply(); 97 | greyTexture.Apply(); 98 | } 99 | 100 | void OnDisable() 101 | { 102 | SceneView.duringSceneGui -= SceneGUI; 103 | EditorApplication.hierarchyChanged -= HierarchyChanged; 104 | if (MouseLocation) DestroyImmediate(MouseLocation.gameObject); 105 | if (GameObject.Find(MouseLocationName) != null) 106 | DestroyImmediate(GameObject.Find(MouseLocationName)); 107 | } 108 | 109 | void SceneGUI(SceneView sceneView) 110 | { 111 | windowBounds.width = Screen.width; 112 | windowBounds.height = Screen.height; 113 | 114 | currentEvent = Event.current; 115 | UpdateMousePos(sceneView); 116 | DrawBrushGizmo(); 117 | SceneInput(); 118 | if (Event.current.type == EventType.MouseMove || Event.current.type == EventType.MouseDrag) 119 | SceneView.RepaintAll(); 120 | } 121 | 122 | public static bool BrushSettingsFold 123 | { 124 | get { return EditorPrefs.GetBool("BrushSettingsFold", false); } 125 | set { EditorPrefs.SetBool("BrushSettingsFold", value); } 126 | } 127 | 128 | static GUIStyle _foldoutStyle; 129 | 130 | static GUIStyle FoldoutStyle 131 | { 132 | get 133 | { 134 | if (_foldoutStyle == null) 135 | { 136 | _foldoutStyle = new GUIStyle(EditorStyles.foldout) 137 | { 138 | font = EditorStyles.boldFont 139 | }; 140 | } 141 | 142 | return _foldoutStyle; 143 | } 144 | } 145 | 146 | static GUIStyle _boxStyle; 147 | 148 | public static GUIStyle BoxStyle 149 | { 150 | get 151 | { 152 | if (_boxStyle == null) 153 | { 154 | _boxStyle = new GUIStyle(EditorStyles.helpBox); 155 | } 156 | 157 | return _boxStyle; 158 | } 159 | } 160 | 161 | void OnGUI() 162 | { 163 | EditorGUILayout.BeginHorizontal("Toolbar", GUILayout.ExpandWidth(true)); 164 | if (GUILayout.Button("Load", "ToolbarButton")) 165 | { 166 | string path = EditorUtility.OpenFilePanel("Select Palette", "", "asset"); 167 | path = path.Replace(Application.dataPath, "Assets"); 168 | if (path.Length != 0) 169 | { 170 | activePalette = (PaintPalette)AssetDatabase.LoadAssetAtPath(path, typeof(PaintPalette)); 171 | LoadPalette(activePalette); 172 | if (!palettes.Contains(activePalette)) palettes.Add(activePalette); 173 | Debug.Log("[Prefab Painter] Palette loaded."); 174 | } 175 | } 176 | if (activePalette != null) 177 | { 178 | GUILayout.Label(new GUIContent("Active: " + activePalette.name), "ToolbarButton"); 179 | } 180 | else GUILayout.Label(new GUIContent("Active: none"), "ToolbarButton"); 181 | GUILayout.Space(5f); 182 | GUILayout.FlexibleSpace(); 183 | if (GUILayout.Button(new GUIContent("", saveIcon, "Save active prefabs as palette."), "ToolbarButton")) 184 | { 185 | if (activePalette != null && palettes.Contains(activePalette)) 186 | { 187 | if (displayOverrideWarning) 188 | { 189 | switch (EditorUtility.DisplayDialogComplex("Override palette", "Saving the current palette will override the currently active palette which is '" + activePalette.name + "'.", "Okay", "Cancel", "Okay and do not show again")) 190 | { 191 | case 0: 192 | OverridePalette(activePalette); 193 | break; 194 | case 1: 195 | break; 196 | case 2: 197 | OverridePalette(activePalette); 198 | displayOverrideWarning = false; 199 | break; 200 | default: 201 | break; 202 | } 203 | } 204 | else 205 | { 206 | OverridePalette(activePalette); 207 | } 208 | 209 | } 210 | else CreateNewPalette(); 211 | } 212 | if (GUILayout.Button(new GUIContent("", deleteIcon, "Remove currently loaded palette."), "ToolbarButton")) Debug.Log("Remove Palette"); 213 | if (GUILayout.Button(new GUIContent("Palettes", "Load in a palette."), "ToolbarPopup")) 214 | { 215 | GenericMenu menu = new GenericMenu(); 216 | if (palettes.Count > 0) 217 | { 218 | for (int i = 0; i < palettes.Count; i++) 219 | { 220 | if (palettes[i] != null) AddMenuItemForPalette(menu, palettes[i].name, palettes[i]); 221 | } 222 | } 223 | menu.AddItem(new GUIContent("New Palette"), creatingNewPalette, OnNewPaletteSelected); 224 | menu.AddItem(new GUIContent("Clear List"), false, OnClearList); 225 | menu.ShowAsContext(); 226 | } 227 | 228 | EditorGUILayout.EndHorizontal(); 229 | 230 | EditorGUILayout.Space(); 231 | scrollPos = EditorGUILayout.BeginScrollView(scrollPos, false, false); 232 | 233 | float tempSize = brushSize; 234 | int tempDensity = brushDensity; 235 | 236 | BrushSettingsFold = BeginFold("Brush Settings", BrushSettingsFold); 237 | if (BrushSettingsFold) 238 | { 239 | paintMask = EditorGUILayout.MaskField( 240 | new GUIContent("Paint Layer", "On which layer the tool will paint."), paintMask, 241 | layerNames.ToArray()); 242 | brushSize = EditorGUILayout.FloatField("Brush Size", brushSize); 243 | brushDensity = EditorGUILayout.IntField("Brush Density", brushDensity); 244 | paintGroupName = EditorGUILayout.TextField("Paint Group Name", paintGroupName); 245 | } 246 | EndFold(); 247 | 248 | listSize = Mathf.Max(0, listSize); 249 | 250 | DisplayPrefabs(paintObjects); 251 | if (Event.current.type == EventType.Layout && selectedPrefab != null) displayPrefabSettings = true; 252 | 253 | if (displayPrefabSettings) selectedPrefab.displaySettings(); 254 | 255 | EditorGUILayout.Space(); 256 | GUILayout.Space(75f + prefabListHeight); 257 | CheckForChanges(tempSize, tempDensity); 258 | EditorGUILayout.EndScrollView(); 259 | } 260 | 261 | void OverridePalette(PaintPalette palette) 262 | { 263 | palette.palette = paintObjects; 264 | } 265 | 266 | void LoadPalette(PaintPalette palette) 267 | { 268 | listSize = palette.palette.Count; 269 | paintObjects = palette.palette; 270 | bool missingPrefabs = false; 271 | for (int i = 0; i < listSize; i++) 272 | { 273 | if (paintObjects[i].GetGameObject() == null) missingPrefabs = true; 274 | } 275 | 276 | if (missingPrefabs) Debug.Log("[Prefab Painter] One or more prefabs could not be loaded."); 277 | } 278 | 279 | void LoadEmptyPalette() 280 | { 281 | listSize = 0; 282 | paintObjects = new List(); 283 | } 284 | 285 | void CreateNewPalette() 286 | { 287 | string relativePath = ""; 288 | string absolutePath = EditorUtility.SaveFilePanel("Save Palette", "Assets/", "New Palette", "asset"); 289 | 290 | if (absolutePath.StartsWith(Application.dataPath)) 291 | { 292 | relativePath = "Assets" + absolutePath.Substring(Application.dataPath.Length); 293 | } 294 | 295 | if (relativePath.Length != 0) 296 | { 297 | PaintPalette asset = ScriptableObject.CreateInstance(); 298 | asset.palette = paintObjects; 299 | AssetDatabase.CreateAsset(asset, relativePath); 300 | AssetDatabase.SaveAssets(); 301 | palettes.Add(asset); 302 | EditorUtility.FocusProjectWindow(); 303 | Selection.activeObject = asset; 304 | activePalette = asset; 305 | creatingNewPalette = false; 306 | 307 | Debug.Log("[Prefab Painter] Palette saved."); 308 | } 309 | 310 | else Debug.Log("[Prefab Painter] Selected path is invalid."); 311 | } 312 | 313 | 314 | void AddMenuItemForPalette(GenericMenu menu, string menuPath, PaintPalette palette) 315 | { 316 | bool paletteSelected; 317 | if (activePalette == null) paletteSelected = false; 318 | else 319 | { 320 | if (activePalette.Equals(palette)) paletteSelected = true; 321 | else paletteSelected = false; 322 | } 323 | 324 | if (creatingNewPalette) paletteSelected = false; 325 | menu.AddItem(new GUIContent(menuPath), paletteSelected, OnPaletteSelected, palette); 326 | } 327 | 328 | void OnPaletteSelected(object palette) 329 | { 330 | LoadPalette((PaintPalette)palette); 331 | activePalette = (PaintPalette)palette; 332 | creatingNewPalette = false; 333 | } 334 | 335 | void OnClearList() 336 | { 337 | palettes.Clear(); 338 | } 339 | 340 | void OnNewPaletteSelected() 341 | { 342 | creatingNewPalette = true; 343 | activePalette = null; 344 | LoadEmptyPalette(); 345 | } 346 | 347 | void CheckForChanges(float tempSize, int tempDensity) 348 | { 349 | if (tempSize != brushSize) 350 | { 351 | brushSize = Mathf.Max(brushSize, 1); 352 | SceneView.RepaintAll(); 353 | } 354 | 355 | else if (brushDensity != tempDensity) 356 | { 357 | brushDensity = Mathf.Max(brushDensity, 1); 358 | SceneView.RepaintAll(); 359 | } 360 | 361 | else if (paintObjects != null && listSize != paintObjects.Count) 362 | { 363 | List tempObj = new List(listSize); 364 | for (int i = 0; i < listSize; i++) 365 | { 366 | if (paintObjects.Count > i) tempObj.Add(paintObjects[i]); 367 | else tempObj.Add(new PaintObject(null)); 368 | } 369 | 370 | paintObjects = new List(tempObj); 371 | } 372 | } 373 | 374 | void DrawBrushGizmo() 375 | { 376 | if (isPainting) Handles.color = activeOuterColor; 377 | else Handles.color = passiveOuterColor; 378 | 379 | if (mouseHitPoint.transform) 380 | { 381 | if (GameObject.Find(MouseLocationName) == null) 382 | MouseLocation = new GameObject(MouseLocationName).transform; 383 | else MouseLocation = GameObject.Find(MouseLocationName).transform; 384 | MouseLocation.rotation = mouseHitPoint.transform.rotation; 385 | MouseLocation.forward = mouseHitPoint.normal; 386 | Handles.ArrowHandleCap(3, mouseHitPoint.point, MouseLocation.rotation, 387 | gizmoNormalLength * brushSize, EventType.Repaint); 388 | Handles.CircleHandleCap(2, currentMousePosition, MouseLocation.rotation, brushSize, 389 | EventType.Repaint); 390 | Handles.color = innerColor; 391 | Handles.DrawSolidDisc(currentMousePosition, mouseHitPoint.normal, brushSize); 392 | MouseLocation.up = mouseHitPoint.normal; 393 | } 394 | 395 | Handles.BeginGUI(); 396 | GUIStyle style = new GUIStyle(); 397 | style.normal.textColor = Color.black; 398 | GUILayout.BeginArea( 399 | new Rect(currentEvent.mousePosition.x + 10, currentEvent.mousePosition.y + 10, 250, 100)); 400 | if (displayDebugInfo) 401 | { 402 | GUILayout.TextField("Size: " + System.Math.Round(brushSize, 2), style); 403 | GUILayout.TextField("Density: " + System.Math.Round((double)brushDensity, 2), style); 404 | GUILayout.TextField("Height: " + System.Math.Round(currentMousePosition.y, 2), style); 405 | GUILayout.TextField("Surface Name: " + (mouseHitPoint.collider ? mouseHitPoint.collider.name : "none"), 406 | style); 407 | GUILayout.TextField("Position: " + currentMousePosition.ToString(), style); 408 | } 409 | 410 | GUILayout.EndArea(); 411 | Handles.EndGUI(); 412 | } 413 | 414 | void UpdateMousePos(SceneView sceneView) 415 | { 416 | if (currentEvent.control) HandleUtility.AddDefaultControl(GUIUtility.GetControlID(FocusType.Passive)); 417 | RaycastHit hit; 418 | 419 | Vector3 mousePos = currentEvent.mousePosition; 420 | float ppp = EditorGUIUtility.pixelsPerPoint; 421 | mousePos.y = sceneView.camera.pixelHeight - mousePos.y * ppp; 422 | mousePos.x *= ppp; 423 | 424 | Ray ray = sceneView.camera.ScreenPointToRay(mousePos); 425 | 426 | if (Physics.Raycast(ray, out hit, 1000, paintMask)) 427 | { 428 | currentMousePosition = hit.point; 429 | mouseHitPoint = hit; 430 | } 431 | else mouseHitPoint = new RaycastHit(); 432 | } 433 | 434 | public bool PreventCustomUserHotkey(EventType type, EventModifiers codeModifier, KeyCode hotkey) 435 | { 436 | Event currentevent = Event.current; 437 | if (currentevent.type == type && currentevent.modifiers == codeModifier && currentevent.keyCode == hotkey) 438 | { 439 | currentevent.Use(); 440 | return true; 441 | } 442 | 443 | return false; 444 | } 445 | 446 | void SceneInput() 447 | { 448 | if (PreventCustomUserHotkey(EventType.ScrollWheel, EventModifiers.Control, KeyCode.None)) 449 | { 450 | if (currentEvent.delta.y > 0) brushSize = brushSize + SizeInterval; 451 | else 452 | { 453 | brushSize = brushSize - SizeInterval; 454 | brushSize = Mathf.Max(SizeInterval, brushSize); 455 | } 456 | 457 | Repaint(); 458 | } 459 | 460 | else if (PreventCustomUserHotkey(EventType.ScrollWheel, EventModifiers.Alt, KeyCode.None)) 461 | { 462 | if (currentEvent.delta.y > 0) brushDensity++; 463 | else 464 | { 465 | brushDensity--; 466 | brushDensity = Mathf.Max(1, brushDensity); 467 | } 468 | 469 | Repaint(); 470 | } 471 | 472 | else if (currentEvent.control && (currentEvent.button == 0 && currentEvent.type == EventType.MouseDown)) 473 | { 474 | isPainting = true; 475 | Painting(); 476 | } 477 | 478 | else if (isPainting && !currentEvent.control || 479 | (currentEvent.button != 0 || currentEvent.type == EventType.MouseUp)) 480 | { 481 | previousMousePosition = Vector3.zero; 482 | isPainting = false; 483 | } 484 | 485 | else if (isPainting && (currentEvent.type == EventType.MouseDrag)) Painting(); 486 | } 487 | 488 | void Painting() 489 | { 490 | if (paintObjects != null && paintObjects.Count > 0) 491 | { 492 | if (Vector3.Distance(previousMousePosition, currentMousePosition) > brushSize) 493 | { 494 | previousMousePosition = currentMousePosition; 495 | DrawPaint(); 496 | } 497 | } 498 | else Debug.LogWarning("[Prefab Painter] Prefab list is empty!"); 499 | } 500 | 501 | void DrawPaint() 502 | { 503 | if (paintGroup == null) 504 | { 505 | if (GameObject.Find(paintGroupName)) paintGroup = GameObject.Find(paintGroupName); 506 | else paintGroup = new GameObject(paintGroupName); 507 | } 508 | 509 | int localDensity = brushDensity; 510 | Vector3 dir = Quaternion.AngleAxis(Random.Range(0, 360), Vector3.up) * Vector3.right; 511 | Vector3[] spawnPoint = new Vector3[localDensity]; 512 | 513 | for (int i = 0; i < localDensity; i++) 514 | { 515 | dir = Quaternion.AngleAxis(UnityEngine.Random.Range(0, 360), Vector3.up) * Vector3.right; 516 | Vector3 spawnPos = (dir * brushSize * Random.Range(0.1f, 1.1f)) + currentMousePosition; 517 | 518 | if (spawnPos != Vector3.zero) 519 | { 520 | spawnPoint[i] = spawnPos; 521 | SpawnObject(spawnPoint[i]); 522 | } 523 | } 524 | } 525 | 526 | GameObject SpawnObject(Vector3 pos) 527 | { 528 | int rndIndex = Random.Range(0, paintObjects.Count); 529 | GameObject prefabObj = paintObjects[rndIndex].GetGameObject(); 530 | GameObject go = null; 531 | if (prefabObj != null) 532 | { 533 | go = (GameObject)PrefabUtility.InstantiatePrefab(prefabObj); 534 | Undo.RegisterCreatedObjectUndo(go, "Prefab Paint"); 535 | 536 | if (MouseLocation) 537 | { 538 | go.transform.rotation = MouseLocation.rotation; 539 | go.transform.up = MouseLocation.up; 540 | } 541 | 542 | else go.transform.rotation = Quaternion.identity; 543 | 544 | bool randomRotationX = paintObjects[rndIndex].getRandomRotationX(); 545 | bool randomRotationY = paintObjects[rndIndex].getRandomRotationY(); 546 | bool randomRotationZ = paintObjects[rndIndex].getRandomRotationZ(); 547 | 548 | if (randomRotationX) go.transform.Rotate(Vector3.right, Random.Range(0, 360)); 549 | if (randomRotationY) go.transform.Rotate(Vector3.up, Random.Range(0, 360)); 550 | if (randomRotationZ) go.transform.Rotate(Vector3.forward, Random.Range(0, 360)); 551 | 552 | Vector2 scale = paintObjects[rndIndex].getSize(); 553 | if (scale != Vector2.one && scale != Vector2.zero) 554 | { 555 | float randomScale = Random.Range(scale.x, scale.y); 556 | go.transform.localScale *= randomScale; 557 | } 558 | 559 | 560 | go.transform.position = pos; 561 | DoubleRayCast(go, rndIndex); 562 | if (go) AddObjectToGroup(go, rndIndex); 563 | } 564 | 565 | return go; 566 | } 567 | 568 | void AddObjectToGroup(GameObject obj, int index) 569 | { 570 | Transform parent = GameObject.Find(paintGroupName).transform; 571 | if (parent == null) parent = new GameObject(paintGroupName).transform; 572 | obj.transform.SetParent(parent); 573 | } 574 | 575 | public bool LayerContain(LayerMask mask, int layer) 576 | { 577 | return mask == (mask | (1 << layer)); 578 | } 579 | 580 | void DoubleRayCast(GameObject obj, int index) 581 | { 582 | Vector3 position = obj.transform.position + obj.transform.up * maxYPosition; 583 | obj.transform.position = position; 584 | obj.SetActive(false); 585 | RaycastHit groundHit; 586 | 587 | if (Physics.Raycast(position, -obj.transform.up, out groundHit, Mathf.Infinity, paintMask)) 588 | { 589 | RaycastHit objectHit; 590 | if (LayerContain(paintMask, groundHit.collider.gameObject.layer)) 591 | { 592 | obj.SetActive(true); 593 | 594 | int objMask = 1 << obj.layer; 595 | if (Physics.Raycast(groundHit.point, obj.transform.up, out objectHit, Mathf.Infinity, objMask) && 596 | obj.layer == objectHit.collider.gameObject.layer) 597 | { 598 | Vector3 newPos; 599 | float differencialDistance = Vector3.Distance(objectHit.point, obj.transform.position); 600 | newPos = groundHit.point + (obj.transform.up * differencialDistance); 601 | obj.transform.position = newPos; 602 | return; 603 | } 604 | } 605 | } 606 | DestroyImmediate(obj); 607 | } 608 | 609 | void Update() 610 | { 611 | SceneView.RepaintAll(); 612 | } 613 | 614 | private void HierarchyChanged() 615 | { 616 | Repaint(); 617 | } 618 | 619 | public static bool BeginFold(string foldName, bool foldState) 620 | { 621 | EditorGUILayout.BeginVertical(BoxStyle); 622 | GUILayout.Space(3); 623 | foldState = EditorGUI.Foldout(EditorGUILayout.GetControlRect(), 624 | foldState, foldName, true, FoldoutStyle); 625 | if (foldState) GUILayout.Space(3); 626 | return foldState; 627 | } 628 | 629 | public static void EndFold() 630 | { 631 | GUILayout.Space(3); 632 | EditorGUILayout.EndVertical(); 633 | GUILayout.Space(0); 634 | } 635 | 636 | public void DisplayPrefabs(List prefabs) 637 | { 638 | int numberOfPrefabs = prefabs.Count; 639 | int windowWidth = (int)EditorGUIUtility.currentViewWidth; 640 | 641 | int y; 642 | if (selectedPrefab != null) y = 215; 643 | else y = 110; 644 | 645 | for (int i = 0; i < numberOfPrefabs; i++) 646 | { 647 | var e = Event.current; 648 | GameObject go = prefabs[i].GetGameObject(); 649 | 650 | int columns = Mathf.FloorToInt(windowWidth / (50 + 20) + 1); 651 | int rows = Mathf.FloorToInt(numberOfPrefabs / columns); 652 | prefabListHeight = rows * 50f; 653 | int posX = 5 + 50 * (i - (Mathf.FloorToInt(i / columns)) * columns); 654 | int posY = y + 50 * Mathf.FloorToInt(i / columns) + 10; 655 | 656 | Rect r = new Rect(posX, posY, 50, 50); 657 | Rect border = new Rect(r.x + 2, r.y + 6, r.width - 4, r.height - 4); 658 | 659 | if (r.Contains(Event.current.mousePosition) && e.type == EventType.MouseDown && e.button == 0) 660 | { 661 | selectedPrefab = prefabs[i]; 662 | Repaint(); 663 | } 664 | 665 | if (greyTexture != null) 666 | { 667 | if (prefabs[i] == selectedPrefab && selectedPrefab != null) EditorGUI.DrawPreviewTexture(border, blueTexture, null, ScaleMode.ScaleToFit, 0f); 668 | else EditorGUI.DrawPreviewTexture(border, greyTexture, null, ScaleMode.ScaleToFit, 0f); 669 | } 670 | 671 | border.x += 2; 672 | border.y += 2; 673 | border.width -= 4; 674 | border.height -= 4; 675 | 676 | Texture2D preview = AssetPreview.GetAssetPreview(go); 677 | 678 | if (preview != null) 679 | { 680 | EditorGUI.DrawPreviewTexture(border, preview, null, ScaleMode.ScaleToFit, 0f); 681 | } 682 | } 683 | 684 | int c = Mathf.FloorToInt(windowWidth / (50 + 20) + 1); 685 | int xRect = 5 + 50 * (numberOfPrefabs - (Mathf.FloorToInt(numberOfPrefabs / c)) * c); 686 | int yRect = y + 50 * Mathf.FloorToInt(numberOfPrefabs / c) + 10; 687 | 688 | DropAreaGUI(new Rect(xRect + 2, yRect + 6, 46, 46)); 689 | } 690 | 691 | public void DropAreaGUI(Rect r) 692 | { 693 | var e = Event.current; 694 | var dropArea = r; 695 | GUI.Box(dropArea, string.Empty); 696 | GUI.Label(dropArea, "+", EditorStyles.centeredGreyMiniLabel); 697 | 698 | switch (e.type) 699 | { 700 | case EventType.DragUpdated: 701 | case EventType.DragPerform: 702 | if (!dropArea.Contains(e.mousePosition)) 703 | return; 704 | 705 | DragAndDrop.visualMode = DragAndDropVisualMode.Copy; 706 | 707 | if (e.type == EventType.DragPerform) 708 | { 709 | DragAndDrop.AcceptDrag(); 710 | 711 | foreach (Object dragged_object in DragAndDrop.objectReferences) 712 | { 713 | if (dragged_object is GameObject) 714 | { 715 | GameObject go = (GameObject)dragged_object; 716 | PaintObject po = new PaintObject(go); 717 | po.setName(dragged_object.name); 718 | paintObjects.Add(po); 719 | listSize++; 720 | } 721 | } 722 | } 723 | break; 724 | } 725 | } 726 | } 727 | } -------------------------------------------------------------------------------- /Scripts/PrefabPainter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c26dd0ab2f7409a47b76b8d1f4bdd162 3 | timeCreated: 1511562715 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Scripts/ameye.prefabpainter.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ameye.prefabpainter", 3 | "references": [], 4 | "optionalUnityReferences": [], 5 | "includePlatforms": [ 6 | "Editor" 7 | ], 8 | "excludePlatforms": [], 9 | "allowUnsafeCode": false, 10 | "overrideReferences": false, 11 | "precompiledReferences": [], 12 | "autoReferenced": true, 13 | "defineConstraints": [] 14 | } -------------------------------------------------------------------------------- /Scripts/ameye.prefabpainter.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d7fcb36ee8b32a646b7826558fee2996 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f320330b1bf0fa84eafbfa88ea66e083 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Textures/GrassColor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexanderameye/prefab-painter/f78b6b205ab54296ca4fd27c509a665367f84347/Textures/GrassColor.png -------------------------------------------------------------------------------- /Textures/GrassColor.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 59b577b39270af04abdc731059ae1a2b 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 7 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: 79 | vertices: [] 80 | indices: 81 | edges: [] 82 | weights: [] 83 | spritePackingTag: 84 | pSDRemoveMatte: 0 85 | pSDShowRemoveMatteOption: 0 86 | userData: 87 | assetBundleName: 88 | assetBundleVariant: 89 | -------------------------------------------------------------------------------- /Textures/LowPolyNormal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexanderameye/prefab-painter/f78b6b205ab54296ca4fd27c509a665367f84347/Textures/LowPolyNormal.png -------------------------------------------------------------------------------- /Textures/LowPolyNormal.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 82c1b4c112dc0e041bd7f131c1ab9a89 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 7 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 1 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: 79 | vertices: [] 80 | indices: 81 | edges: [] 82 | weights: [] 83 | spritePackingTag: 84 | pSDRemoveMatte: 0 85 | pSDShowRemoveMatteOption: 0 86 | userData: 87 | assetBundleName: 88 | assetBundleVariant: 89 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "me.ameye.prefab-painter", 3 | "displayName": "Prefab Painter", 4 | "version": "1.3.0", 5 | "unity": "2019.3", 6 | "description": "A free prefab painter.", 7 | "category": "Unity" 8 | } -------------------------------------------------------------------------------- /package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b35d47ee365145b458ffb3d9dc316902 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | --------------------------------------------------------------------------------