├── .gitignore ├── Assets ├── Images.meta ├── Images │ ├── whiteCircle.psd │ ├── whiteCircle.psd.meta │ ├── whiteSquare.psd │ └── whiteSquare.psd.meta ├── Palettes.meta ├── Palettes │ ├── Pico8.prefab │ └── Pico8.prefab.meta ├── Scenes.meta ├── Scenes │ ├── Main.unity │ └── Main.unity.meta ├── Scripts.meta ├── Scripts │ ├── LevelBuilder.cs │ ├── LevelBuilder.cs.meta │ ├── Pathfinding.meta │ ├── Pathfinding │ │ ├── AStar.cs │ │ ├── AStar.cs.meta │ │ ├── Graph.cs │ │ ├── Graph.cs.meta │ │ ├── Heuristic.cs │ │ ├── Heuristic.cs.meta │ │ ├── LinePath.cs │ │ ├── LinePath.cs.meta │ │ ├── PriorityQueue.cs │ │ ├── PriorityQueue.cs.meta │ │ ├── TilemapBreadthFirst.cs │ │ ├── TilemapBreadthFirst.cs.meta │ │ ├── TilemapExtensions.cs │ │ ├── TilemapExtensions.cs.meta │ │ ├── Utils.cs │ │ └── Utils.cs.meta │ ├── PerlinNoiseGrid.cs │ └── PerlinNoiseGrid.cs.meta ├── Tiles.meta └── Tiles │ ├── Pico8.meta │ └── Pico8 │ ├── 01-Black.asset │ ├── 01-Black.asset.meta │ ├── 02-DarkBlue.asset │ ├── 02-DarkBlue.asset.meta │ ├── 03-DarkPurple.asset │ ├── 03-DarkPurple.asset.meta │ ├── 04-DarkGreen.asset │ ├── 04-DarkGreen.asset.meta │ ├── 05-Brown.asset │ ├── 05-Brown.asset.meta │ ├── 06-DarkGray.asset │ ├── 06-DarkGray.asset.meta │ ├── 07-LightGray.asset │ ├── 07-LightGray.asset.meta │ ├── 08-White.asset │ ├── 08-White.asset.meta │ ├── 09-Red.asset │ ├── 09-Red.asset.meta │ ├── 10-Orange.asset │ ├── 10-Orange.asset.meta │ ├── 11-Yellow.asset │ ├── 11-Yellow.asset.meta │ ├── 12-Green.asset │ ├── 12-Green.asset.meta │ ├── 13-Blue.asset │ ├── 13-Blue.asset.meta │ ├── 14-Indigo.asset │ ├── 14-Indigo.asset.meta │ ├── 15-Pink.asset │ ├── 15-Pink.asset.meta │ ├── 16-Peach.asset │ └── 16-Peach.asset.meta ├── LICENSE.md ├── Packages └── manifest.json ├── Pathfinding.unitypackage ├── PreviewImages └── ScreenShot.png ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityConnectSettings.asset ├── VFXManager.asset └── XRSettings.asset └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | 3 | /[Ll]ibrary/ 4 | /[Tt]emp/ 5 | /[Oo]bj/ 6 | /[Bb]uild/ 7 | /[Bb]uilds/ 8 | /[Ll]ogs/ 9 | 10 | # Never ignore Asset meta data 11 | !/[Aa]ssets/**/*.meta 12 | 13 | # Uncomment this line if you wish to ignore the asset store tools plugin 14 | # /[Aa]ssets/AssetStoreTools* 15 | 16 | # TextMesh Pro files 17 | [Aa]ssets/TextMesh*Pro/ 18 | 19 | # Visual Studio cache directory 20 | .vs/ 21 | .vscode/ 22 | 23 | # Gradle cache directory 24 | .gradle/ 25 | 26 | # Autogenerated VS/MD/Consulo solution and project files 27 | ExportedObj/ 28 | .consulo/ 29 | *.csproj 30 | *.unityproj 31 | *.sln 32 | *.suo 33 | *.tmp 34 | *.user 35 | *.userprefs 36 | *.pidb 37 | *.booproj 38 | *.svd 39 | *.pdb 40 | *.mdb 41 | *.opendb 42 | *.VC.db 43 | 44 | # Unity3D generated meta files 45 | *.pidb.meta 46 | *.pdb.meta 47 | *.mdb.meta 48 | 49 | # Unity3D generated file on crash reports 50 | sysinfo.txt 51 | 52 | # Builds 53 | *.apk 54 | #*.unitypackage 55 | 56 | # Crashlytics generated file 57 | crashlytics-build.properties 58 | 59 | .DS_Store -------------------------------------------------------------------------------- /Assets/Images.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b803e650f3da74940ad8d7801180632a 3 | folderAsset: yes 4 | timeCreated: 1501899002 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Images/whiteCircle.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sturdyspoon/unity-pathfinding/2bc256575d4ab1d046decf9404a509f5efc01b59/Assets/Images/whiteCircle.psd -------------------------------------------------------------------------------- /Assets/Images/whiteCircle.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ae0a58d59247f41db83a5d38e1ea5c7d 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: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 256 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | - serializedVersion: 2 73 | buildTarget: Standalone 74 | maxTextureSize: 2048 75 | resizeAlgorithm: 0 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | androidETC2FallbackOverride: 0 83 | - serializedVersion: 2 84 | buildTarget: iPhone 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | androidETC2FallbackOverride: 0 94 | - serializedVersion: 2 95 | buildTarget: Android 96 | maxTextureSize: 2048 97 | resizeAlgorithm: 0 98 | textureFormat: -1 99 | textureCompression: 1 100 | compressionQuality: 50 101 | crunchedCompression: 0 102 | allowsAlphaSplitting: 0 103 | overridden: 0 104 | androidETC2FallbackOverride: 0 105 | - serializedVersion: 2 106 | buildTarget: WebGL 107 | maxTextureSize: 2048 108 | resizeAlgorithm: 0 109 | textureFormat: -1 110 | textureCompression: 1 111 | compressionQuality: 50 112 | crunchedCompression: 0 113 | allowsAlphaSplitting: 0 114 | overridden: 0 115 | androidETC2FallbackOverride: 0 116 | spriteSheet: 117 | serializedVersion: 2 118 | sprites: [] 119 | outline: [] 120 | physicsShape: [] 121 | bones: [] 122 | spriteID: 59ab0e91112bf4df8861f5ab46f3b62c 123 | vertices: [] 124 | indices: 125 | edges: [] 126 | weights: [] 127 | spritePackingTag: 128 | pSDRemoveMatte: 0 129 | pSDShowRemoveMatteOption: 1 130 | userData: 131 | assetBundleName: 132 | assetBundleVariant: 133 | -------------------------------------------------------------------------------- /Assets/Images/whiteSquare.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sturdyspoon/unity-pathfinding/2bc256575d4ab1d046decf9404a509f5efc01b59/Assets/Images/whiteSquare.psd -------------------------------------------------------------------------------- /Assets/Images/whiteSquare.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a8e6ca393c0c344148ed2a473d639d9c 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: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 256 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | - serializedVersion: 2 73 | buildTarget: Standalone 74 | maxTextureSize: 2048 75 | resizeAlgorithm: 0 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | androidETC2FallbackOverride: 0 83 | - serializedVersion: 2 84 | buildTarget: iPhone 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | androidETC2FallbackOverride: 0 94 | - serializedVersion: 2 95 | buildTarget: Android 96 | maxTextureSize: 2048 97 | resizeAlgorithm: 0 98 | textureFormat: -1 99 | textureCompression: 1 100 | compressionQuality: 50 101 | crunchedCompression: 0 102 | allowsAlphaSplitting: 0 103 | overridden: 0 104 | androidETC2FallbackOverride: 0 105 | - serializedVersion: 2 106 | buildTarget: WebGL 107 | maxTextureSize: 2048 108 | resizeAlgorithm: 0 109 | textureFormat: -1 110 | textureCompression: 1 111 | compressionQuality: 50 112 | crunchedCompression: 0 113 | allowsAlphaSplitting: 0 114 | overridden: 0 115 | androidETC2FallbackOverride: 0 116 | spriteSheet: 117 | serializedVersion: 2 118 | sprites: [] 119 | outline: [] 120 | physicsShape: [] 121 | bones: [] 122 | spriteID: 5f11d46fbe3534242a590cfc51b4219c 123 | vertices: [] 124 | indices: 125 | edges: [] 126 | weights: [] 127 | spritePackingTag: 128 | pSDRemoveMatte: 0 129 | pSDShowRemoveMatteOption: 1 130 | userData: 131 | assetBundleName: 132 | assetBundleVariant: 133 | -------------------------------------------------------------------------------- /Assets/Palettes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 20b7beac491204a3ab2bfa3fa8623e8c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Palettes/Pico8.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: 1993429158166774} 13 | m_IsPrefabAsset: 1 14 | --- !u!1 &1414105392686860 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: 4737389094356738} 22 | - component: {fileID: 8195094280823342280} 23 | - component: {fileID: 3664157344458105560} 24 | m_Layer: 31 25 | m_Name: Layer1 26 | m_TagString: Untagged 27 | m_Icon: {fileID: 0} 28 | m_NavMeshLayer: 0 29 | m_StaticEditorFlags: 0 30 | m_IsActive: 1 31 | --- !u!1 &1993429158166774 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: 4713463253410716} 39 | - component: {fileID: 2569400265879401496} 40 | m_Layer: 31 41 | m_Name: Pico8 42 | m_TagString: Untagged 43 | m_Icon: {fileID: 0} 44 | m_NavMeshLayer: 0 45 | m_StaticEditorFlags: 0 46 | m_IsActive: 1 47 | --- !u!4 &4713463253410716 48 | Transform: 49 | m_ObjectHideFlags: 1 50 | m_CorrespondingSourceObject: {fileID: 0} 51 | m_PrefabInternal: {fileID: 100100000} 52 | m_GameObject: {fileID: 1993429158166774} 53 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 54 | m_LocalPosition: {x: 0, y: 0, z: 0} 55 | m_LocalScale: {x: 1, y: 1, z: 1} 56 | m_Children: 57 | - {fileID: 4737389094356738} 58 | m_Father: {fileID: 0} 59 | m_RootOrder: 0 60 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 61 | --- !u!4 &4737389094356738 62 | Transform: 63 | m_ObjectHideFlags: 1 64 | m_CorrespondingSourceObject: {fileID: 0} 65 | m_PrefabInternal: {fileID: 100100000} 66 | m_GameObject: {fileID: 1414105392686860} 67 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 68 | m_LocalPosition: {x: 0, y: 0, z: 0} 69 | m_LocalScale: {x: 1, y: 1, z: 1} 70 | m_Children: [] 71 | m_Father: {fileID: 4713463253410716} 72 | m_RootOrder: 0 73 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 74 | --- !u!114 &114100750396720332 75 | MonoBehaviour: 76 | m_ObjectHideFlags: 0 77 | m_CorrespondingSourceObject: {fileID: 0} 78 | m_PrefabInternal: {fileID: 0} 79 | m_GameObject: {fileID: 0} 80 | m_Enabled: 1 81 | m_EditorHideFlags: 1 82 | m_Script: {fileID: 12395, guid: 0000000000000000e000000000000000, type: 0} 83 | m_Name: Palette Settings 84 | m_EditorClassIdentifier: 85 | cellSizing: 0 86 | --- !u!156049354 &2569400265879401496 87 | Grid: 88 | m_ObjectHideFlags: 1 89 | m_CorrespondingSourceObject: {fileID: 0} 90 | m_PrefabInternal: {fileID: 100100000} 91 | m_GameObject: {fileID: 1993429158166774} 92 | m_Enabled: 1 93 | m_CellSize: {x: 1, y: 1, z: 0} 94 | m_CellGap: {x: 0, y: 0, z: 0} 95 | m_CellLayout: 0 96 | m_CellSwizzle: 0 97 | --- !u!483693784 &3664157344458105560 98 | TilemapRenderer: 99 | m_ObjectHideFlags: 1 100 | m_CorrespondingSourceObject: {fileID: 0} 101 | m_PrefabInternal: {fileID: 100100000} 102 | m_GameObject: {fileID: 1414105392686860} 103 | m_Enabled: 0 104 | m_CastShadows: 0 105 | m_ReceiveShadows: 0 106 | m_DynamicOccludee: 0 107 | m_MotionVectors: 1 108 | m_LightProbeUsage: 0 109 | m_ReflectionProbeUsage: 0 110 | m_RenderingLayerMask: 4294967295 111 | m_Materials: 112 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 113 | m_StaticBatchInfo: 114 | firstSubMesh: 0 115 | subMeshCount: 0 116 | m_StaticBatchRoot: {fileID: 0} 117 | m_ProbeAnchor: {fileID: 0} 118 | m_LightProbeVolumeOverride: {fileID: 0} 119 | m_ScaleInLightmap: 1 120 | m_PreserveUVs: 0 121 | m_IgnoreNormalsForChartDetection: 0 122 | m_ImportantGI: 0 123 | m_StitchLightmapSeams: 0 124 | m_SelectedEditorRenderState: 0 125 | m_MinimumChartSize: 4 126 | m_AutoUVMaxDistance: 0.5 127 | m_AutoUVMaxAngle: 89 128 | m_LightmapParameters: {fileID: 0} 129 | m_SortingLayerID: 0 130 | m_SortingLayer: 0 131 | m_SortingOrder: 0 132 | m_ChunkSize: {x: 32, y: 32, z: 32} 133 | m_ChunkCullingBounds: {x: 0, y: 0, z: 0} 134 | m_MaxChunkCount: 16 135 | m_MaxFrameAge: 16 136 | m_SortOrder: 0 137 | m_DetectChunkCullingBounds: 0 138 | m_MaskInteraction: 0 139 | --- !u!1839735485 &8195094280823342280 140 | Tilemap: 141 | m_ObjectHideFlags: 1 142 | m_CorrespondingSourceObject: {fileID: 0} 143 | m_PrefabInternal: {fileID: 100100000} 144 | m_GameObject: {fileID: 1414105392686860} 145 | m_Enabled: 1 146 | m_Tiles: 147 | - first: {x: -1, y: -1, z: 0} 148 | second: 149 | m_TileIndex: 8 150 | m_TileSpriteIndex: 0 151 | m_TileMatrixIndex: 0 152 | m_TileColorIndex: 8 153 | m_ObjectToInstantiate: {fileID: 0} 154 | m_TileFlags: 1 155 | m_ColliderType: 1 156 | - first: {x: 0, y: -1, z: 0} 157 | second: 158 | m_TileIndex: 9 159 | m_TileSpriteIndex: 0 160 | m_TileMatrixIndex: 0 161 | m_TileColorIndex: 9 162 | m_ObjectToInstantiate: {fileID: 0} 163 | m_TileFlags: 1 164 | m_ColliderType: 1 165 | - first: {x: 1, y: -1, z: 0} 166 | second: 167 | m_TileIndex: 10 168 | m_TileSpriteIndex: 0 169 | m_TileMatrixIndex: 0 170 | m_TileColorIndex: 10 171 | m_ObjectToInstantiate: {fileID: 0} 172 | m_TileFlags: 1 173 | m_ColliderType: 1 174 | - first: {x: 2, y: -1, z: 0} 175 | second: 176 | m_TileIndex: 11 177 | m_TileSpriteIndex: 0 178 | m_TileMatrixIndex: 0 179 | m_TileColorIndex: 11 180 | m_ObjectToInstantiate: {fileID: 0} 181 | m_TileFlags: 1 182 | m_ColliderType: 1 183 | - first: {x: 3, y: -1, z: 0} 184 | second: 185 | m_TileIndex: 12 186 | m_TileSpriteIndex: 0 187 | m_TileMatrixIndex: 0 188 | m_TileColorIndex: 12 189 | m_ObjectToInstantiate: {fileID: 0} 190 | m_TileFlags: 1 191 | m_ColliderType: 1 192 | - first: {x: 4, y: -1, z: 0} 193 | second: 194 | m_TileIndex: 13 195 | m_TileSpriteIndex: 0 196 | m_TileMatrixIndex: 0 197 | m_TileColorIndex: 13 198 | m_ObjectToInstantiate: {fileID: 0} 199 | m_TileFlags: 1 200 | m_ColliderType: 1 201 | - first: {x: 5, y: -1, z: 0} 202 | second: 203 | m_TileIndex: 14 204 | m_TileSpriteIndex: 0 205 | m_TileMatrixIndex: 0 206 | m_TileColorIndex: 14 207 | m_ObjectToInstantiate: {fileID: 0} 208 | m_TileFlags: 1 209 | m_ColliderType: 1 210 | - first: {x: 6, y: -1, z: 0} 211 | second: 212 | m_TileIndex: 15 213 | m_TileSpriteIndex: 0 214 | m_TileMatrixIndex: 0 215 | m_TileColorIndex: 15 216 | m_ObjectToInstantiate: {fileID: 0} 217 | m_TileFlags: 1 218 | m_ColliderType: 1 219 | - first: {x: -1, y: 0, z: 0} 220 | second: 221 | m_TileIndex: 0 222 | m_TileSpriteIndex: 0 223 | m_TileMatrixIndex: 0 224 | m_TileColorIndex: 0 225 | m_ObjectToInstantiate: {fileID: 0} 226 | m_TileFlags: 1 227 | m_ColliderType: 1 228 | - first: {x: 0, y: 0, z: 0} 229 | second: 230 | m_TileIndex: 1 231 | m_TileSpriteIndex: 0 232 | m_TileMatrixIndex: 0 233 | m_TileColorIndex: 1 234 | m_ObjectToInstantiate: {fileID: 0} 235 | m_TileFlags: 1 236 | m_ColliderType: 1 237 | - first: {x: 1, y: 0, z: 0} 238 | second: 239 | m_TileIndex: 2 240 | m_TileSpriteIndex: 0 241 | m_TileMatrixIndex: 0 242 | m_TileColorIndex: 2 243 | m_ObjectToInstantiate: {fileID: 0} 244 | m_TileFlags: 1 245 | m_ColliderType: 1 246 | - first: {x: 2, y: 0, z: 0} 247 | second: 248 | m_TileIndex: 3 249 | m_TileSpriteIndex: 0 250 | m_TileMatrixIndex: 0 251 | m_TileColorIndex: 3 252 | m_ObjectToInstantiate: {fileID: 0} 253 | m_TileFlags: 1 254 | m_ColliderType: 1 255 | - first: {x: 3, y: 0, z: 0} 256 | second: 257 | m_TileIndex: 4 258 | m_TileSpriteIndex: 0 259 | m_TileMatrixIndex: 0 260 | m_TileColorIndex: 4 261 | m_ObjectToInstantiate: {fileID: 0} 262 | m_TileFlags: 1 263 | m_ColliderType: 1 264 | - first: {x: 4, y: 0, z: 0} 265 | second: 266 | m_TileIndex: 5 267 | m_TileSpriteIndex: 0 268 | m_TileMatrixIndex: 0 269 | m_TileColorIndex: 5 270 | m_ObjectToInstantiate: {fileID: 0} 271 | m_TileFlags: 1 272 | m_ColliderType: 1 273 | - first: {x: 5, y: 0, z: 0} 274 | second: 275 | m_TileIndex: 6 276 | m_TileSpriteIndex: 0 277 | m_TileMatrixIndex: 0 278 | m_TileColorIndex: 6 279 | m_ObjectToInstantiate: {fileID: 0} 280 | m_TileFlags: 1 281 | m_ColliderType: 1 282 | - first: {x: 6, y: 0, z: 0} 283 | second: 284 | m_TileIndex: 7 285 | m_TileSpriteIndex: 0 286 | m_TileMatrixIndex: 0 287 | m_TileColorIndex: 7 288 | m_ObjectToInstantiate: {fileID: 0} 289 | m_TileFlags: 1 290 | m_ColliderType: 1 291 | m_AnimatedTiles: {} 292 | m_TileAssetArray: 293 | - m_RefCount: 1 294 | m_Data: {fileID: 11400000, guid: 95e7e5fa3894d4cc194a5a2e71c98f56, type: 2} 295 | - m_RefCount: 1 296 | m_Data: {fileID: 11400000, guid: 496421e6f8447401d9930ed7723ffcc3, type: 2} 297 | - m_RefCount: 1 298 | m_Data: {fileID: 11400000, guid: 5dda1ad8bb21d433397bc76af9aa2a70, type: 2} 299 | - m_RefCount: 1 300 | m_Data: {fileID: 11400000, guid: c84548e4905cf45198a87f3d85d3ae3e, type: 2} 301 | - m_RefCount: 1 302 | m_Data: {fileID: 11400000, guid: 207ea1163a1f54adba00aceef5336fbe, type: 2} 303 | - m_RefCount: 1 304 | m_Data: {fileID: 11400000, guid: d48b8e83b0bbc4b23a2f69ddc851a3a3, type: 2} 305 | - m_RefCount: 1 306 | m_Data: {fileID: 11400000, guid: 9ae98a5647e204b7e9fcc525aacbef97, type: 2} 307 | - m_RefCount: 1 308 | m_Data: {fileID: 11400000, guid: c3e2d11e3424e4563879cfd3d30685d1, type: 2} 309 | - m_RefCount: 1 310 | m_Data: {fileID: 11400000, guid: 124a77e38ff9b4d56915eb0cc90bc1f7, type: 2} 311 | - m_RefCount: 1 312 | m_Data: {fileID: 11400000, guid: 0d0d07160b10d44b1b9ebcc3c8426cec, type: 2} 313 | - m_RefCount: 1 314 | m_Data: {fileID: 11400000, guid: d007cdc64350e4400878666c2b4b13dc, type: 2} 315 | - m_RefCount: 1 316 | m_Data: {fileID: 11400000, guid: 03be7ddaff1f9403f921f9589e2ab401, type: 2} 317 | - m_RefCount: 1 318 | m_Data: {fileID: 11400000, guid: d920ed9d6a56b49fc8257b1bf8ae1b98, type: 2} 319 | - m_RefCount: 1 320 | m_Data: {fileID: 11400000, guid: 816054a08cc554c7aac7a234b734c647, type: 2} 321 | - m_RefCount: 1 322 | m_Data: {fileID: 11400000, guid: 48057e135a8e441959bf5dbceb0c2903, type: 2} 323 | - m_RefCount: 1 324 | m_Data: {fileID: 11400000, guid: 7b5aa6857652443a28009ab66adb0d3e, type: 2} 325 | m_TileSpriteArray: 326 | - m_RefCount: 16 327 | m_Data: {fileID: 21300000, guid: a8e6ca393c0c344148ed2a473d639d9c, type: 3} 328 | m_TileMatrixArray: 329 | - m_RefCount: 16 330 | m_Data: 331 | e00: 1 332 | e01: 0 333 | e02: 0 334 | e03: 0 335 | e10: 0 336 | e11: 1 337 | e12: 0 338 | e13: 0 339 | e20: 0 340 | e21: 0 341 | e22: 1 342 | e23: 0 343 | e30: 0 344 | e31: 0 345 | e32: 0 346 | e33: 1 347 | m_TileColorArray: 348 | - m_RefCount: 1 349 | m_Data: {r: 0, g: 0, b: 0, a: 1} 350 | - m_RefCount: 1 351 | m_Data: {r: 0.11764706, g: 0.16470589, b: 0.32156864, a: 1} 352 | - m_RefCount: 1 353 | m_Data: {r: 0.49411765, g: 0.13333334, b: 0.32156864, a: 1} 354 | - m_RefCount: 1 355 | m_Data: {r: 0, g: 0.53333336, b: 0.32941177, a: 1} 356 | - m_RefCount: 1 357 | m_Data: {r: 0.67058825, g: 0.31764707, b: 0.21960784, a: 1} 358 | - m_RefCount: 1 359 | m_Data: {r: 0.37254903, g: 0.34117648, b: 0.30980393, a: 1} 360 | - m_RefCount: 1 361 | m_Data: {r: 0.7647059, g: 0.7647059, b: 0.78039217, a: 1} 362 | - m_RefCount: 1 363 | m_Data: {r: 1, g: 0.94509804, b: 0.9098039, a: 1} 364 | - m_RefCount: 1 365 | m_Data: {r: 1, g: 0, b: 0.29411766, a: 1} 366 | - m_RefCount: 1 367 | m_Data: {r: 0.99607843, g: 0.6392157, b: 0.12941177, a: 1} 368 | - m_RefCount: 1 369 | m_Data: {r: 0.99607843, g: 0.92941177, b: 0.25882354, a: 1} 370 | - m_RefCount: 1 371 | m_Data: {r: 0, g: 0.9019608, b: 0.28627452, a: 1} 372 | - m_RefCount: 1 373 | m_Data: {r: 0.18431373, g: 0.6745098, b: 0.9882353, a: 1} 374 | - m_RefCount: 1 375 | m_Data: {r: 0.5137255, g: 0.45882353, b: 0.60784316, a: 1} 376 | - m_RefCount: 1 377 | m_Data: {r: 1, g: 0.45490196, b: 0.6509804, a: 1} 378 | - m_RefCount: 1 379 | m_Data: {r: 1, g: 0.8, b: 0.6745098, a: 1} 380 | m_AnimationFrameRate: 1 381 | m_Color: {r: 1, g: 1, b: 1, a: 1} 382 | m_Origin: {x: -1, y: -1, z: 0} 383 | m_Size: {x: 8, y: 2, z: 1} 384 | m_TileAnchor: {x: 0.5, y: 0.5, z: 0} 385 | m_TileOrientation: 0 386 | m_TileOrientationMatrix: 387 | e00: 1 388 | e01: 0 389 | e02: 0 390 | e03: 0 391 | e10: 0 392 | e11: 1 393 | e12: 0 394 | e13: 0 395 | e20: 0 396 | e21: 0 397 | e22: 1 398 | e23: 0 399 | e30: 0 400 | e31: 0 401 | e32: 0 402 | e33: 1 403 | -------------------------------------------------------------------------------- /Assets/Palettes/Pico8.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 24a7aeeeb3ee942129be1a3e5c11d572 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bb9b5caedf1f64bd3a627e9e2646b82a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/Main.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 3 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 0 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 0 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 500 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 2 83 | m_PVRDenoiserTypeDirect: 0 84 | m_PVRDenoiserTypeIndirect: 0 85 | m_PVRDenoiserTypeAO: 0 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 0 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ShowResolutionOverlay: 1 98 | m_ExportTrainingData: 0 99 | m_LightingDataAsset: {fileID: 0} 100 | m_UseShadowmask: 1 101 | --- !u!196 &4 102 | NavMeshSettings: 103 | serializedVersion: 2 104 | m_ObjectHideFlags: 0 105 | m_BuildSettings: 106 | serializedVersion: 2 107 | agentTypeID: 0 108 | agentRadius: 0.5 109 | agentHeight: 2 110 | agentSlope: 45 111 | agentClimb: 0.4 112 | ledgeDropHeight: 0 113 | maxJumpAcrossDistance: 0 114 | minRegionArea: 2 115 | manualCellSize: 0 116 | cellSize: 0.16666667 117 | manualTileSize: 0 118 | tileSize: 256 119 | accuratePlacement: 0 120 | debug: 121 | m_Flags: 0 122 | m_NavMeshData: {fileID: 0} 123 | --- !u!1 &442689092 124 | GameObject: 125 | m_ObjectHideFlags: 0 126 | m_CorrespondingSourceObject: {fileID: 0} 127 | m_PrefabInstance: {fileID: 0} 128 | m_PrefabAsset: {fileID: 0} 129 | serializedVersion: 6 130 | m_Component: 131 | - component: {fileID: 442689094} 132 | - component: {fileID: 442689093} 133 | m_Layer: 0 134 | m_Name: Grid 135 | m_TagString: Untagged 136 | m_Icon: {fileID: 0} 137 | m_NavMeshLayer: 0 138 | m_StaticEditorFlags: 0 139 | m_IsActive: 1 140 | --- !u!156049354 &442689093 141 | Grid: 142 | m_ObjectHideFlags: 0 143 | m_CorrespondingSourceObject: {fileID: 0} 144 | m_PrefabInstance: {fileID: 0} 145 | m_PrefabAsset: {fileID: 0} 146 | m_GameObject: {fileID: 442689092} 147 | m_Enabled: 1 148 | m_CellSize: {x: 1, y: 1, z: 0} 149 | m_CellGap: {x: 0, y: 0, z: 0} 150 | m_CellLayout: 0 151 | m_CellSwizzle: 0 152 | --- !u!4 &442689094 153 | Transform: 154 | m_ObjectHideFlags: 0 155 | m_CorrespondingSourceObject: {fileID: 0} 156 | m_PrefabInstance: {fileID: 0} 157 | m_PrefabAsset: {fileID: 0} 158 | m_GameObject: {fileID: 442689092} 159 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 160 | m_LocalPosition: {x: 0, y: 0, z: 0} 161 | m_LocalScale: {x: 1, y: 1, z: 1} 162 | m_Children: 163 | - {fileID: 1689425827} 164 | m_Father: {fileID: 0} 165 | m_RootOrder: 1 166 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 167 | --- !u!1 &519420028 168 | GameObject: 169 | m_ObjectHideFlags: 0 170 | m_CorrespondingSourceObject: {fileID: 0} 171 | m_PrefabInstance: {fileID: 0} 172 | m_PrefabAsset: {fileID: 0} 173 | serializedVersion: 6 174 | m_Component: 175 | - component: {fileID: 519420032} 176 | - component: {fileID: 519420031} 177 | - component: {fileID: 519420029} 178 | m_Layer: 0 179 | m_Name: Main Camera 180 | m_TagString: MainCamera 181 | m_Icon: {fileID: 0} 182 | m_NavMeshLayer: 0 183 | m_StaticEditorFlags: 0 184 | m_IsActive: 1 185 | --- !u!81 &519420029 186 | AudioListener: 187 | m_ObjectHideFlags: 0 188 | m_CorrespondingSourceObject: {fileID: 0} 189 | m_PrefabInstance: {fileID: 0} 190 | m_PrefabAsset: {fileID: 0} 191 | m_GameObject: {fileID: 519420028} 192 | m_Enabled: 1 193 | --- !u!20 &519420031 194 | Camera: 195 | m_ObjectHideFlags: 0 196 | m_CorrespondingSourceObject: {fileID: 0} 197 | m_PrefabInstance: {fileID: 0} 198 | m_PrefabAsset: {fileID: 0} 199 | m_GameObject: {fileID: 519420028} 200 | m_Enabled: 1 201 | serializedVersion: 2 202 | m_ClearFlags: 2 203 | m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0} 204 | m_projectionMatrixMode: 1 205 | m_GateFitMode: 2 206 | m_FOVAxisMode: 0 207 | m_SensorSize: {x: 36, y: 24} 208 | m_LensShift: {x: 0, y: 0} 209 | m_FocalLength: 50 210 | m_NormalizedViewPortRect: 211 | serializedVersion: 2 212 | x: 0 213 | y: 0 214 | width: 1 215 | height: 1 216 | near clip plane: 0.3 217 | far clip plane: 1000 218 | field of view: 60 219 | orthographic: 1 220 | orthographic size: 9 221 | m_Depth: -1 222 | m_CullingMask: 223 | serializedVersion: 2 224 | m_Bits: 4294967295 225 | m_RenderingPath: -1 226 | m_TargetTexture: {fileID: 0} 227 | m_TargetDisplay: 0 228 | m_TargetEye: 0 229 | m_HDR: 1 230 | m_AllowMSAA: 0 231 | m_AllowDynamicResolution: 0 232 | m_ForceIntoRT: 0 233 | m_OcclusionCulling: 0 234 | m_StereoConvergence: 10 235 | m_StereoSeparation: 0.022 236 | --- !u!4 &519420032 237 | Transform: 238 | m_ObjectHideFlags: 0 239 | m_CorrespondingSourceObject: {fileID: 0} 240 | m_PrefabInstance: {fileID: 0} 241 | m_PrefabAsset: {fileID: 0} 242 | m_GameObject: {fileID: 519420028} 243 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 244 | m_LocalPosition: {x: 15, y: 8, z: -10} 245 | m_LocalScale: {x: 1, y: 1, z: 1} 246 | m_Children: [] 247 | m_Father: {fileID: 0} 248 | m_RootOrder: 0 249 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 250 | --- !u!1 &745145089 251 | GameObject: 252 | m_ObjectHideFlags: 0 253 | m_CorrespondingSourceObject: {fileID: 0} 254 | m_PrefabInstance: {fileID: 0} 255 | m_PrefabAsset: {fileID: 0} 256 | serializedVersion: 6 257 | m_Component: 258 | - component: {fileID: 745145091} 259 | - component: {fileID: 745145090} 260 | m_Layer: 0 261 | m_Name: End 262 | m_TagString: Untagged 263 | m_Icon: {fileID: 0} 264 | m_NavMeshLayer: 0 265 | m_StaticEditorFlags: 0 266 | m_IsActive: 1 267 | --- !u!212 &745145090 268 | SpriteRenderer: 269 | m_ObjectHideFlags: 0 270 | m_CorrespondingSourceObject: {fileID: 0} 271 | m_PrefabInstance: {fileID: 0} 272 | m_PrefabAsset: {fileID: 0} 273 | m_GameObject: {fileID: 745145089} 274 | m_Enabled: 1 275 | m_CastShadows: 0 276 | m_ReceiveShadows: 0 277 | m_DynamicOccludee: 1 278 | m_MotionVectors: 1 279 | m_LightProbeUsage: 1 280 | m_ReflectionProbeUsage: 1 281 | m_RenderingLayerMask: 1 282 | m_RendererPriority: 0 283 | m_Materials: 284 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 285 | m_StaticBatchInfo: 286 | firstSubMesh: 0 287 | subMeshCount: 0 288 | m_StaticBatchRoot: {fileID: 0} 289 | m_ProbeAnchor: {fileID: 0} 290 | m_LightProbeVolumeOverride: {fileID: 0} 291 | m_ScaleInLightmap: 1 292 | m_PreserveUVs: 0 293 | m_IgnoreNormalsForChartDetection: 0 294 | m_ImportantGI: 0 295 | m_StitchLightmapSeams: 0 296 | m_SelectedEditorRenderState: 0 297 | m_MinimumChartSize: 4 298 | m_AutoUVMaxDistance: 0.5 299 | m_AutoUVMaxAngle: 89 300 | m_LightmapParameters: {fileID: 0} 301 | m_SortingLayerID: 0 302 | m_SortingLayer: 0 303 | m_SortingOrder: 2 304 | m_Sprite: {fileID: 21300000, guid: ae0a58d59247f41db83a5d38e1ea5c7d, type: 3} 305 | m_Color: {r: 1, g: 0.02745098, b: 0.30588236, a: 1} 306 | m_FlipX: 0 307 | m_FlipY: 0 308 | m_DrawMode: 0 309 | m_Size: {x: 1, y: 1} 310 | m_AdaptiveModeThreshold: 0.5 311 | m_SpriteTileMode: 0 312 | m_WasSpriteAssigned: 1 313 | m_MaskInteraction: 0 314 | m_SpriteSortPoint: 0 315 | --- !u!4 &745145091 316 | Transform: 317 | m_ObjectHideFlags: 0 318 | m_CorrespondingSourceObject: {fileID: 0} 319 | m_PrefabInstance: {fileID: 0} 320 | m_PrefabAsset: {fileID: 0} 321 | m_GameObject: {fileID: 745145089} 322 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 323 | m_LocalPosition: {x: 0, y: 0, z: 0} 324 | m_LocalScale: {x: 0.6, y: 0.6, z: 1} 325 | m_Children: [] 326 | m_Father: {fileID: 0} 327 | m_RootOrder: 4 328 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 329 | --- !u!1 &827910618 330 | GameObject: 331 | m_ObjectHideFlags: 0 332 | m_CorrespondingSourceObject: {fileID: 0} 333 | m_PrefabInstance: {fileID: 0} 334 | m_PrefabAsset: {fileID: 0} 335 | serializedVersion: 6 336 | m_Component: 337 | - component: {fileID: 827910620} 338 | - component: {fileID: 827910619} 339 | m_Layer: 0 340 | m_Name: Start 341 | m_TagString: Untagged 342 | m_Icon: {fileID: 0} 343 | m_NavMeshLayer: 0 344 | m_StaticEditorFlags: 0 345 | m_IsActive: 1 346 | --- !u!212 &827910619 347 | SpriteRenderer: 348 | m_ObjectHideFlags: 0 349 | m_CorrespondingSourceObject: {fileID: 0} 350 | m_PrefabInstance: {fileID: 0} 351 | m_PrefabAsset: {fileID: 0} 352 | m_GameObject: {fileID: 827910618} 353 | m_Enabled: 1 354 | m_CastShadows: 0 355 | m_ReceiveShadows: 0 356 | m_DynamicOccludee: 1 357 | m_MotionVectors: 1 358 | m_LightProbeUsage: 1 359 | m_ReflectionProbeUsage: 1 360 | m_RenderingLayerMask: 1 361 | m_RendererPriority: 0 362 | m_Materials: 363 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 364 | m_StaticBatchInfo: 365 | firstSubMesh: 0 366 | subMeshCount: 0 367 | m_StaticBatchRoot: {fileID: 0} 368 | m_ProbeAnchor: {fileID: 0} 369 | m_LightProbeVolumeOverride: {fileID: 0} 370 | m_ScaleInLightmap: 1 371 | m_PreserveUVs: 0 372 | m_IgnoreNormalsForChartDetection: 0 373 | m_ImportantGI: 0 374 | m_StitchLightmapSeams: 0 375 | m_SelectedEditorRenderState: 0 376 | m_MinimumChartSize: 4 377 | m_AutoUVMaxDistance: 0.5 378 | m_AutoUVMaxAngle: 89 379 | m_LightmapParameters: {fileID: 0} 380 | m_SortingLayerID: 0 381 | m_SortingLayer: 0 382 | m_SortingOrder: 2 383 | m_Sprite: {fileID: 21300000, guid: ae0a58d59247f41db83a5d38e1ea5c7d, type: 3} 384 | m_Color: {r: 0, g: 0.8901961, b: 0.22352941, a: 1} 385 | m_FlipX: 0 386 | m_FlipY: 0 387 | m_DrawMode: 0 388 | m_Size: {x: 1, y: 1} 389 | m_AdaptiveModeThreshold: 0.5 390 | m_SpriteTileMode: 0 391 | m_WasSpriteAssigned: 1 392 | m_MaskInteraction: 0 393 | m_SpriteSortPoint: 0 394 | --- !u!4 &827910620 395 | Transform: 396 | m_ObjectHideFlags: 0 397 | m_CorrespondingSourceObject: {fileID: 0} 398 | m_PrefabInstance: {fileID: 0} 399 | m_PrefabAsset: {fileID: 0} 400 | m_GameObject: {fileID: 827910618} 401 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 402 | m_LocalPosition: {x: 0, y: 0, z: 0} 403 | m_LocalScale: {x: 0.6, y: 0.6, z: 1} 404 | m_Children: [] 405 | m_Father: {fileID: 0} 406 | m_RootOrder: 3 407 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 408 | --- !u!1 &1689425826 409 | GameObject: 410 | m_ObjectHideFlags: 0 411 | m_CorrespondingSourceObject: {fileID: 0} 412 | m_PrefabInstance: {fileID: 0} 413 | m_PrefabAsset: {fileID: 0} 414 | serializedVersion: 6 415 | m_Component: 416 | - component: {fileID: 1689425827} 417 | - component: {fileID: 1689425829} 418 | - component: {fileID: 1689425828} 419 | - component: {fileID: 1689425830} 420 | m_Layer: 0 421 | m_Name: Tilemap 422 | m_TagString: Untagged 423 | m_Icon: {fileID: 0} 424 | m_NavMeshLayer: 0 425 | m_StaticEditorFlags: 0 426 | m_IsActive: 1 427 | --- !u!4 &1689425827 428 | Transform: 429 | m_ObjectHideFlags: 0 430 | m_CorrespondingSourceObject: {fileID: 0} 431 | m_PrefabInstance: {fileID: 0} 432 | m_PrefabAsset: {fileID: 0} 433 | m_GameObject: {fileID: 1689425826} 434 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 435 | m_LocalPosition: {x: 0, y: 0, z: 0} 436 | m_LocalScale: {x: 1, y: 1, z: 1} 437 | m_Children: [] 438 | m_Father: {fileID: 442689094} 439 | m_RootOrder: 0 440 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 441 | --- !u!483693784 &1689425828 442 | TilemapRenderer: 443 | m_ObjectHideFlags: 0 444 | m_CorrespondingSourceObject: {fileID: 0} 445 | m_PrefabInstance: {fileID: 0} 446 | m_PrefabAsset: {fileID: 0} 447 | m_GameObject: {fileID: 1689425826} 448 | m_Enabled: 1 449 | m_CastShadows: 0 450 | m_ReceiveShadows: 0 451 | m_DynamicOccludee: 1 452 | m_MotionVectors: 1 453 | m_LightProbeUsage: 0 454 | m_ReflectionProbeUsage: 0 455 | m_RenderingLayerMask: 1 456 | m_RendererPriority: 0 457 | m_Materials: 458 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 459 | m_StaticBatchInfo: 460 | firstSubMesh: 0 461 | subMeshCount: 0 462 | m_StaticBatchRoot: {fileID: 0} 463 | m_ProbeAnchor: {fileID: 0} 464 | m_LightProbeVolumeOverride: {fileID: 0} 465 | m_ScaleInLightmap: 1 466 | m_PreserveUVs: 0 467 | m_IgnoreNormalsForChartDetection: 0 468 | m_ImportantGI: 0 469 | m_StitchLightmapSeams: 0 470 | m_SelectedEditorRenderState: 0 471 | m_MinimumChartSize: 4 472 | m_AutoUVMaxDistance: 0.5 473 | m_AutoUVMaxAngle: 89 474 | m_LightmapParameters: {fileID: 0} 475 | m_SortingLayerID: 0 476 | m_SortingLayer: 0 477 | m_SortingOrder: 0 478 | m_ChunkSize: {x: 32, y: 32, z: 32} 479 | m_ChunkCullingBounds: {x: 0, y: 0, z: 0} 480 | m_MaxChunkCount: 16 481 | m_MaxFrameAge: 16 482 | m_SortOrder: 0 483 | m_Mode: 0 484 | m_DetectChunkCullingBounds: 0 485 | m_MaskInteraction: 0 486 | --- !u!1839735485 &1689425829 487 | Tilemap: 488 | m_ObjectHideFlags: 0 489 | m_CorrespondingSourceObject: {fileID: 0} 490 | m_PrefabInstance: {fileID: 0} 491 | m_PrefabAsset: {fileID: 0} 492 | m_GameObject: {fileID: 1689425826} 493 | m_Enabled: 1 494 | m_Tiles: {} 495 | m_AnimatedTiles: {} 496 | m_TileAssetArray: [] 497 | m_TileSpriteArray: [] 498 | m_TileMatrixArray: [] 499 | m_TileColorArray: [] 500 | m_AnimationFrameRate: 1 501 | m_Color: {r: 1, g: 1, b: 1, a: 1} 502 | m_Origin: {x: 0, y: 0, z: 0} 503 | m_Size: {x: 0, y: 0, z: 1} 504 | m_TileAnchor: {x: 0.5, y: 0.5, z: 0} 505 | m_TileOrientation: 0 506 | m_TileOrientationMatrix: 507 | e00: 1 508 | e01: 0 509 | e02: 0 510 | e03: 0 511 | e10: 0 512 | e11: 1 513 | e12: 0 514 | e13: 0 515 | e20: 0 516 | e21: 0 517 | e22: 1 518 | e23: 0 519 | e30: 0 520 | e31: 0 521 | e32: 0 522 | e33: 1 523 | --- !u!114 &1689425830 524 | MonoBehaviour: 525 | m_ObjectHideFlags: 0 526 | m_CorrespondingSourceObject: {fileID: 0} 527 | m_PrefabInstance: {fileID: 0} 528 | m_PrefabAsset: {fileID: 0} 529 | m_GameObject: {fileID: 1689425826} 530 | m_Enabled: 1 531 | m_EditorHideFlags: 0 532 | m_Script: {fileID: 11500000, guid: be7b8d08ebba1449186eae53c16fc0ae, type: 3} 533 | m_Name: 534 | m_EditorClassIdentifier: 535 | width: 30 536 | height: 16 537 | perlinScale: 10 538 | wallThreshold: 0.4 539 | minPathLength: 12 540 | wall: {fileID: 11400000, guid: 496421e6f8447401d9930ed7723ffcc3, type: 2} 541 | duration: 2 542 | findPathOpenCell: 0 543 | lineRenderer: {fileID: 2030358986} 544 | startCircle: {fileID: 827910620} 545 | endCircle: {fileID: 745145091} 546 | --- !u!1 &2030358985 547 | GameObject: 548 | m_ObjectHideFlags: 0 549 | m_CorrespondingSourceObject: {fileID: 0} 550 | m_PrefabInstance: {fileID: 0} 551 | m_PrefabAsset: {fileID: 0} 552 | serializedVersion: 6 553 | m_Component: 554 | - component: {fileID: 2030358987} 555 | - component: {fileID: 2030358986} 556 | m_Layer: 0 557 | m_Name: Line 558 | m_TagString: Untagged 559 | m_Icon: {fileID: 0} 560 | m_NavMeshLayer: 0 561 | m_StaticEditorFlags: 0 562 | m_IsActive: 1 563 | --- !u!120 &2030358986 564 | LineRenderer: 565 | m_ObjectHideFlags: 0 566 | m_CorrespondingSourceObject: {fileID: 0} 567 | m_PrefabInstance: {fileID: 0} 568 | m_PrefabAsset: {fileID: 0} 569 | m_GameObject: {fileID: 2030358985} 570 | m_Enabled: 1 571 | m_CastShadows: 1 572 | m_ReceiveShadows: 1 573 | m_DynamicOccludee: 1 574 | m_MotionVectors: 0 575 | m_LightProbeUsage: 0 576 | m_ReflectionProbeUsage: 0 577 | m_RenderingLayerMask: 1 578 | m_RendererPriority: 0 579 | m_Materials: 580 | - {fileID: 10306, guid: 0000000000000000f000000000000000, type: 0} 581 | m_StaticBatchInfo: 582 | firstSubMesh: 0 583 | subMeshCount: 0 584 | m_StaticBatchRoot: {fileID: 0} 585 | m_ProbeAnchor: {fileID: 0} 586 | m_LightProbeVolumeOverride: {fileID: 0} 587 | m_ScaleInLightmap: 1 588 | m_PreserveUVs: 0 589 | m_IgnoreNormalsForChartDetection: 0 590 | m_ImportantGI: 0 591 | m_StitchLightmapSeams: 0 592 | m_SelectedEditorRenderState: 3 593 | m_MinimumChartSize: 4 594 | m_AutoUVMaxDistance: 0.5 595 | m_AutoUVMaxAngle: 89 596 | m_LightmapParameters: {fileID: 0} 597 | m_SortingLayerID: 0 598 | m_SortingLayer: 0 599 | m_SortingOrder: 0 600 | m_Positions: 601 | - {x: 0, y: 0, z: 0} 602 | - {x: 0, y: 0, z: 1} 603 | m_Parameters: 604 | serializedVersion: 3 605 | widthMultiplier: 0.1 606 | widthCurve: 607 | serializedVersion: 2 608 | m_Curve: 609 | - serializedVersion: 3 610 | time: 0 611 | value: 1 612 | inSlope: 0 613 | outSlope: 0 614 | tangentMode: 0 615 | weightedMode: 0 616 | inWeight: 0.33333334 617 | outWeight: 0.33333334 618 | m_PreInfinity: 2 619 | m_PostInfinity: 2 620 | m_RotationOrder: 4 621 | colorGradient: 622 | serializedVersion: 2 623 | key0: {r: 1, g: 0.9411765, b: 0.90588236, a: 1} 624 | key1: {r: 1, g: 0.9411765, b: 0.90588236, a: 1} 625 | key2: {r: 0, g: 0, b: 0, a: 0} 626 | key3: {r: 0, g: 0, b: 0, a: 0} 627 | key4: {r: 0, g: 0, b: 0, a: 0} 628 | key5: {r: 0, g: 0, b: 0, a: 0} 629 | key6: {r: 0, g: 0, b: 0, a: 0} 630 | key7: {r: 0, g: 0, b: 0, a: 0} 631 | ctime0: 0 632 | ctime1: 65535 633 | ctime2: 0 634 | ctime3: 0 635 | ctime4: 0 636 | ctime5: 0 637 | ctime6: 0 638 | ctime7: 0 639 | atime0: 0 640 | atime1: 65535 641 | atime2: 0 642 | atime3: 0 643 | atime4: 0 644 | atime5: 0 645 | atime6: 0 646 | atime7: 0 647 | m_Mode: 0 648 | m_NumColorKeys: 2 649 | m_NumAlphaKeys: 2 650 | numCornerVertices: 0 651 | numCapVertices: 0 652 | alignment: 0 653 | textureMode: 0 654 | shadowBias: 0.5 655 | generateLightingData: 0 656 | m_UseWorldSpace: 0 657 | m_Loop: 0 658 | --- !u!4 &2030358987 659 | Transform: 660 | m_ObjectHideFlags: 0 661 | m_CorrespondingSourceObject: {fileID: 0} 662 | m_PrefabInstance: {fileID: 0} 663 | m_PrefabAsset: {fileID: 0} 664 | m_GameObject: {fileID: 2030358985} 665 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 666 | m_LocalPosition: {x: 0, y: 0, z: 1} 667 | m_LocalScale: {x: 1, y: 1, z: 1} 668 | m_Children: [] 669 | m_Father: {fileID: 0} 670 | m_RootOrder: 2 671 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 672 | -------------------------------------------------------------------------------- /Assets/Scenes/Main.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e2fb152378f7d4dec978c83ec1874d44 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 42ff0cf920a7a4480a6b65bd0860ef1d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/LevelBuilder.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using Toolbox; 4 | using UnityEngine; 5 | using UnityEngine.Tilemaps; 6 | 7 | public class LevelBuilder : MonoBehaviour 8 | { 9 | public int width = 100; 10 | public int height = 100; 11 | public float perlinScale = 10f; 12 | public float wallThreshold = 0.5f; 13 | public int minPathLength = 10; 14 | public Tile wall; 15 | public float duration = 1f; 16 | public bool findPathOpenCell = true; 17 | 18 | public LineRenderer lineRenderer; 19 | public Transform startCircle; 20 | public Transform endCircle; 21 | 22 | Tilemap tilemap; 23 | List wallTiles; 24 | List groundTiles; 25 | 26 | void Start() 27 | { 28 | tilemap = GetComponent(); 29 | 30 | wallTiles = new List(); 31 | groundTiles = new List(); 32 | 33 | PerlinNoiseGrid noise = new PerlinNoiseGrid(width, height, perlinScale); 34 | 35 | for (int i = 0; i < width; i++) 36 | { 37 | for (int j = 0; j < height; j++) 38 | { 39 | Vector3Int pos = new Vector3Int(i, j, 0); 40 | 41 | if (noise[i, j] < wallThreshold) 42 | { 43 | tilemap.SetTile(pos, wall); 44 | wallTiles.Add(pos); 45 | } 46 | else 47 | { 48 | groundTiles.Add(pos); 49 | } 50 | } 51 | } 52 | 53 | StartCoroutine(NextPath()); 54 | } 55 | 56 | IEnumerator NextPath() 57 | { 58 | Vector3 start; 59 | Vector3 end; 60 | List path; 61 | 62 | do 63 | { 64 | start = tilemap.GetCellCenterWorld(RandomElement(groundTiles)); 65 | 66 | List list = findPathOpenCell ? groundTiles : wallTiles; 67 | end = tilemap.GetCellCenterWorld(RandomElement(list)); 68 | 69 | path = AStar.FindPathClosest(tilemap, start, end); 70 | } while (start == end || path == null || path.Count < minPathLength); 71 | path.Add(end); 72 | 73 | lineRenderer.positionCount = path.Count; 74 | lineRenderer.SetPositions(path.ToArray()); 75 | startCircle.position = start; 76 | endCircle.position = end; 77 | 78 | yield return new WaitForSeconds(duration); 79 | 80 | StartCoroutine(NextPath()); 81 | } 82 | 83 | Vector3Int RandomElement(List list) 84 | { 85 | return list[Random.Range(0, list.Count)]; 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /Assets/Scripts/LevelBuilder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: be7b8d08ebba1449186eae53c16fc0ae 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Pathfinding.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0e3879f512ef04bde80181f42c757d51 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/Pathfinding/AStar.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections.Generic; 3 | using UnityEngine.Tilemaps; 4 | using System; 5 | 6 | namespace Toolbox 7 | { 8 | /// 9 | /// A* search based off Amit Patel's implementation. 10 | /// 11 | /// 12 | /// Patel's implementation is different than what you see in most algorithms and AI textbooks. 13 | /// https://www.redblobgames.com/pathfinding/a-star/implementation.html 14 | /// 15 | public static class AStar 16 | { 17 | /// 18 | /// Find a path to the goal or the closest open cell to the goal. 19 | /// If the self tile is encountered the cell be considered open. 20 | /// 21 | public static LinePath FindLinePathClosest(Tilemap map, Vector3 start, Vector3 goal) 22 | { 23 | List path = FindPathClosest(map, start, goal); 24 | return ToLinePath(path); 25 | } 26 | 27 | static LinePath ToLinePath(List path) 28 | { 29 | LinePath lp = null; 30 | 31 | if (path != null) 32 | { 33 | lp = new LinePath(path); 34 | } 35 | 36 | return lp; 37 | } 38 | 39 | /// 40 | /// Find a path to the goal or the closest open cell to the goal. 41 | /// If the self tile is encountered the cell be considered open. 42 | /// 43 | public static List FindPathClosest(Tilemap map, Vector3 start, Vector3 goal) 44 | { 45 | List path = FindPathClosest(map, map.WorldToCell(start), map.WorldToCell(goal)); 46 | return map.GetCellCenterWorld(path); 47 | } 48 | 49 | /// 50 | /// Find a path to the goal or the closest open cell to the goal. 51 | /// If the self tile is encountered the cell be considered open. 52 | /// 53 | public static List FindPathClosest(Tilemap map, Vector3Int start, Vector3Int goal) 54 | { 55 | if (!map.IsCellEmpty(goal) && goal != start) 56 | { 57 | goal = ClosestCell(OpenCells(map, start, goal), start, goal); 58 | } 59 | 60 | return AStar.FindPath(new MoveGraph(map), start, goal, Vector3Int.Distance); 61 | } 62 | 63 | static HashSet OpenCells(Tilemap map, Vector3Int start, Vector3Int goal) 64 | { 65 | Dictionary counts = new Dictionary(); 66 | counts.Add(goal, 0); 67 | 68 | HashSet openCells = new HashSet(); 69 | 70 | float minDist = Mathf.Infinity; 71 | int minCount = int.MaxValue; 72 | 73 | map.BreadthFirstTraversal(goal, Utils.FourDirections, (current, next) => 74 | { 75 | float dist = Vector3Int.Distance(goal, next); 76 | int count = counts[current] + 1; 77 | counts[next] = count; 78 | 79 | if ((map.IsCellEmpty(next) || next == start) && dist <= minDist) 80 | { 81 | minDist = dist; 82 | minCount = count; 83 | openCells.Add(next); 84 | } 85 | 86 | return count <= minCount && map.IsInBounds(next); 87 | }); 88 | 89 | return openCells; 90 | } 91 | 92 | static Vector3Int ClosestCell(HashSet openCells, Vector3Int start, Vector3Int goal) 93 | { 94 | Vector3Int closest = goal; 95 | float minDist = Mathf.Infinity; 96 | 97 | foreach (Vector3Int c in openCells) 98 | { 99 | float dist = Vector3Int.Distance(start, c); 100 | 101 | if (dist < minDist) 102 | { 103 | minDist = dist; 104 | closest = c; 105 | } 106 | } 107 | 108 | return closest; 109 | } 110 | 111 | /// 112 | /// Finds a path in the tilemap using world coordinates. 113 | /// 114 | public static LinePath FindLinePath(Tilemap map, Vector3 start, Vector3 goal) 115 | { 116 | List path = FindPath(map, start, goal); 117 | return ToLinePath(path); 118 | } 119 | 120 | /// 121 | /// Finds a path in the tilemap using world coordinates. 122 | /// 123 | public static List FindPath(Tilemap map, Vector3 start, Vector3 goal) 124 | { 125 | List path = FindPath(map, map.WorldToCell(start), map.WorldToCell(goal)); 126 | return map.GetCellCenterWorld(path); 127 | } 128 | 129 | /// 130 | /// Finds a path in the tilemap using cell coordinates. 131 | /// 132 | public static List FindPath(Tilemap map, Vector3Int start, Vector3Int goal) 133 | { 134 | return FindPath(new MoveGraph(map), start, goal, Vector3Int.Distance); 135 | } 136 | 137 | /// 138 | /// Finds a path in the graph using cell coordinates. 139 | /// 140 | public static List FindPath(IGraph graph, Vector3Int start, Vector3Int goal, Func heuristic) 141 | { 142 | PriorityQueue open = new PriorityQueue(); 143 | open.Enqueue(start, 0); 144 | 145 | Dictionary cameFrom = new Dictionary(); 146 | cameFrom[start] = start; 147 | 148 | Dictionary costSoFar = new Dictionary(); 149 | costSoFar[start] = 0; 150 | 151 | while (open.Count > 0) 152 | { 153 | Vector3Int current = open.Dequeue(); 154 | 155 | if (current == goal) 156 | { 157 | break; 158 | } 159 | 160 | foreach (Vector3Int next in graph.Neighbors(current)) 161 | { 162 | float newCost = costSoFar[current] + graph.Cost(current, next); 163 | 164 | if (!costSoFar.ContainsKey(next) || newCost < costSoFar[next]) 165 | { 166 | costSoFar[next] = newCost; 167 | float priority = newCost + heuristic(next, goal); 168 | open.Enqueue(next, priority); 169 | cameFrom[next] = current; 170 | } 171 | } 172 | } 173 | 174 | List path = null; 175 | 176 | if (cameFrom.ContainsKey(goal)) 177 | { 178 | path = new List(); 179 | 180 | Vector3Int v = goal; 181 | 182 | while (v != start) 183 | { 184 | RemoveDuplicates(path, v); 185 | path.Add(v); 186 | v = cameFrom[v]; 187 | } 188 | 189 | RemoveDuplicates(path, start); 190 | path.Add(start); 191 | 192 | path.Reverse(); 193 | } 194 | 195 | return path; 196 | } 197 | 198 | static void RemoveDuplicates(List path, Vector3Int v) 199 | { 200 | if (path.Count >= 2) 201 | { 202 | Vector3Int last = path[path.Count - 1]; 203 | Vector3Int secondLast = path[path.Count - 2]; 204 | 205 | Vector3Int dir1 = last - secondLast; 206 | dir1.Clamp(Vector3Int.one * -1, Vector3Int.one); 207 | 208 | Vector3Int dir2 = v - last; 209 | dir2.Clamp(Vector3Int.one * -1, Vector3Int.one); 210 | 211 | if (dir1 == dir2) 212 | { 213 | path.RemoveAt(path.Count - 1); 214 | } 215 | } 216 | } 217 | } 218 | } -------------------------------------------------------------------------------- /Assets/Scripts/Pathfinding/AStar.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 55dee471a94294f38ba574089e7d281c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Pathfinding/Graph.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections.Generic; 3 | using UnityEngine.Tilemaps; 4 | 5 | namespace Toolbox 6 | { 7 | /// 8 | /// A graph interface for use with A* Search. 9 | /// 10 | public interface IGraph 11 | { 12 | IEnumerable Neighbors(Vector3Int v); 13 | float Cost(Vector3Int a, Vector3Int b); 14 | } 15 | 16 | /// 17 | /// A graph based off a tilemap where you can move in up, down, left, and right. 18 | /// 19 | public class FourDirectionGraph : IGraph 20 | { 21 | Tilemap map; 22 | 23 | /// 24 | /// Creates a new FourDirectionalGraph using the tilemap's cell bounds 25 | /// as the graph bounds. If the tilemap does not have tiles on its 26 | /// intended boundary then the graph bounds could be smaller than it 27 | /// should be. 28 | /// 29 | public FourDirectionGraph(Tilemap map) 30 | { 31 | this.map = map; 32 | } 33 | 34 | public IEnumerable Neighbors(Vector3Int v) 35 | { 36 | foreach (Vector3Int dir in Utils.FourDirections) 37 | { 38 | Vector3Int next = v + dir; 39 | 40 | if (map.IsCellEmpty(next)) 41 | { 42 | yield return next; 43 | } 44 | } 45 | } 46 | 47 | public float Cost(Vector3Int a, Vector3Int b) 48 | { 49 | return Vector3Int.Distance(a, b); 50 | } 51 | } 52 | 53 | /// 54 | /// Creates a Graph where characters can move in all 8 directions but cannot 55 | /// go diagonal if it is across a corner. 56 | /// 57 | public class MoveGraph : IGraph 58 | { 59 | Tilemap map; 60 | 61 | public MoveGraph(Tilemap map) 62 | { 63 | this.map = map; 64 | } 65 | 66 | public IEnumerable Neighbors(Vector3Int v) 67 | { 68 | foreach (Vector3Int dir in Utils.FourDirections) 69 | { 70 | Vector3Int next = v + dir; 71 | 72 | if (map.IsCellEmpty(next)) 73 | { 74 | yield return next; 75 | } 76 | } 77 | 78 | foreach (Vector3Int dir in Utils.DiagonalDirections) 79 | { 80 | Vector3Int next = v + dir; 81 | 82 | if (map.IsCellEmpty(next)) 83 | { 84 | Vector3Int adjacent1 = v + new Vector3Int(dir.x, 0, 0); 85 | Vector3Int adjacent2 = v + new Vector3Int(0, dir.y, 0); 86 | 87 | if (map.IsCellEmpty(adjacent1) && map.IsCellEmpty(adjacent2)) 88 | { 89 | yield return next; 90 | } 91 | } 92 | } 93 | } 94 | 95 | public float Cost(Vector3Int a, Vector3Int b) 96 | { 97 | return Vector3Int.Distance(a, b); 98 | } 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /Assets/Scripts/Pathfinding/Graph.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8c3b27174541441529036e4c39b7c062 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Pathfinding/Heuristic.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Toolbox 4 | { 5 | /// 6 | /// A collection of heuristics used in A* Search. 7 | /// 8 | public static class Heuristic 9 | { 10 | public static float ManhattanDist(Vector3Int a, Vector3Int b) 11 | { 12 | return Mathf.Abs(a.x - b.x) + Mathf.Abs(a.y - b.y); 13 | } 14 | 15 | static readonly float D = 1; 16 | static readonly float D2 = Mathf.Sqrt(2) * D; 17 | 18 | public static float DiagonalDist(Vector3Int a, Vector3Int b) 19 | { 20 | float dx = Mathf.Abs(a.x - b.x); 21 | float dy = Mathf.Abs(a.y - b.y); 22 | return D * (dx + dy) + (D2 - 2 * D) * Mathf.Min(dx, dy); 23 | } 24 | 25 | public static float EuclideanDist(Vector3Int a, Vector3Int b) 26 | { 27 | return Vector3Int.Distance(a, b); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /Assets/Scripts/Pathfinding/Heuristic.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d974fc45dd8044ddebe8039aa002434e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Pathfinding/LinePath.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | namespace Toolbox 5 | { 6 | /// 7 | /// Line path represents a path of line segments. 8 | /// 9 | [System.Serializable] 10 | public class LinePath 11 | { 12 | public Vector3[] nodes; 13 | 14 | public float MaxDist { get; private set; } 15 | 16 | [System.NonSerialized] 17 | public float[] distances; 18 | 19 | /* Indexer declaration. */ 20 | public Vector3 this[int i] 21 | { 22 | get 23 | { 24 | return nodes[i]; 25 | } 26 | 27 | set 28 | { 29 | nodes[i] = value; 30 | } 31 | } 32 | 33 | public int Length 34 | { 35 | get 36 | { 37 | return nodes.Length; 38 | } 39 | } 40 | 41 | public Vector3 EndNode 42 | { 43 | get 44 | { 45 | return nodes[nodes.Length - 1]; 46 | } 47 | } 48 | 49 | public LinePath(Vector3[] nodes) 50 | { 51 | this.nodes = nodes; 52 | 53 | CalcDistances(); 54 | } 55 | 56 | public LinePath(List nodes) 57 | { 58 | this.nodes = nodes.ToArray(); 59 | 60 | CalcDistances(); 61 | } 62 | 63 | /// 64 | /// Loops through the path's nodes and determines how far each node in 65 | /// the path is from the starting node. 66 | /// 67 | public void CalcDistances() 68 | { 69 | distances = new float[nodes.Length]; 70 | distances[0] = 0; 71 | 72 | for (var i = 0; i < nodes.Length - 1; i++) 73 | { 74 | distances[i + 1] = distances[i] + Vector3.Distance(nodes[i], nodes[i + 1]); 75 | } 76 | 77 | MaxDist = distances[distances.Length - 1]; 78 | } 79 | 80 | /// 81 | /// Draws the path in the scene view 82 | /// 83 | public void Draw() 84 | { 85 | for (int i = 0; i < nodes.Length - 1; i++) 86 | { 87 | Debug.DrawLine(nodes[i], nodes[i + 1], Color.cyan, 0.0f, false); 88 | } 89 | } 90 | 91 | /// 92 | /// Gets the param for the closest point on the path given a position. 93 | /// 94 | public float GetParam(Vector3 position) 95 | { 96 | /* Find the first point in the closest line segment to the path */ 97 | float closestDist = DistToSegment(position, nodes[0], nodes[1]); 98 | int closestSegment = 0; 99 | 100 | for (int i = 1; i < nodes.Length - 1; i++) 101 | { 102 | float dist = DistToSegment(position, nodes[i], nodes[i + 1]); 103 | 104 | if (dist <= closestDist) 105 | { 106 | closestDist = dist; 107 | closestSegment = i; 108 | } 109 | } 110 | 111 | float param = distances[closestSegment] + GetParamForSegment(position, nodes[closestSegment], nodes[closestSegment + 1]); 112 | 113 | return param; 114 | } 115 | 116 | /// 117 | /// Given a param it gets the position on the path. 118 | /// 119 | public Vector3 GetPosition(float param, bool pathLoop = false) 120 | { 121 | /* Make sure the param is not past the beginning or end of the path */ 122 | if (param < 0) 123 | { 124 | param = (pathLoop) ? param + MaxDist : 0; 125 | } 126 | else if (param > MaxDist) 127 | { 128 | param = (pathLoop) ? param - MaxDist : MaxDist; 129 | } 130 | 131 | /* Find the first node that is farther than given param */ 132 | int i = 0; 133 | for (; i < distances.Length; i++) 134 | { 135 | if (distances[i] > param) 136 | { 137 | break; 138 | } 139 | } 140 | 141 | /* Convert it to the first node of the line segment that the param is in */ 142 | if (i > distances.Length - 2) 143 | { 144 | i = distances.Length - 2; 145 | } 146 | else 147 | { 148 | i -= 1; 149 | } 150 | 151 | /* Get how far along the line segment the param is */ 152 | float t = (param - distances[i]) / Vector3.Distance(nodes[i], nodes[i + 1]); 153 | 154 | /* Get the position of the param */ 155 | return Vector3.Lerp(nodes[i], nodes[i + 1], t); 156 | } 157 | 158 | /// 159 | /// Gives the distance of a point to a line segment. 160 | /// 161 | /// p is the point 162 | /// v is one point of the line segment 163 | /// w is the other point of the line segment 164 | static float DistToSegment(Vector3 p, Vector3 v, Vector3 w) 165 | { 166 | Vector3 vw = w - v; 167 | 168 | float l2 = Vector3.Dot(vw, vw); 169 | 170 | if (Mathf.Approximately(l2, 0)) 171 | { 172 | return Vector3.Distance(p, v); 173 | } 174 | 175 | float t = Vector3.Dot(p - v, vw) / l2; 176 | 177 | if (t < 0) 178 | { 179 | return Vector3.Distance(p, v); 180 | } 181 | 182 | if (t > 1) 183 | { 184 | return Vector3.Distance(p, w); 185 | } 186 | 187 | Vector3 closestPoint = Vector3.Lerp(v, w, t); 188 | 189 | return Vector3.Distance(p, closestPoint); 190 | } 191 | 192 | /// 193 | /// Finds the param for the closest point on the segment vw given the point p. 194 | /// 195 | static float GetParamForSegment(Vector3 p, Vector3 v, Vector3 w) 196 | { 197 | Vector3 vw = w - v; 198 | 199 | float l2 = Vector3.Dot(vw, vw); 200 | 201 | if (Mathf.Approximately(l2, 0)) 202 | { 203 | return 0; 204 | } 205 | 206 | float t = Vector3.Dot(p - v, vw) / l2; 207 | 208 | if (t < 0) 209 | { 210 | t = 0; 211 | } 212 | else if (t > 1) 213 | { 214 | t = 1; 215 | } 216 | 217 | return t * Mathf.Sqrt(l2); 218 | } 219 | 220 | public void RemoveNode(int i) 221 | { 222 | Vector3[] newNodes = new Vector3[nodes.Length - 1]; 223 | 224 | int newNodesIndex = 0; 225 | for (int j = 0; j < newNodes.Length; j++) 226 | { 227 | if (j != i) 228 | { 229 | newNodes[newNodesIndex] = nodes[j]; 230 | newNodesIndex++; 231 | } 232 | } 233 | 234 | nodes = newNodes; 235 | 236 | CalcDistances(); 237 | } 238 | } 239 | } -------------------------------------------------------------------------------- /Assets/Scripts/Pathfinding/LinePath.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ae4658877185d4796887631499ffb7a7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Pathfinding/PriorityQueue.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Toolbox 4 | { 5 | public class PriorityQueue 6 | { 7 | private List> list = new List>(); 8 | 9 | public int Count 10 | { 11 | get 12 | { 13 | return list.Count; 14 | } 15 | } 16 | 17 | public void Enqueue(T item, float priority) 18 | { 19 | list.Add(new Tuple(item, priority)); 20 | } 21 | 22 | public T Dequeue() 23 | { 24 | T result = default(T); 25 | 26 | if (list.Count > 0) 27 | { 28 | int index = 0; 29 | 30 | for (int i = 0; i < list.Count; i++) 31 | { 32 | if (list[i].priority < list[index].priority) 33 | { 34 | index = i; 35 | } 36 | } 37 | 38 | result = list[index].item; 39 | list.RemoveAt(index); 40 | } 41 | 42 | return result; 43 | } 44 | } 45 | 46 | struct Tuple 47 | { 48 | public T item; 49 | public float priority; 50 | 51 | public Tuple(T item, float priority) 52 | { 53 | this.item = item; 54 | this.priority = priority; 55 | } 56 | } 57 | } -------------------------------------------------------------------------------- /Assets/Scripts/Pathfinding/PriorityQueue.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f4bd26183d41547cfa871d3a0f9c374f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Pathfinding/TilemapBreadthFirst.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using UnityEngine; 5 | using UnityEngine.Tilemaps; 6 | 7 | namespace Toolbox 8 | { 9 | public static class TilemapBreadthFirst 10 | { 11 | /// 12 | /// A Breadth First Search of nodes in a grid. 13 | /// 14 | /// Starting position of the search 15 | /// The directions the traversal can go to find connected nodes 16 | /// A function to decide if the goal of the search has been found 17 | /// A function to decide if the next node is connected to the current node 18 | public static Vector3Int? BreadthFirstSearch(Vector3Int position, Vector3Int[] directions, Func isGoal, Func isConnected) 19 | { 20 | Queue queue = new Queue(); 21 | queue.Enqueue(position); 22 | 23 | HashSet visited = new HashSet(); 24 | 25 | while (queue.Count > 0) 26 | { 27 | Vector3Int node = queue.Dequeue(); 28 | 29 | if (isGoal(node)) 30 | { 31 | return node; 32 | } 33 | 34 | foreach (Vector3Int dir in directions) 35 | { 36 | Vector3Int next = node + dir; 37 | 38 | if (isConnected(node, next) && !visited.Contains(next)) 39 | { 40 | queue.Enqueue(next); 41 | } 42 | } 43 | 44 | visited.Add(node); 45 | } 46 | 47 | return null; 48 | } 49 | 50 | /// 51 | /// A Breadth First Search of nodes in a grid. 52 | /// 53 | /// Starting position of the search 54 | /// The directions the traversal can go to find connected nodes 55 | /// A function to decide if the goal of the search has been found 56 | /// A function to decide if the next node is connected to the current node 57 | public static Vector3Int? BreadthFirstSearch(this Tilemap tilemap, Vector3Int position, Vector3Int[] directions, Func isGoal, Func isConnected) 58 | { 59 | return BreadthFirstSearch(position, directions, isGoal, isConnected); 60 | } 61 | 62 | /// 63 | /// A Breadth First Search of nodes in a grid. 64 | /// 65 | /// Starting position of the search 66 | /// The directions the traversal can go to find connected nodes 67 | /// A function to decide if the goal of the search has been found 68 | /// A function to decide if the next node is connected to the current node 69 | public static Vector3? BreadthFirstSearch(this Tilemap tilemap, Vector3 position, Vector3Int[] directions, Func isGoal, Func isConnected) 70 | { 71 | Vector3Int start = tilemap.WorldToCell(position); 72 | 73 | Vector3Int? resultInt = BreadthFirstSearch(start, directions, isGoal, isConnected); 74 | 75 | Vector3? result = null; 76 | 77 | if (resultInt.HasValue) 78 | { 79 | result = tilemap.GetCellCenterWorld(resultInt.Value); 80 | } 81 | 82 | return result; 83 | } 84 | 85 | /// 86 | /// A Breadth First Search of nodes in a grid. 87 | /// 88 | /// Starting position of the search 89 | /// A function to decide if the goal of the search has been found 90 | /// A function to decide if the next node is connected to the current node 91 | public static Vector3Int? BreadthFirstSearch(this Tilemap tilemap, Vector3Int position, Func isGoal, Func isConnected) 92 | { 93 | return BreadthFirstSearch(position, Utils.FourDirections, isGoal, isConnected); 94 | } 95 | 96 | /// 97 | /// A Breadth First Search of nodes in a grid. 98 | /// 99 | /// Starting position of the search 100 | /// A function to decide if the goal of the search has been found 101 | /// A function to decide if the next node is connected to the current node 102 | public static Vector3? BreadthFirstSearch(this Tilemap tilemap, Vector3 position, Func isGoal, Func isConnected) 103 | { 104 | Vector3Int start = tilemap.WorldToCell(position); 105 | 106 | Vector3Int? resultInt = BreadthFirstSearch(start, Utils.FourDirections, isGoal, isConnected); 107 | 108 | Vector3? result = null; 109 | 110 | if (resultInt.HasValue) 111 | { 112 | result = tilemap.GetCellCenterWorld(resultInt.Value); 113 | } 114 | 115 | return result; 116 | } 117 | 118 | public static Vector3? ClosestEmptyCell(this Tilemap tilemap, Vector3 position, Vector3Int[] directions) 119 | { 120 | return tilemap.BreadthFirstSearch( 121 | position, 122 | directions, 123 | tilemap.IsCellEmpty, 124 | (current, next) => true 125 | ); 126 | } 127 | 128 | public static Vector3? ClosestEmptyCell(this Tilemap tilemap, Vector3 position) 129 | { 130 | return tilemap.ClosestEmptyCell(position, Utils.FourDirections); 131 | } 132 | 133 | /// 134 | /// A Breadth First Traversal of nodes in a grid. 135 | /// 136 | /// Starting position of the traversal 137 | /// The directions the traversal can go to find connected nodes 138 | /// A function to decide if the next node is connected to the current node 139 | public static List BreadthFirstTraversal(Vector3Int position, Vector3Int[] directions, Func isConnected) 140 | { 141 | Queue queue = new Queue(); 142 | queue.Enqueue(position); 143 | 144 | HashSet visited = new HashSet(); 145 | 146 | while (queue.Count > 0) 147 | { 148 | Vector3Int node = queue.Dequeue(); 149 | 150 | foreach (Vector3Int dir in directions) 151 | { 152 | Vector3Int next = node + dir; 153 | 154 | if (isConnected(node, next) && !visited.Contains(next)) 155 | { 156 | queue.Enqueue(next); 157 | } 158 | } 159 | 160 | visited.Add(node); 161 | } 162 | 163 | return visited.ToList(); 164 | } 165 | 166 | /// 167 | /// A Breadth First Traversal of nodes in a grid. 168 | /// 169 | /// Starting position of the traversal 170 | /// The directions the traversal can go to find connected nodes 171 | /// A function to decide if the next node is connected to the current node 172 | public static List BreadthFirstTraversal(this Tilemap tilemap, Vector3Int position, Vector3Int[] directions, Func isConnected) 173 | { 174 | return BreadthFirstTraversal(position, directions, isConnected); 175 | } 176 | 177 | /// 178 | /// A Breadth First Traversal of nodes in a grid. 179 | /// 180 | /// Starting position of the traversal 181 | /// The directions the traversal can go to find connected nodes 182 | /// A function to decide if the next node is connected to the current node 183 | public static List BreadthFirstTraversal(this Tilemap tilemap, Vector3 position, Vector3Int[] directions, Func isConnected) 184 | { 185 | Vector3Int start = tilemap.WorldToCell(position); 186 | 187 | List positions = BreadthFirstTraversal(start, directions, isConnected); 188 | 189 | return positions.Select(p => tilemap.GetCellCenterWorld(p)).ToList(); 190 | } 191 | 192 | /// 193 | /// A Breadth First Traversal of nodes in a grid. 194 | /// 195 | /// Starting position of the traversal 196 | /// A function to decide if the next node is connected to the current node 197 | public static List BreadthFirstTraversal(this Tilemap tilemap, Vector3Int position, Func isConnected) 198 | { 199 | return BreadthFirstTraversal(position, Utils.FourDirections, isConnected); 200 | } 201 | 202 | /// 203 | /// A Breadth First Traversal of nodes in a grid. 204 | /// 205 | /// Starting position of the traversal 206 | /// A function to decide if the next node is connected to the current node 207 | public static List BreadthFirstTraversal(this Tilemap tilemap, Vector3 position, Func isConnected) 208 | { 209 | return tilemap.BreadthFirstTraversal(position, Utils.FourDirections, isConnected); 210 | } 211 | } 212 | } -------------------------------------------------------------------------------- /Assets/Scripts/Pathfinding/TilemapBreadthFirst.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3915a39669e1f48d195bd1ffa4ad1e09 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Pathfinding/TilemapExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | using UnityEngine.Tilemaps; 4 | 5 | namespace Toolbox 6 | { 7 | public static class TilemapExtensions 8 | { 9 | public static TileBase GetTile(this Tilemap tilemap, Vector3 position) 10 | { 11 | Vector3Int pos = tilemap.WorldToCell(position); 12 | return tilemap.GetTile(pos); 13 | } 14 | 15 | public static void CopyBounds(this Tilemap tilemap, Tilemap other) 16 | { 17 | tilemap.origin = other.origin; 18 | tilemap.size = other.size; 19 | } 20 | 21 | public static bool IsInBounds(this Tilemap tilemap, Vector3Int position) 22 | { 23 | return tilemap.cellBounds.Contains(position); 24 | } 25 | 26 | public static bool IsInBounds(this Tilemap tilemap, Vector3 position) 27 | { 28 | Vector3Int pos = tilemap.WorldToCell(position); 29 | return tilemap.cellBounds.Contains(pos); 30 | } 31 | 32 | /// 33 | /// Checks if the cell is in bounds and is not set with a tile. 34 | /// 35 | public static bool IsCellEmpty(this Tilemap tilemap, Vector3Int position) 36 | { 37 | return tilemap.IsInBounds(position) && tilemap.GetTile(position) == null; 38 | } 39 | 40 | /// 41 | /// Checks if the cell is in bounds and is not set with a tile. 42 | /// 43 | public static bool IsCellEmpty(this Tilemap tilemap, Vector3 position) 44 | { 45 | Vector3Int pos = tilemap.WorldToCell(position); 46 | return tilemap.IsInBounds(pos) && tilemap.GetTile(pos) == null; 47 | } 48 | 49 | public static List GetCellCenterWorld(this Tilemap tilemap, List path) 50 | { 51 | List result = null; 52 | 53 | if (path != null) 54 | { 55 | result = new List(path.Capacity); 56 | 57 | foreach (Vector3Int v in path) 58 | { 59 | result.Add(tilemap.GetCellCenterWorld(v)); 60 | } 61 | } 62 | 63 | return result; 64 | } 65 | 66 | public static Vector3Int MousePositionToCell(this Tilemap tilemap) 67 | { 68 | return tilemap.WorldToCell(Camera.main.ScreenToWorldPoint(Input.mousePosition)); 69 | } 70 | 71 | public static T GetComponentAtCell(this Tilemap tilemap, Vector3Int position) 72 | { 73 | Vector3 worldPos = tilemap.GetCellCenterWorld(position); 74 | return Utils.GetComponentAtPosition2D(worldPos); 75 | } 76 | 77 | public static void DebugDraw(this Tilemap tilemap, float size, Color color = default(Color), float duration = 0.0f, bool depthTest = true) 78 | { 79 | BoundsInt bounds = tilemap.cellBounds; 80 | TileBase[] allTiles = tilemap.GetTilesBlock(bounds); 81 | 82 | for (int x = 0; x < bounds.size.x; x++) 83 | { 84 | for (int y = 0; y < bounds.size.y; y++) 85 | { 86 | TileBase tile = allTiles[x + y * bounds.size.x]; 87 | 88 | if (tile != null) 89 | { 90 | Vector3Int cell = new Vector3Int(bounds.x + x, bounds.y + y, bounds.z); 91 | Vector3 pos = tilemap.GetCellCenterWorld(cell); 92 | 93 | Utils.DebugDrawCross(pos, size, color, duration, depthTest); 94 | } 95 | } 96 | } 97 | } 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /Assets/Scripts/Pathfinding/TilemapExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 062b75a64d8ba4f85afc2fc8f0058235 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Pathfinding/Utils.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using UnityEngine; 4 | 5 | namespace Toolbox 6 | { 7 | public static class Utils 8 | { 9 | public const float Epsilon = 0.00001f; 10 | 11 | public static readonly Vector3Int[] FourDirections = 12 | { 13 | new Vector3Int(1, 0, 0), 14 | new Vector3Int(0, -1, 0), 15 | new Vector3Int(-1, 0, 0), 16 | new Vector3Int(0, 1, 0) 17 | }; 18 | 19 | public static readonly Vector3Int[] EightDirections = 20 | { 21 | new Vector3Int(1, 0, 0), 22 | new Vector3Int(1, -1, 0), 23 | new Vector3Int(0, -1, 0), 24 | new Vector3Int(-1, -1, 0), 25 | new Vector3Int(-1, 0, 0), 26 | new Vector3Int(-1, 1, 0), 27 | new Vector3Int(0, 1, 0), 28 | new Vector3Int(1, 1, 0) 29 | }; 30 | 31 | public static readonly Vector3Int[] DiagonalDirections = 32 | { 33 | new Vector3Int(1, -1, 0), 34 | new Vector3Int(-1, -1, 0), 35 | new Vector3Int(-1, 1, 0), 36 | new Vector3Int(1, 1, 0) 37 | }; 38 | 39 | public static bool IsZero(float f) 40 | { 41 | return System.Math.Abs(f) < Epsilon; 42 | } 43 | 44 | public static float Sign(float f) 45 | { 46 | return IsZero(f) ? 0 : Mathf.Sign(f); 47 | } 48 | 49 | /// 50 | /// Converts the vector to an angle in radians. 51 | /// 52 | public static float Vector2ToAngle(Vector2 v) 53 | { 54 | return Mathf.Atan2(v.y, v.x); 55 | } 56 | 57 | /// 58 | /// Converts the angle in radians to a vector. 59 | /// 60 | public static Vector2 AngleToVector2(float angle) 61 | { 62 | return new Vector2(Mathf.Cos(angle), Mathf.Sin(angle)); 63 | } 64 | 65 | public static float RandomBinomial() 66 | { 67 | return Random.value - Random.value; 68 | } 69 | 70 | public static T GetComponentAtMouse3D() 71 | { 72 | T target = default(T); 73 | 74 | Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); 75 | RaycastHit hit; 76 | 77 | if (Physics.Raycast(ray, out hit, float.PositiveInfinity)) 78 | { 79 | target = hit.transform.GetComponentInParent(); 80 | } 81 | 82 | return target; 83 | } 84 | 85 | public static T GetComponentAtPosition3D(Vector3 position) 86 | { 87 | T target = default(T); 88 | 89 | Collider[] colliders = Physics.OverlapSphere(position, 0.01f); 90 | 91 | if (colliders.Length > 0) 92 | { 93 | target = colliders[0].GetComponentInParent(); 94 | } 95 | 96 | return target; 97 | } 98 | 99 | public static T GetComponentAtMouse2D() 100 | { 101 | Vector3 worldPoint = Camera.main.ScreenToWorldPoint(Input.mousePosition); 102 | return GetComponentAtPosition2D(worldPoint); 103 | } 104 | 105 | public static T GetComponentAtPosition2D(Vector3 position) 106 | { 107 | T target = default(T); 108 | 109 | Collider2D col = Physics2D.OverlapPoint(position); 110 | 111 | if (col != null) 112 | { 113 | target = col.GetComponentInParent(); 114 | } 115 | 116 | return target; 117 | } 118 | 119 | /// 120 | /// Casts a 3D ray with queriesHitBackfaces set to false for just 121 | /// the raycast without affecting the project setting. 122 | /// 123 | public static bool Raycast(Vector3 origin, Vector3 direction, out RaycastHit hitInfo, float distance, int layerMask) 124 | { 125 | bool origQueriesHitBackfaces = Physics.queriesHitBackfaces; 126 | Physics.queriesHitBackfaces = false; 127 | 128 | bool result = Physics.Raycast(origin, direction, out hitInfo, distance, layerMask); 129 | 130 | Physics.queriesHitBackfaces = origQueriesHitBackfaces; 131 | 132 | return result; 133 | } 134 | 135 | /// 136 | /// Casts a 3D ray with queriesHitBackfaces set to false for just 137 | /// the raycast without affecting the project setting. 138 | /// 139 | public static bool Raycast(Vector3 start, Vector3 end, out RaycastHit hitInfo, int layerMask) 140 | { 141 | Vector3 dir = end - start; 142 | return Raycast(start, dir, out hitInfo, dir.magnitude, layerMask); 143 | } 144 | 145 | /// 146 | /// Casts a sphere with queriesHitBackfaces set to false for just 147 | /// the sphere cast without affecting the project setting. 148 | /// 149 | public static bool SphereCast(Vector3 origin, float radius, Vector3 direction, out RaycastHit hitInfo, float distance, int layerMask) 150 | { 151 | bool origQueriesHitBackfaces = Physics.queriesHitBackfaces; 152 | Physics.queriesHitBackfaces = false; 153 | 154 | bool result = Physics.SphereCast(origin, radius, direction, out hitInfo, distance, layerMask); 155 | 156 | Physics.queriesHitBackfaces = origQueriesHitBackfaces; 157 | 158 | return result; 159 | } 160 | 161 | public static bool SphereCast(Vector3 start, Vector3 end, float radius, out RaycastHit hitInfo, int layerMask) 162 | { 163 | Vector3 dir = end - start; 164 | return SphereCast(start, radius, dir, out hitInfo, dir.magnitude, layerMask); 165 | } 166 | 167 | /// 168 | /// Casts a 2D ray with queriesStartInColliders set to false for just 169 | /// the raycast without affecting the project setting. 170 | /// 171 | public static RaycastHit2D Raycast2D(Vector2 origin, Vector2 direction, float distance, int layerMask) 172 | { 173 | bool origQueriesStartInColliders = Physics2D.queriesStartInColliders; 174 | Physics2D.queriesStartInColliders = false; 175 | 176 | RaycastHit2D hit = Physics2D.Raycast(origin, direction, distance, layerMask); 177 | 178 | Physics2D.queriesStartInColliders = origQueriesStartInColliders; 179 | 180 | return hit; 181 | } 182 | 183 | /// 184 | /// Casts a 2D ray with queriesStartInColliders set to false for just 185 | /// the raycast without affecting the project setting. 186 | /// 187 | public static RaycastHit2D Raycast2D(Vector2 start, Vector2 end, int layerMask) 188 | { 189 | Vector2 dir = end - start; 190 | return Raycast2D(start, dir, dir.magnitude, layerMask); 191 | } 192 | 193 | /// 194 | /// Casts a circle with queriesStartInColliders set to false for just 195 | /// the circle cast without affecting the project setting. 196 | /// 197 | public static RaycastHit2D CircleCast(Vector2 origin, float radius, Vector2 direction, float distance, int layerMask) 198 | { 199 | bool origQueriesStartInColliders = Physics2D.queriesStartInColliders; 200 | Physics2D.queriesStartInColliders = false; 201 | 202 | RaycastHit2D hit = Physics2D.CircleCast(origin, radius, direction, distance, layerMask); 203 | 204 | Physics2D.queriesStartInColliders = origQueriesStartInColliders; 205 | 206 | return hit; 207 | } 208 | 209 | /// 210 | /// Casts a circle with queriesStartInColliders set to false for just 211 | /// the circle cast without affecting the project setting. 212 | /// 213 | public static RaycastHit2D CircleCast(Vector2 start, Vector2 end, float radius, int layerMask) 214 | { 215 | Vector2 dir = end - start; 216 | return CircleCast(start, radius, dir, dir.magnitude, layerMask); 217 | } 218 | 219 | public static void DebugDrawCross(Vector3 position, float size, Color color = default(Color), float duration = 0.0f, bool depthTest = true) 220 | { 221 | Debug.DrawRay(position - Vector3.right * size / 2, Vector3.right * size, color, duration, depthTest); 222 | Debug.DrawRay(position - Vector3.down * size / 2, Vector3.down * size, color, duration, depthTest); 223 | Debug.DrawRay(position - Vector3.forward * size / 2, Vector3.forward * size, color, duration, depthTest); 224 | } 225 | } 226 | } -------------------------------------------------------------------------------- /Assets/Scripts/Pathfinding/Utils.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5e7d46f762c3e4336ba42d8b150c11b2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/PerlinNoiseGrid.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class PerlinNoiseGrid 4 | { 5 | public int width; 6 | public int height; 7 | public Vector2 offset; 8 | public Vector2 scale; 9 | 10 | public float this[int x, int y] 11 | { 12 | get 13 | { 14 | float i = offset.x + (float)x / width * scale.x; 15 | float j = offset.y + (float)y / height * scale.y; 16 | 17 | return Mathf.PerlinNoise(i, j); 18 | } 19 | } 20 | 21 | public PerlinNoiseGrid(int width, int height, float perlinScale) 22 | { 23 | this.width = width; 24 | this.height = height; 25 | 26 | offset = new Vector2(Random.value * 100000, Random.value * 100000); 27 | 28 | float rAspect = (float)width / height; 29 | scale = new Vector2(perlinScale * rAspect, perlinScale); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Assets/Scripts/PerlinNoiseGrid.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 22808a6a847fd4cc3a25f5d797f1b46e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Tiles.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 00b0de2a02b3d465aac846b53c0114e9 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2117ee88794d64b719100a84ebf3746c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/01-Black.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_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 1 11 | m_Script: {fileID: 13312, guid: 0000000000000000e000000000000000, type: 0} 12 | m_Name: 01-Black 13 | m_EditorClassIdentifier: 14 | m_Sprite: {fileID: 21300000, guid: a8e6ca393c0c344148ed2a473d639d9c, type: 3} 15 | m_Color: {r: 0, g: 0, b: 0, a: 1} 16 | m_Transform: 17 | e00: 1 18 | e01: 0 19 | e02: 0 20 | e03: 0 21 | e10: 0 22 | e11: 1 23 | e12: 0 24 | e13: 0 25 | e20: 0 26 | e21: 0 27 | e22: 1 28 | e23: 0 29 | e30: 0 30 | e31: 0 31 | e32: 0 32 | e33: 1 33 | m_InstancedGameObject: {fileID: 0} 34 | m_Flags: 1 35 | m_ColliderType: 1 36 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/01-Black.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 95e7e5fa3894d4cc194a5a2e71c98f56 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/02-DarkBlue.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_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 1 11 | m_Script: {fileID: 13312, guid: 0000000000000000e000000000000000, type: 0} 12 | m_Name: 02-DarkBlue 13 | m_EditorClassIdentifier: 14 | m_Sprite: {fileID: 21300000, guid: a8e6ca393c0c344148ed2a473d639d9c, type: 3} 15 | m_Color: {r: 0.11764706, g: 0.16470589, b: 0.32156864, a: 1} 16 | m_Transform: 17 | e00: 1 18 | e01: 0 19 | e02: 0 20 | e03: 0 21 | e10: 0 22 | e11: 1 23 | e12: 0 24 | e13: 0 25 | e20: 0 26 | e21: 0 27 | e22: 1 28 | e23: 0 29 | e30: 0 30 | e31: 0 31 | e32: 0 32 | e33: 1 33 | m_InstancedGameObject: {fileID: 0} 34 | m_Flags: 1 35 | m_ColliderType: 1 36 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/02-DarkBlue.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 496421e6f8447401d9930ed7723ffcc3 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/03-DarkPurple.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_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 1 11 | m_Script: {fileID: 13312, guid: 0000000000000000e000000000000000, type: 0} 12 | m_Name: 03-DarkPurple 13 | m_EditorClassIdentifier: 14 | m_Sprite: {fileID: 21300000, guid: a8e6ca393c0c344148ed2a473d639d9c, type: 3} 15 | m_Color: {r: 0.49411765, g: 0.13333334, b: 0.32156864, a: 1} 16 | m_Transform: 17 | e00: 1 18 | e01: 0 19 | e02: 0 20 | e03: 0 21 | e10: 0 22 | e11: 1 23 | e12: 0 24 | e13: 0 25 | e20: 0 26 | e21: 0 27 | e22: 1 28 | e23: 0 29 | e30: 0 30 | e31: 0 31 | e32: 0 32 | e33: 1 33 | m_InstancedGameObject: {fileID: 0} 34 | m_Flags: 1 35 | m_ColliderType: 1 36 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/03-DarkPurple.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5dda1ad8bb21d433397bc76af9aa2a70 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/04-DarkGreen.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_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 1 11 | m_Script: {fileID: 13312, guid: 0000000000000000e000000000000000, type: 0} 12 | m_Name: 04-DarkGreen 13 | m_EditorClassIdentifier: 14 | m_Sprite: {fileID: 21300000, guid: a8e6ca393c0c344148ed2a473d639d9c, type: 3} 15 | m_Color: {r: 0, g: 0.53333336, b: 0.32941177, a: 1} 16 | m_Transform: 17 | e00: 1 18 | e01: 0 19 | e02: 0 20 | e03: 0 21 | e10: 0 22 | e11: 1 23 | e12: 0 24 | e13: 0 25 | e20: 0 26 | e21: 0 27 | e22: 1 28 | e23: 0 29 | e30: 0 30 | e31: 0 31 | e32: 0 32 | e33: 1 33 | m_InstancedGameObject: {fileID: 0} 34 | m_Flags: 1 35 | m_ColliderType: 1 36 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/04-DarkGreen.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c84548e4905cf45198a87f3d85d3ae3e 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/05-Brown.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_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 1 11 | m_Script: {fileID: 13312, guid: 0000000000000000e000000000000000, type: 0} 12 | m_Name: 05-Brown 13 | m_EditorClassIdentifier: 14 | m_Sprite: {fileID: 21300000, guid: a8e6ca393c0c344148ed2a473d639d9c, type: 3} 15 | m_Color: {r: 0.67058825, g: 0.31764707, b: 0.21960784, a: 1} 16 | m_Transform: 17 | e00: 1 18 | e01: 0 19 | e02: 0 20 | e03: 0 21 | e10: 0 22 | e11: 1 23 | e12: 0 24 | e13: 0 25 | e20: 0 26 | e21: 0 27 | e22: 1 28 | e23: 0 29 | e30: 0 30 | e31: 0 31 | e32: 0 32 | e33: 1 33 | m_InstancedGameObject: {fileID: 0} 34 | m_Flags: 1 35 | m_ColliderType: 1 36 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/05-Brown.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 207ea1163a1f54adba00aceef5336fbe 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/06-DarkGray.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_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 1 11 | m_Script: {fileID: 13312, guid: 0000000000000000e000000000000000, type: 0} 12 | m_Name: 06-DarkGray 13 | m_EditorClassIdentifier: 14 | m_Sprite: {fileID: 21300000, guid: a8e6ca393c0c344148ed2a473d639d9c, type: 3} 15 | m_Color: {r: 0.37254903, g: 0.34117648, b: 0.30980393, a: 1} 16 | m_Transform: 17 | e00: 1 18 | e01: 0 19 | e02: 0 20 | e03: 0 21 | e10: 0 22 | e11: 1 23 | e12: 0 24 | e13: 0 25 | e20: 0 26 | e21: 0 27 | e22: 1 28 | e23: 0 29 | e30: 0 30 | e31: 0 31 | e32: 0 32 | e33: 1 33 | m_InstancedGameObject: {fileID: 0} 34 | m_Flags: 1 35 | m_ColliderType: 1 36 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/06-DarkGray.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d48b8e83b0bbc4b23a2f69ddc851a3a3 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/07-LightGray.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_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 1 11 | m_Script: {fileID: 13312, guid: 0000000000000000e000000000000000, type: 0} 12 | m_Name: 07-LightGray 13 | m_EditorClassIdentifier: 14 | m_Sprite: {fileID: 21300000, guid: a8e6ca393c0c344148ed2a473d639d9c, type: 3} 15 | m_Color: {r: 0.7647059, g: 0.7647059, b: 0.78039217, a: 1} 16 | m_Transform: 17 | e00: 1 18 | e01: 0 19 | e02: 0 20 | e03: 0 21 | e10: 0 22 | e11: 1 23 | e12: 0 24 | e13: 0 25 | e20: 0 26 | e21: 0 27 | e22: 1 28 | e23: 0 29 | e30: 0 30 | e31: 0 31 | e32: 0 32 | e33: 1 33 | m_InstancedGameObject: {fileID: 0} 34 | m_Flags: 1 35 | m_ColliderType: 1 36 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/07-LightGray.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9ae98a5647e204b7e9fcc525aacbef97 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/08-White.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_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 1 11 | m_Script: {fileID: 13312, guid: 0000000000000000e000000000000000, type: 0} 12 | m_Name: 08-White 13 | m_EditorClassIdentifier: 14 | m_Sprite: {fileID: 21300000, guid: a8e6ca393c0c344148ed2a473d639d9c, type: 3} 15 | m_Color: {r: 1, g: 0.94509804, b: 0.9098039, a: 1} 16 | m_Transform: 17 | e00: 1 18 | e01: 0 19 | e02: 0 20 | e03: 0 21 | e10: 0 22 | e11: 1 23 | e12: 0 24 | e13: 0 25 | e20: 0 26 | e21: 0 27 | e22: 1 28 | e23: 0 29 | e30: 0 30 | e31: 0 31 | e32: 0 32 | e33: 1 33 | m_InstancedGameObject: {fileID: 0} 34 | m_Flags: 1 35 | m_ColliderType: 1 36 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/08-White.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c3e2d11e3424e4563879cfd3d30685d1 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/09-Red.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_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 1 11 | m_Script: {fileID: 13312, guid: 0000000000000000e000000000000000, type: 0} 12 | m_Name: 09-Red 13 | m_EditorClassIdentifier: 14 | m_Sprite: {fileID: 21300000, guid: a8e6ca393c0c344148ed2a473d639d9c, type: 3} 15 | m_Color: {r: 1, g: 0, b: 0.29411766, a: 1} 16 | m_Transform: 17 | e00: 1 18 | e01: 0 19 | e02: 0 20 | e03: 0 21 | e10: 0 22 | e11: 1 23 | e12: 0 24 | e13: 0 25 | e20: 0 26 | e21: 0 27 | e22: 1 28 | e23: 0 29 | e30: 0 30 | e31: 0 31 | e32: 0 32 | e33: 1 33 | m_InstancedGameObject: {fileID: 0} 34 | m_Flags: 1 35 | m_ColliderType: 1 36 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/09-Red.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 124a77e38ff9b4d56915eb0cc90bc1f7 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/10-Orange.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_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 1 11 | m_Script: {fileID: 13312, guid: 0000000000000000e000000000000000, type: 0} 12 | m_Name: 10-Orange 13 | m_EditorClassIdentifier: 14 | m_Sprite: {fileID: 21300000, guid: a8e6ca393c0c344148ed2a473d639d9c, type: 3} 15 | m_Color: {r: 0.99607843, g: 0.6392157, b: 0.12941177, a: 1} 16 | m_Transform: 17 | e00: 1 18 | e01: 0 19 | e02: 0 20 | e03: 0 21 | e10: 0 22 | e11: 1 23 | e12: 0 24 | e13: 0 25 | e20: 0 26 | e21: 0 27 | e22: 1 28 | e23: 0 29 | e30: 0 30 | e31: 0 31 | e32: 0 32 | e33: 1 33 | m_InstancedGameObject: {fileID: 0} 34 | m_Flags: 1 35 | m_ColliderType: 1 36 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/10-Orange.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0d0d07160b10d44b1b9ebcc3c8426cec 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/11-Yellow.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_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 1 11 | m_Script: {fileID: 13312, guid: 0000000000000000e000000000000000, type: 0} 12 | m_Name: 11-Yellow 13 | m_EditorClassIdentifier: 14 | m_Sprite: {fileID: 21300000, guid: a8e6ca393c0c344148ed2a473d639d9c, type: 3} 15 | m_Color: {r: 0.99607843, g: 0.92941177, b: 0.25882354, a: 1} 16 | m_Transform: 17 | e00: 1 18 | e01: 0 19 | e02: 0 20 | e03: 0 21 | e10: 0 22 | e11: 1 23 | e12: 0 24 | e13: 0 25 | e20: 0 26 | e21: 0 27 | e22: 1 28 | e23: 0 29 | e30: 0 30 | e31: 0 31 | e32: 0 32 | e33: 1 33 | m_InstancedGameObject: {fileID: 0} 34 | m_Flags: 1 35 | m_ColliderType: 1 36 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/11-Yellow.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d007cdc64350e4400878666c2b4b13dc 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/12-Green.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_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 1 11 | m_Script: {fileID: 13312, guid: 0000000000000000e000000000000000, type: 0} 12 | m_Name: 12-Green 13 | m_EditorClassIdentifier: 14 | m_Sprite: {fileID: 21300000, guid: a8e6ca393c0c344148ed2a473d639d9c, type: 3} 15 | m_Color: {r: 0, g: 0.9019608, b: 0.28627452, a: 1} 16 | m_Transform: 17 | e00: 1 18 | e01: 0 19 | e02: 0 20 | e03: 0 21 | e10: 0 22 | e11: 1 23 | e12: 0 24 | e13: 0 25 | e20: 0 26 | e21: 0 27 | e22: 1 28 | e23: 0 29 | e30: 0 30 | e31: 0 31 | e32: 0 32 | e33: 1 33 | m_InstancedGameObject: {fileID: 0} 34 | m_Flags: 1 35 | m_ColliderType: 1 36 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/12-Green.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 03be7ddaff1f9403f921f9589e2ab401 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/13-Blue.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_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 1 11 | m_Script: {fileID: 13312, guid: 0000000000000000e000000000000000, type: 0} 12 | m_Name: 13-Blue 13 | m_EditorClassIdentifier: 14 | m_Sprite: {fileID: 21300000, guid: a8e6ca393c0c344148ed2a473d639d9c, type: 3} 15 | m_Color: {r: 0.18431373, g: 0.6745098, b: 0.9882353, a: 1} 16 | m_Transform: 17 | e00: 1 18 | e01: 0 19 | e02: 0 20 | e03: 0 21 | e10: 0 22 | e11: 1 23 | e12: 0 24 | e13: 0 25 | e20: 0 26 | e21: 0 27 | e22: 1 28 | e23: 0 29 | e30: 0 30 | e31: 0 31 | e32: 0 32 | e33: 1 33 | m_InstancedGameObject: {fileID: 0} 34 | m_Flags: 1 35 | m_ColliderType: 1 36 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/13-Blue.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d920ed9d6a56b49fc8257b1bf8ae1b98 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/14-Indigo.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_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 1 11 | m_Script: {fileID: 13312, guid: 0000000000000000e000000000000000, type: 0} 12 | m_Name: 14-Indigo 13 | m_EditorClassIdentifier: 14 | m_Sprite: {fileID: 21300000, guid: a8e6ca393c0c344148ed2a473d639d9c, type: 3} 15 | m_Color: {r: 0.5137255, g: 0.45882353, b: 0.60784316, a: 1} 16 | m_Transform: 17 | e00: 1 18 | e01: 0 19 | e02: 0 20 | e03: 0 21 | e10: 0 22 | e11: 1 23 | e12: 0 24 | e13: 0 25 | e20: 0 26 | e21: 0 27 | e22: 1 28 | e23: 0 29 | e30: 0 30 | e31: 0 31 | e32: 0 32 | e33: 1 33 | m_InstancedGameObject: {fileID: 0} 34 | m_Flags: 1 35 | m_ColliderType: 1 36 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/14-Indigo.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 816054a08cc554c7aac7a234b734c647 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/15-Pink.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_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 1 11 | m_Script: {fileID: 13312, guid: 0000000000000000e000000000000000, type: 0} 12 | m_Name: 15-Pink 13 | m_EditorClassIdentifier: 14 | m_Sprite: {fileID: 21300000, guid: a8e6ca393c0c344148ed2a473d639d9c, type: 3} 15 | m_Color: {r: 1, g: 0.45490196, b: 0.6509804, a: 1} 16 | m_Transform: 17 | e00: 1 18 | e01: 0 19 | e02: 0 20 | e03: 0 21 | e10: 0 22 | e11: 1 23 | e12: 0 24 | e13: 0 25 | e20: 0 26 | e21: 0 27 | e22: 1 28 | e23: 0 29 | e30: 0 30 | e31: 0 31 | e32: 0 32 | e33: 1 33 | m_InstancedGameObject: {fileID: 0} 34 | m_Flags: 1 35 | m_ColliderType: 1 36 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/15-Pink.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 48057e135a8e441959bf5dbceb0c2903 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/16-Peach.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_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 1 11 | m_Script: {fileID: 13312, guid: 0000000000000000e000000000000000, type: 0} 12 | m_Name: 16-Peach 13 | m_EditorClassIdentifier: 14 | m_Sprite: {fileID: 21300000, guid: a8e6ca393c0c344148ed2a473d639d9c, type: 3} 15 | m_Color: {r: 1, g: 0.8, b: 0.6745098, a: 1} 16 | m_Transform: 17 | e00: 1 18 | e01: 0 19 | e02: 0 20 | e03: 0 21 | e10: 0 22 | e11: 1 23 | e12: 0 24 | e13: 0 25 | e20: 0 26 | e21: 0 27 | e22: 1 28 | e23: 0 29 | e30: 0 30 | e31: 0 31 | e32: 0 32 | e33: 1 33 | m_InstancedGameObject: {fileID: 0} 34 | m_Flags: 1 35 | m_ColliderType: 1 36 | -------------------------------------------------------------------------------- /Assets/Tiles/Pico8/16-Peach.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7b5aa6857652443a28009ab66adb0d3e 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Anton Pantev 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.ads": "2.3.1", 4 | "com.unity.analytics": "3.3.2", 5 | "com.unity.collab-proxy": "1.2.16", 6 | "com.unity.multiplayer-hlapi": "1.0.2", 7 | "com.unity.package-manager-ui": "2.1.2", 8 | "com.unity.purchasing": "2.0.6", 9 | "com.unity.textmeshpro": "2.0.0", 10 | "com.unity.timeline": "1.0.0", 11 | "com.unity.xr.legacyinputhelpers": "2.0.2", 12 | "com.unity.modules.ai": "1.0.0", 13 | "com.unity.modules.animation": "1.0.0", 14 | "com.unity.modules.assetbundle": "1.0.0", 15 | "com.unity.modules.audio": "1.0.0", 16 | "com.unity.modules.cloth": "1.0.0", 17 | "com.unity.modules.director": "1.0.0", 18 | "com.unity.modules.imageconversion": "1.0.0", 19 | "com.unity.modules.imgui": "1.0.0", 20 | "com.unity.modules.jsonserialize": "1.0.0", 21 | "com.unity.modules.particlesystem": "1.0.0", 22 | "com.unity.modules.physics": "1.0.0", 23 | "com.unity.modules.physics2d": "1.0.0", 24 | "com.unity.modules.screencapture": "1.0.0", 25 | "com.unity.modules.terrain": "1.0.0", 26 | "com.unity.modules.terrainphysics": "1.0.0", 27 | "com.unity.modules.tilemap": "1.0.0", 28 | "com.unity.modules.ui": "1.0.0", 29 | "com.unity.modules.uielements": "1.0.0", 30 | "com.unity.modules.umbra": "1.0.0", 31 | "com.unity.modules.unityanalytics": "1.0.0", 32 | "com.unity.modules.unitywebrequest": "1.0.0", 33 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 34 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 35 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 36 | "com.unity.modules.unitywebrequestwww": "1.0.0", 37 | "com.unity.modules.vehicles": "1.0.0", 38 | "com.unity.modules.video": "1.0.0", 39 | "com.unity.modules.vr": "1.0.0", 40 | "com.unity.modules.wind": "1.0.0", 41 | "com.unity.modules.xr": "1.0.0" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Pathfinding.unitypackage: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sturdyspoon/unity-pathfinding/2bc256575d4ab1d046decf9404a509f5efc01b59/Pathfinding.unitypackage -------------------------------------------------------------------------------- /PreviewImages/ScreenShot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sturdyspoon/unity-pathfinding/2bc256575d4ab1d046decf9404a509f5efc01b59/PreviewImages/ScreenShot.png -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 1024 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_AmbisonicDecoderPlugin: 16 | m_DisableAudio: 0 17 | m_VirtualizeEffects: 1 18 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 8 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ContactPairsMode: 0 26 | m_BroadphaseType: 0 27 | m_WorldBounds: 28 | m_Center: {x: 0, y: 0, z: 0} 29 | m_Extent: {x: 250, y: 250, z: 250} 30 | m_WorldSubdivisions: 8 31 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/Scenes/Main.unity 10 | guid: e2fb152378f7d4dec978c83ec1874d44 11 | m_configObjects: {} 12 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 7 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 2 10 | m_DefaultBehaviorMode: 1 11 | m_SpritePackerMode: 4 12 | m_SpritePackerPaddingPower: 1 13 | m_EtcTextureCompressorBehavior: 1 14 | m_EtcTextureFastCompressor: 1 15 | m_EtcTextureNormalCompressor: 2 16 | m_EtcTextureBestCompressor: 4 17 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd 18 | m_ProjectGenerationRootNamespace: 19 | m_UserGeneratedProjectSuffix: 20 | m_CollabEditorSettings: 21 | inProgressEnabled: 1 22 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 12 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 16002, guid: 0000000000000000f000000000000000, type: 0} 39 | m_PreloadedShaders: [] 40 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 41 | type: 0} 42 | m_CustomRenderPipeline: {fileID: 0} 43 | m_TransparencySortMode: 0 44 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 45 | m_DefaultRenderingPath: 1 46 | m_DefaultMobileRenderingPath: 1 47 | m_TierSettings: [] 48 | m_LightmapStripping: 0 49 | m_FogStripping: 0 50 | m_InstancingStripping: 0 51 | m_LightmapKeepPlain: 1 52 | m_LightmapKeepDirCombined: 1 53 | m_LightmapKeepDynamicPlain: 1 54 | m_LightmapKeepDynamicDirCombined: 1 55 | m_LightmapKeepShadowMask: 1 56 | m_LightmapKeepSubtractive: 1 57 | m_FogKeepLinear: 1 58 | m_FogKeepExp: 1 59 | m_FogKeepExp2: 1 60 | m_AlbedoSwatchInfos: [] 61 | m_LightsUseLinearIntensity: 0 62 | m_LightsUseColorTemperature: 0 63 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_AutoSimulation: 1 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 1 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | m_DefaultList: 7 | - type: 8 | m_NativeTypeID: 20 9 | m_ManagedTypePPtr: {fileID: 0} 10 | m_ManagedTypeFallback: 11 | defaultPresets: 12 | - m_Preset: {fileID: 2655988077585873504, guid: bfcfc320427f8224bbb7a96f3d3aebad, 13 | type: 2} 14 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 16 7 | productGUID: 99680abc6470d4d3685a471c8b9ddbd8 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: DefaultCompany 16 | productName: pathfinding 17 | defaultCursor: {fileID: 0} 18 | cursorHotspot: {x: 0, y: 0} 19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 20 | m_ShowUnitySplashScreen: 1 21 | m_ShowUnitySplashLogo: 1 22 | m_SplashScreenOverlayOpacity: 1 23 | m_SplashScreenAnimation: 1 24 | m_SplashScreenLogoStyle: 1 25 | m_SplashScreenDrawMode: 0 26 | m_SplashScreenBackgroundAnimationZoom: 1 27 | m_SplashScreenLogoAnimationZoom: 1 28 | m_SplashScreenBackgroundLandscapeAspect: 1 29 | m_SplashScreenBackgroundPortraitAspect: 1 30 | m_SplashScreenBackgroundLandscapeUvs: 31 | serializedVersion: 2 32 | x: 0 33 | y: 0 34 | width: 1 35 | height: 1 36 | m_SplashScreenBackgroundPortraitUvs: 37 | serializedVersion: 2 38 | x: 0 39 | y: 0 40 | width: 1 41 | height: 1 42 | m_SplashScreenLogos: [] 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1920 46 | defaultScreenHeight: 1080 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 0 51 | m_MTRendering: 1 52 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 53 | iosShowActivityIndicatorOnLoading: -1 54 | androidShowActivityIndicatorOnLoading: -1 55 | iosAppInBackgroundBehavior: 0 56 | displayResolutionDialog: 0 57 | iosAllowHTTPDownload: 1 58 | allowedAutorotateToPortrait: 1 59 | allowedAutorotateToPortraitUpsideDown: 1 60 | allowedAutorotateToLandscapeRight: 1 61 | allowedAutorotateToLandscapeLeft: 1 62 | useOSAutorotation: 1 63 | use32BitDisplayBuffer: 1 64 | preserveFramebufferAlpha: 0 65 | disableDepthAndStencilBuffers: 0 66 | androidStartInFullscreen: 1 67 | androidRenderOutsideSafeArea: 0 68 | androidBlitType: 0 69 | defaultIsNativeResolution: 0 70 | macRetinaSupport: 1 71 | runInBackground: 1 72 | captureSingleScreen: 0 73 | muteOtherAudioSources: 0 74 | Prepare IOS For Recording: 0 75 | Force IOS Speakers When Recording: 0 76 | deferSystemGesturesMode: 0 77 | hideHomeButton: 0 78 | submitAnalytics: 1 79 | usePlayerLog: 1 80 | bakeCollisionMeshes: 0 81 | forceSingleInstance: 0 82 | resizableWindow: 1 83 | useMacAppStoreValidation: 0 84 | macAppStoreCategory: public.app-category.games 85 | gpuSkinning: 0 86 | graphicsJobs: 0 87 | xboxPIXTextureCapture: 0 88 | xboxEnableAvatar: 0 89 | xboxEnableKinect: 0 90 | xboxEnableKinectAutoTracking: 0 91 | xboxEnableFitness: 0 92 | visibleInBackground: 1 93 | allowFullscreenSwitch: 1 94 | graphicsJobMode: 0 95 | fullscreenMode: 3 96 | xboxSpeechDB: 0 97 | xboxEnableHeadOrientation: 0 98 | xboxEnableGuest: 0 99 | xboxEnablePIXSampling: 0 100 | metalFramebufferOnly: 0 101 | xboxOneResolution: 0 102 | xboxOneSResolution: 0 103 | xboxOneXResolution: 3 104 | xboxOneMonoLoggingLevel: 0 105 | xboxOneLoggingLevel: 1 106 | xboxOneDisableEsram: 0 107 | xboxOnePresentImmediateThreshold: 0 108 | switchQueueCommandMemory: 0 109 | switchQueueControlMemory: 16384 110 | switchQueueComputeMemory: 262144 111 | switchNVNShaderPoolsGranularity: 33554432 112 | switchNVNDefaultPoolsGranularity: 16777216 113 | switchNVNOtherPoolsGranularity: 16777216 114 | vulkanEnableSetSRGBWrite: 0 115 | m_SupportedAspectRatios: 116 | 4:3: 0 117 | 5:4: 0 118 | 16:10: 0 119 | 16:9: 1 120 | Others: 0 121 | bundleVersion: 0.1 122 | preloadedAssets: [] 123 | metroInputSource: 0 124 | wsaTransparentSwapchain: 0 125 | m_HolographicPauseOnTrackingLoss: 1 126 | xboxOneDisableKinectGpuReservation: 0 127 | xboxOneEnable7thCore: 0 128 | vrSettings: 129 | cardboard: 130 | depthFormat: 0 131 | enableTransitionView: 0 132 | daydream: 133 | depthFormat: 0 134 | useSustainedPerformanceMode: 0 135 | enableVideoLayer: 0 136 | useProtectedVideoMemory: 0 137 | minimumSupportedHeadTracking: 0 138 | maximumSupportedHeadTracking: 1 139 | hololens: 140 | depthFormat: 1 141 | depthBufferSharingEnabled: 0 142 | lumin: 143 | depthFormat: 0 144 | frameTiming: 2 145 | enableGLCache: 0 146 | glCacheMaxBlobSize: 524288 147 | glCacheMaxFileSize: 8388608 148 | oculus: 149 | sharedDepthBuffer: 1 150 | dashSupport: 1 151 | enable360StereoCapture: 0 152 | isWsaHolographicRemotingEnabled: 0 153 | protectGraphicsMemory: 0 154 | enableFrameTimingStats: 0 155 | useHDRDisplay: 0 156 | m_ColorGamuts: 00000000 157 | targetPixelDensity: 30 158 | resolutionScalingMode: 0 159 | androidSupportedAspectRatio: 1 160 | androidMaxAspectRatio: 2.1 161 | applicationIdentifier: 162 | Standalone: com.Company.ProductName 163 | buildNumber: {} 164 | AndroidBundleVersionCode: 1 165 | AndroidMinSdkVersion: 16 166 | AndroidTargetSdkVersion: 0 167 | AndroidPreferredInstallLocation: 1 168 | aotOptions: 169 | stripEngineCode: 1 170 | iPhoneStrippingLevel: 0 171 | iPhoneScriptCallOptimization: 0 172 | ForceInternetPermission: 0 173 | ForceSDCardPermission: 0 174 | CreateWallpaper: 0 175 | APKExpansionFiles: 0 176 | keepLoadedShadersAlive: 0 177 | StripUnusedMeshComponents: 1 178 | VertexChannelCompressionMask: 4054 179 | iPhoneSdkVersion: 988 180 | iOSTargetOSVersionString: 9.0 181 | tvOSSdkVersion: 0 182 | tvOSRequireExtendedGameController: 0 183 | tvOSTargetOSVersionString: 9.0 184 | uIPrerenderedIcon: 0 185 | uIRequiresPersistentWiFi: 0 186 | uIRequiresFullScreen: 1 187 | uIStatusBarHidden: 1 188 | uIExitOnSuspend: 0 189 | uIStatusBarStyle: 0 190 | iPhoneSplashScreen: {fileID: 0} 191 | iPhoneHighResSplashScreen: {fileID: 0} 192 | iPhoneTallHighResSplashScreen: {fileID: 0} 193 | iPhone47inSplashScreen: {fileID: 0} 194 | iPhone55inPortraitSplashScreen: {fileID: 0} 195 | iPhone55inLandscapeSplashScreen: {fileID: 0} 196 | iPhone58inPortraitSplashScreen: {fileID: 0} 197 | iPhone58inLandscapeSplashScreen: {fileID: 0} 198 | iPadPortraitSplashScreen: {fileID: 0} 199 | iPadHighResPortraitSplashScreen: {fileID: 0} 200 | iPadLandscapeSplashScreen: {fileID: 0} 201 | iPadHighResLandscapeSplashScreen: {fileID: 0} 202 | iPhone65inPortraitSplashScreen: {fileID: 0} 203 | iPhone65inLandscapeSplashScreen: {fileID: 0} 204 | iPhone61inPortraitSplashScreen: {fileID: 0} 205 | iPhone61inLandscapeSplashScreen: {fileID: 0} 206 | appleTVSplashScreen: {fileID: 0} 207 | appleTVSplashScreen2x: {fileID: 0} 208 | tvOSSmallIconLayers: [] 209 | tvOSSmallIconLayers2x: [] 210 | tvOSLargeIconLayers: [] 211 | tvOSLargeIconLayers2x: [] 212 | tvOSTopShelfImageLayers: [] 213 | tvOSTopShelfImageLayers2x: [] 214 | tvOSTopShelfImageWideLayers: [] 215 | tvOSTopShelfImageWideLayers2x: [] 216 | iOSLaunchScreenType: 0 217 | iOSLaunchScreenPortrait: {fileID: 0} 218 | iOSLaunchScreenLandscape: {fileID: 0} 219 | iOSLaunchScreenBackgroundColor: 220 | serializedVersion: 2 221 | rgba: 0 222 | iOSLaunchScreenFillPct: 100 223 | iOSLaunchScreenSize: 100 224 | iOSLaunchScreenCustomXibPath: 225 | iOSLaunchScreeniPadType: 0 226 | iOSLaunchScreeniPadImage: {fileID: 0} 227 | iOSLaunchScreeniPadBackgroundColor: 228 | serializedVersion: 2 229 | rgba: 0 230 | iOSLaunchScreeniPadFillPct: 100 231 | iOSLaunchScreeniPadSize: 100 232 | iOSLaunchScreeniPadCustomXibPath: 233 | iOSUseLaunchScreenStoryboard: 0 234 | iOSLaunchScreenCustomStoryboardPath: 235 | iOSDeviceRequirements: [] 236 | iOSURLSchemes: [] 237 | iOSBackgroundModes: 0 238 | iOSMetalForceHardShadows: 0 239 | metalEditorSupport: 1 240 | metalAPIValidation: 1 241 | iOSRenderExtraFrameOnPause: 0 242 | appleDeveloperTeamID: 243 | iOSManualSigningProvisioningProfileID: 244 | tvOSManualSigningProvisioningProfileID: 245 | iOSManualSigningProvisioningProfileType: 0 246 | tvOSManualSigningProvisioningProfileType: 0 247 | appleEnableAutomaticSigning: 0 248 | iOSRequireARKit: 0 249 | iOSAutomaticallyDetectAndAddCapabilities: 1 250 | appleEnableProMotion: 0 251 | clonedFromGUID: 5f34be1353de5cf4398729fda238591b 252 | templatePackageId: com.unity.template.2d@1.0.2 253 | templateDefaultScene: Assets/Scenes/SampleScene.unity 254 | AndroidTargetArchitectures: 5 255 | AndroidSplashScreenScale: 0 256 | androidSplashScreen: {fileID: 0} 257 | AndroidKeystoreName: '{inproject}: ' 258 | AndroidKeyaliasName: 259 | AndroidBuildApkPerCpuArchitecture: 0 260 | AndroidTVCompatibility: 1 261 | AndroidIsGame: 1 262 | AndroidEnableTango: 0 263 | androidEnableBanner: 1 264 | androidUseLowAccuracyLocation: 0 265 | androidUseCustomKeystore: 0 266 | m_AndroidBanners: 267 | - width: 320 268 | height: 180 269 | banner: {fileID: 0} 270 | androidGamepadSupportLevel: 0 271 | resolutionDialogBanner: {fileID: 0} 272 | m_BuildTargetIcons: [] 273 | m_BuildTargetPlatformIcons: [] 274 | m_BuildTargetBatching: [] 275 | m_BuildTargetGraphicsAPIs: [] 276 | m_BuildTargetVRSettings: [] 277 | m_BuildTargetEnableVuforiaSettings: [] 278 | openGLRequireES31: 0 279 | openGLRequireES31AEP: 0 280 | openGLRequireES32: 0 281 | m_TemplateCustomTags: {} 282 | mobileMTRendering: 283 | Android: 1 284 | iPhone: 1 285 | tvOS: 1 286 | m_BuildTargetGroupLightmapEncodingQuality: [] 287 | m_BuildTargetGroupLightmapSettings: [] 288 | playModeTestRunnerEnabled: 0 289 | runPlayModeTestAsEditModeTest: 0 290 | actionOnDotNetUnhandledException: 1 291 | enableInternalProfiler: 0 292 | logObjCUncaughtExceptions: 1 293 | enableCrashReportAPI: 0 294 | cameraUsageDescription: 295 | locationUsageDescription: 296 | microphoneUsageDescription: 297 | switchNetLibKey: 298 | switchSocketMemoryPoolSize: 6144 299 | switchSocketAllocatorPoolSize: 128 300 | switchSocketConcurrencyLimit: 14 301 | switchScreenResolutionBehavior: 2 302 | switchUseCPUProfiler: 0 303 | switchApplicationID: 0x01004b9000490000 304 | switchNSODependencies: 305 | switchTitleNames_0: 306 | switchTitleNames_1: 307 | switchTitleNames_2: 308 | switchTitleNames_3: 309 | switchTitleNames_4: 310 | switchTitleNames_5: 311 | switchTitleNames_6: 312 | switchTitleNames_7: 313 | switchTitleNames_8: 314 | switchTitleNames_9: 315 | switchTitleNames_10: 316 | switchTitleNames_11: 317 | switchTitleNames_12: 318 | switchTitleNames_13: 319 | switchTitleNames_14: 320 | switchPublisherNames_0: 321 | switchPublisherNames_1: 322 | switchPublisherNames_2: 323 | switchPublisherNames_3: 324 | switchPublisherNames_4: 325 | switchPublisherNames_5: 326 | switchPublisherNames_6: 327 | switchPublisherNames_7: 328 | switchPublisherNames_8: 329 | switchPublisherNames_9: 330 | switchPublisherNames_10: 331 | switchPublisherNames_11: 332 | switchPublisherNames_12: 333 | switchPublisherNames_13: 334 | switchPublisherNames_14: 335 | switchIcons_0: {fileID: 0} 336 | switchIcons_1: {fileID: 0} 337 | switchIcons_2: {fileID: 0} 338 | switchIcons_3: {fileID: 0} 339 | switchIcons_4: {fileID: 0} 340 | switchIcons_5: {fileID: 0} 341 | switchIcons_6: {fileID: 0} 342 | switchIcons_7: {fileID: 0} 343 | switchIcons_8: {fileID: 0} 344 | switchIcons_9: {fileID: 0} 345 | switchIcons_10: {fileID: 0} 346 | switchIcons_11: {fileID: 0} 347 | switchIcons_12: {fileID: 0} 348 | switchIcons_13: {fileID: 0} 349 | switchIcons_14: {fileID: 0} 350 | switchSmallIcons_0: {fileID: 0} 351 | switchSmallIcons_1: {fileID: 0} 352 | switchSmallIcons_2: {fileID: 0} 353 | switchSmallIcons_3: {fileID: 0} 354 | switchSmallIcons_4: {fileID: 0} 355 | switchSmallIcons_5: {fileID: 0} 356 | switchSmallIcons_6: {fileID: 0} 357 | switchSmallIcons_7: {fileID: 0} 358 | switchSmallIcons_8: {fileID: 0} 359 | switchSmallIcons_9: {fileID: 0} 360 | switchSmallIcons_10: {fileID: 0} 361 | switchSmallIcons_11: {fileID: 0} 362 | switchSmallIcons_12: {fileID: 0} 363 | switchSmallIcons_13: {fileID: 0} 364 | switchSmallIcons_14: {fileID: 0} 365 | switchManualHTML: 366 | switchAccessibleURLs: 367 | switchLegalInformation: 368 | switchMainThreadStackSize: 1048576 369 | switchPresenceGroupId: 370 | switchLogoHandling: 0 371 | switchReleaseVersion: 0 372 | switchDisplayVersion: 1.0.0 373 | switchStartupUserAccount: 0 374 | switchTouchScreenUsage: 0 375 | switchSupportedLanguagesMask: 0 376 | switchLogoType: 0 377 | switchApplicationErrorCodeCategory: 378 | switchUserAccountSaveDataSize: 0 379 | switchUserAccountSaveDataJournalSize: 0 380 | switchApplicationAttribute: 0 381 | switchCardSpecSize: -1 382 | switchCardSpecClock: -1 383 | switchRatingsMask: 0 384 | switchRatingsInt_0: 0 385 | switchRatingsInt_1: 0 386 | switchRatingsInt_2: 0 387 | switchRatingsInt_3: 0 388 | switchRatingsInt_4: 0 389 | switchRatingsInt_5: 0 390 | switchRatingsInt_6: 0 391 | switchRatingsInt_7: 0 392 | switchRatingsInt_8: 0 393 | switchRatingsInt_9: 0 394 | switchRatingsInt_10: 0 395 | switchRatingsInt_11: 0 396 | switchLocalCommunicationIds_0: 397 | switchLocalCommunicationIds_1: 398 | switchLocalCommunicationIds_2: 399 | switchLocalCommunicationIds_3: 400 | switchLocalCommunicationIds_4: 401 | switchLocalCommunicationIds_5: 402 | switchLocalCommunicationIds_6: 403 | switchLocalCommunicationIds_7: 404 | switchParentalControl: 0 405 | switchAllowsScreenshot: 1 406 | switchAllowsVideoCapturing: 1 407 | switchAllowsRuntimeAddOnContentInstall: 0 408 | switchDataLossConfirmation: 0 409 | switchUserAccountLockEnabled: 0 410 | switchSystemResourceMemory: 16777216 411 | switchSupportedNpadStyles: 3 412 | switchNativeFsCacheSize: 32 413 | switchIsHoldTypeHorizontal: 0 414 | switchSupportedNpadCount: 8 415 | switchSocketConfigEnabled: 0 416 | switchTcpInitialSendBufferSize: 32 417 | switchTcpInitialReceiveBufferSize: 64 418 | switchTcpAutoSendBufferSizeMax: 256 419 | switchTcpAutoReceiveBufferSizeMax: 256 420 | switchUdpSendBufferSize: 9 421 | switchUdpReceiveBufferSize: 42 422 | switchSocketBufferEfficiency: 4 423 | switchSocketInitializeEnabled: 1 424 | switchNetworkInterfaceManagerInitializeEnabled: 1 425 | switchPlayerConnectionEnabled: 1 426 | ps4NPAgeRating: 12 427 | ps4NPTitleSecret: 428 | ps4NPTrophyPackPath: 429 | ps4ParentalLevel: 11 430 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 431 | ps4Category: 0 432 | ps4MasterVersion: 01.00 433 | ps4AppVersion: 01.00 434 | ps4AppType: 0 435 | ps4ParamSfxPath: 436 | ps4VideoOutPixelFormat: 0 437 | ps4VideoOutInitialWidth: 1920 438 | ps4VideoOutBaseModeInitialWidth: 1920 439 | ps4VideoOutReprojectionRate: 60 440 | ps4PronunciationXMLPath: 441 | ps4PronunciationSIGPath: 442 | ps4BackgroundImagePath: 443 | ps4StartupImagePath: 444 | ps4StartupImagesFolder: 445 | ps4IconImagesFolder: 446 | ps4SaveDataImagePath: 447 | ps4SdkOverride: 448 | ps4BGMPath: 449 | ps4ShareFilePath: 450 | ps4ShareOverlayImagePath: 451 | ps4PrivacyGuardImagePath: 452 | ps4NPtitleDatPath: 453 | ps4RemotePlayKeyAssignment: -1 454 | ps4RemotePlayKeyMappingDir: 455 | ps4PlayTogetherPlayerCount: 0 456 | ps4EnterButtonAssignment: 1 457 | ps4ApplicationParam1: 0 458 | ps4ApplicationParam2: 0 459 | ps4ApplicationParam3: 0 460 | ps4ApplicationParam4: 0 461 | ps4DownloadDataSize: 0 462 | ps4GarlicHeapSize: 2048 463 | ps4ProGarlicHeapSize: 2560 464 | playerPrefsMaxSize: 32768 465 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 466 | ps4pnSessions: 1 467 | ps4pnPresence: 1 468 | ps4pnFriends: 1 469 | ps4pnGameCustomData: 1 470 | playerPrefsSupport: 0 471 | enableApplicationExit: 0 472 | resetTempFolder: 1 473 | restrictedAudioUsageRights: 0 474 | ps4UseResolutionFallback: 0 475 | ps4ReprojectionSupport: 0 476 | ps4UseAudio3dBackend: 0 477 | ps4SocialScreenEnabled: 0 478 | ps4ScriptOptimizationLevel: 0 479 | ps4Audio3dVirtualSpeakerCount: 14 480 | ps4attribCpuUsage: 0 481 | ps4PatchPkgPath: 482 | ps4PatchLatestPkgPath: 483 | ps4PatchChangeinfoPath: 484 | ps4PatchDayOne: 0 485 | ps4attribUserManagement: 0 486 | ps4attribMoveSupport: 0 487 | ps4attrib3DSupport: 0 488 | ps4attribShareSupport: 0 489 | ps4attribExclusiveVR: 0 490 | ps4disableAutoHideSplash: 0 491 | ps4videoRecordingFeaturesUsed: 0 492 | ps4contentSearchFeaturesUsed: 0 493 | ps4attribEyeToEyeDistanceSettingVR: 0 494 | ps4IncludedModules: [] 495 | monoEnv: 496 | splashScreenBackgroundSourceLandscape: {fileID: 0} 497 | splashScreenBackgroundSourcePortrait: {fileID: 0} 498 | spritePackerPolicy: 499 | webGLMemorySize: 256 500 | webGLExceptionSupport: 1 501 | webGLNameFilesAsHashes: 0 502 | webGLDataCaching: 1 503 | webGLDebugSymbols: 0 504 | webGLEmscriptenArgs: 505 | webGLModulesDirectory: 506 | webGLTemplate: APPLICATION:Default 507 | webGLAnalyzeBuildSize: 0 508 | webGLUseEmbeddedResources: 0 509 | webGLCompressionFormat: 1 510 | webGLLinkerTarget: 1 511 | webGLThreadsSupport: 0 512 | webGLWasmStreaming: 0 513 | scriptingDefineSymbols: {} 514 | platformArchitecture: {} 515 | scriptingBackend: {} 516 | il2cppCompilerConfiguration: {} 517 | managedStrippingLevel: {} 518 | incrementalIl2cppBuild: {} 519 | allowUnsafeCode: 0 520 | additionalIl2CppArgs: 521 | scriptingRuntimeVersion: 1 522 | gcIncremental: 0 523 | gcWBarrierValidation: 0 524 | apiCompatibilityLevelPerPlatform: {} 525 | m_RenderingPath: 1 526 | m_MobileRenderingPath: 1 527 | metroPackageName: Template_2D 528 | metroPackageVersion: 529 | metroCertificatePath: 530 | metroCertificatePassword: 531 | metroCertificateSubject: 532 | metroCertificateIssuer: 533 | metroCertificateNotAfter: 0000000000000000 534 | metroApplicationDescription: Template_2D 535 | wsaImages: {} 536 | metroTileShortName: 537 | metroTileShowName: 0 538 | metroMediumTileShowName: 0 539 | metroLargeTileShowName: 0 540 | metroWideTileShowName: 0 541 | metroSupportStreamingInstall: 0 542 | metroLastRequiredScene: 0 543 | metroDefaultTileSize: 1 544 | metroTileForegroundText: 2 545 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 546 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 547 | a: 1} 548 | metroSplashScreenUseBackgroundColor: 0 549 | platformCapabilities: {} 550 | metroTargetDeviceFamilies: {} 551 | metroFTAName: 552 | metroFTAFileTypes: [] 553 | metroProtocolName: 554 | XboxOneProductId: 555 | XboxOneUpdateKey: 556 | XboxOneSandboxId: 557 | XboxOneContentId: 558 | XboxOneTitleId: 559 | XboxOneSCId: 560 | XboxOneGameOsOverridePath: 561 | XboxOnePackagingOverridePath: 562 | XboxOneAppManifestOverridePath: 563 | XboxOneVersion: 1.0.0.0 564 | XboxOnePackageEncryption: 0 565 | XboxOnePackageUpdateGranularity: 2 566 | XboxOneDescription: 567 | XboxOneLanguage: 568 | - enus 569 | XboxOneCapability: [] 570 | XboxOneGameRating: {} 571 | XboxOneIsContentPackage: 0 572 | XboxOneEnableGPUVariability: 0 573 | XboxOneSockets: {} 574 | XboxOneSplashScreen: {fileID: 0} 575 | XboxOneAllowedProductIds: [] 576 | XboxOnePersistentLocalStorageSize: 0 577 | XboxOneXTitleMemory: 8 578 | xboxOneScriptCompiler: 1 579 | XboxOneOverrideIdentityName: 580 | vrEditorSettings: 581 | daydream: 582 | daydreamIconForeground: {fileID: 0} 583 | daydreamIconBackground: {fileID: 0} 584 | cloudServicesEnabled: 585 | UNet: 1 586 | luminIcon: 587 | m_Name: 588 | m_ModelFolderPath: 589 | m_PortalFolderPath: 590 | luminCert: 591 | m_CertPath: 592 | m_SignPackage: 1 593 | luminIsChannelApp: 0 594 | luminVersion: 595 | m_VersionCode: 1 596 | m_VersionName: 597 | facebookSdkVersion: 7.9.4 598 | facebookAppId: 599 | facebookCookies: 1 600 | facebookLogging: 1 601 | facebookStatus: 1 602 | facebookXfbml: 0 603 | facebookFrictionlessRequests: 1 604 | apiCompatibilityLevel: 6 605 | cloudProjectId: 606 | framebufferDepthMemorylessMode: 0 607 | projectName: 608 | organizationId: 609 | cloudEnabled: 0 610 | enableNativePlatformBackendsForNewInputSystem: 0 611 | disableOldInputManagerSupport: 0 612 | legacyClampBlendShapeWeights: 0 613 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2019.1.0f2 2 | m_EditorVersionWithRevision: 2019.1.0f2 (292b93d75a2c) 3 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 3 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | blendWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | particleRaycastBudget: 4 33 | asyncUploadTimeSlice: 2 34 | asyncUploadBufferSize: 16 35 | resolutionScalingFixedDPIFactor: 1 36 | excludedTargetPlatforms: [] 37 | - serializedVersion: 2 38 | name: Low 39 | pixelLightCount: 0 40 | shadows: 0 41 | shadowResolution: 0 42 | shadowProjection: 1 43 | shadowCascades: 1 44 | shadowDistance: 20 45 | shadowNearPlaneOffset: 3 46 | shadowCascade2Split: 0.33333334 47 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 48 | shadowmaskMode: 0 49 | blendWeights: 2 50 | textureQuality: 0 51 | anisotropicTextures: 0 52 | antiAliasing: 0 53 | softParticles: 0 54 | softVegetation: 0 55 | realtimeReflectionProbes: 0 56 | billboardsFaceCameraPosition: 0 57 | vSyncCount: 0 58 | lodBias: 0.4 59 | maximumLODLevel: 0 60 | particleRaycastBudget: 16 61 | asyncUploadTimeSlice: 2 62 | asyncUploadBufferSize: 16 63 | resolutionScalingFixedDPIFactor: 1 64 | excludedTargetPlatforms: [] 65 | - serializedVersion: 2 66 | name: Medium 67 | pixelLightCount: 1 68 | shadows: 0 69 | shadowResolution: 0 70 | shadowProjection: 1 71 | shadowCascades: 1 72 | shadowDistance: 20 73 | shadowNearPlaneOffset: 3 74 | shadowCascade2Split: 0.33333334 75 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 76 | shadowmaskMode: 0 77 | blendWeights: 2 78 | textureQuality: 0 79 | anisotropicTextures: 0 80 | antiAliasing: 0 81 | softParticles: 0 82 | softVegetation: 0 83 | realtimeReflectionProbes: 0 84 | billboardsFaceCameraPosition: 0 85 | vSyncCount: 1 86 | lodBias: 0.7 87 | maximumLODLevel: 0 88 | particleRaycastBudget: 64 89 | asyncUploadTimeSlice: 2 90 | asyncUploadBufferSize: 16 91 | resolutionScalingFixedDPIFactor: 1 92 | excludedTargetPlatforms: [] 93 | - serializedVersion: 2 94 | name: High 95 | pixelLightCount: 2 96 | shadows: 0 97 | shadowResolution: 1 98 | shadowProjection: 1 99 | shadowCascades: 2 100 | shadowDistance: 40 101 | shadowNearPlaneOffset: 3 102 | shadowCascade2Split: 0.33333334 103 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 104 | shadowmaskMode: 1 105 | blendWeights: 2 106 | textureQuality: 0 107 | anisotropicTextures: 0 108 | antiAliasing: 0 109 | softParticles: 0 110 | softVegetation: 1 111 | realtimeReflectionProbes: 0 112 | billboardsFaceCameraPosition: 0 113 | vSyncCount: 1 114 | lodBias: 1 115 | maximumLODLevel: 0 116 | particleRaycastBudget: 256 117 | asyncUploadTimeSlice: 2 118 | asyncUploadBufferSize: 16 119 | resolutionScalingFixedDPIFactor: 1 120 | excludedTargetPlatforms: [] 121 | - serializedVersion: 2 122 | name: Very High 123 | pixelLightCount: 3 124 | shadows: 0 125 | shadowResolution: 2 126 | shadowProjection: 1 127 | shadowCascades: 2 128 | shadowDistance: 70 129 | shadowNearPlaneOffset: 3 130 | shadowCascade2Split: 0.33333334 131 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 132 | shadowmaskMode: 1 133 | blendWeights: 4 134 | textureQuality: 0 135 | anisotropicTextures: 0 136 | antiAliasing: 0 137 | softParticles: 0 138 | softVegetation: 1 139 | realtimeReflectionProbes: 0 140 | billboardsFaceCameraPosition: 0 141 | vSyncCount: 1 142 | lodBias: 1.5 143 | maximumLODLevel: 0 144 | particleRaycastBudget: 1024 145 | asyncUploadTimeSlice: 2 146 | asyncUploadBufferSize: 16 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Ultra 151 | pixelLightCount: 4 152 | shadows: 0 153 | shadowResolution: 0 154 | shadowProjection: 1 155 | shadowCascades: 4 156 | shadowDistance: 150 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 0 164 | antiAliasing: 0 165 | softParticles: 0 166 | softVegetation: 1 167 | realtimeReflectionProbes: 0 168 | billboardsFaceCameraPosition: 0 169 | vSyncCount: 1 170 | lodBias: 2 171 | maximumLODLevel: 0 172 | particleRaycastBudget: 4096 173 | asyncUploadTimeSlice: 2 174 | asyncUploadBufferSize: 16 175 | resolutionScalingFixedDPIFactor: 1 176 | excludedTargetPlatforms: [] 177 | m_PerPlatformDefaultQuality: 178 | Android: 2 179 | Nintendo 3DS: 5 180 | Nintendo Switch: 5 181 | PS4: 5 182 | PSM: 5 183 | PSP2: 2 184 | Standalone: 5 185 | Tizen: 2 186 | WebGL: 3 187 | WiiU: 5 188 | Windows Store Apps: 5 189 | XboxOne: 5 190 | iPhone: 2 191 | tvOS: 2 192 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.1 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 1 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_TestInitMode: 0 13 | CrashReportingSettings: 14 | m_EventUrl: https://perf-events.cloud.unity3d.com 15 | m_Enabled: 0 16 | m_LogBufferSize: 10 17 | m_CaptureEditorExceptions: 1 18 | UnityPurchasingSettings: 19 | m_Enabled: 0 20 | m_TestMode: 0 21 | UnityAnalyticsSettings: 22 | m_Enabled: 0 23 | m_TestMode: 0 24 | m_InitializeOnStartup: 1 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_RenderPipeSettingsPath: 10 | m_FixedTimeStep: 0.016666668 11 | m_MaxDeltaTime: 0.05 12 | -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Pathfinding 2 | Find paths in Unity Tilemaps with A* Search based off Amit Patel's implementation. 3 | 4 | Download and Import the Pathfinding [package](https://github.com/antonpantev/pathfinding/raw/master/Pathfinding.unitypackage) then use `AStar.FindPath()` like so: 5 | 6 | ```c# 7 | List path = AStar.FindPath(tilemap, startPos, endPos); 8 | ``` 9 | 10 | 11 | --------------------------------------------------------------------------------