├── .gitignore ├── NavMesh Example Project ├── .vs │ ├── NavMesh Example Project │ │ └── v15 │ │ │ └── sqlite3 │ │ │ └── storage.ide │ └── NavMesh │ │ └── v15 │ │ └── sqlite3 │ │ └── storage.ide ├── Assets │ ├── Example01 - Basics.meta │ ├── Example01 - Basics.unity │ ├── Example01 - Basics.unity.meta │ ├── Example01 - Basics │ │ ├── Level.fbx │ │ ├── Level.fbx.meta │ │ ├── Materials.meta │ │ └── Materials │ │ │ ├── Ground.mat │ │ │ ├── Ground.mat.meta │ │ │ ├── Player.mat │ │ │ ├── Player.mat.meta │ │ │ ├── Walls.mat │ │ │ └── Walls.mat.meta │ ├── Example02 - Obstacles.meta │ ├── Example02 - Obstacles.unity │ ├── Example02 - Obstacles.unity.meta │ ├── Example02 - Obstacles │ │ ├── Materials.meta │ │ ├── Materials │ │ │ ├── Ground.mat │ │ │ ├── Ground.mat.meta │ │ │ ├── Obstacle.mat │ │ │ ├── Obstacle.mat.meta │ │ │ ├── Player.mat │ │ │ └── Player.mat.meta │ │ ├── ObstacleAnimation.cs │ │ └── ObstacleAnimation.cs.meta │ ├── Example03 - Runtime.meta │ ├── Example03 - Runtime.unity │ ├── Example03 - Runtime.unity.meta │ ├── Example03 - Runtime │ │ ├── LevelGenerator.cs │ │ ├── LevelGenerator.cs.meta │ │ ├── Materials.meta │ │ ├── Materials │ │ │ ├── Ground.mat │ │ │ ├── Ground.mat.meta │ │ │ ├── Player.mat │ │ │ ├── Player.mat.meta │ │ │ ├── Walls.mat │ │ │ └── Walls.mat.meta │ │ ├── Player.prefab │ │ ├── Player.prefab.meta │ │ ├── Wall.prefab │ │ └── Wall.prefab.meta │ ├── Example04 - Links.meta │ ├── Example04 - Links.unity │ ├── Example04 - Links.unity.meta │ ├── Example04 - Links │ │ ├── Materials.meta │ │ └── Materials │ │ │ ├── Ground01.mat │ │ │ ├── Ground01.mat.meta │ │ │ ├── Ground02.mat │ │ │ ├── Ground02.mat.meta │ │ │ ├── Player.mat │ │ │ └── Player.mat.meta │ ├── Example05 - LowMan.meta │ ├── Example05 - LowMan.unity │ ├── Example05 - LowMan.unity.meta │ ├── Example05 - LowMan │ │ ├── LowMan.meta │ │ ├── LowMan │ │ │ ├── Animation.meta │ │ │ ├── Animation │ │ │ │ ├── Clips.meta │ │ │ │ ├── Clips │ │ │ │ │ ├── Humanoid_Crouch.fbx │ │ │ │ │ ├── Humanoid_Crouch.fbx.meta │ │ │ │ │ ├── Humanoid_Dying.fbx │ │ │ │ │ ├── Humanoid_Dying.fbx.meta │ │ │ │ │ ├── Humanoid_Idle.fbx │ │ │ │ │ ├── Humanoid_Idle.fbx.meta │ │ │ │ │ ├── Humanoid_IdleJumpUp.fbx │ │ │ │ │ ├── Humanoid_IdleJumpUp.fbx.meta │ │ │ │ │ ├── Humanoid_IdleWin.fbx │ │ │ │ │ ├── Humanoid_IdleWin.fbx.meta │ │ │ │ │ ├── Humanoid_JumpAndFall.fbx │ │ │ │ │ ├── Humanoid_JumpAndFall.fbx.meta │ │ │ │ │ ├── Humanoid_MidAir.fbx │ │ │ │ │ ├── Humanoid_MidAir.fbx.meta │ │ │ │ │ ├── Humanoid_Run.fbx │ │ │ │ │ ├── Humanoid_Run.fbx.meta │ │ │ │ │ ├── Humanoid_RunTurn.fbx │ │ │ │ │ ├── Humanoid_RunTurn.fbx.meta │ │ │ │ │ ├── Humanoid_RunTurnSharp.fbx │ │ │ │ │ ├── Humanoid_RunTurnSharp.fbx.meta │ │ │ │ │ ├── Humanoid_StandTurn.fbx │ │ │ │ │ ├── Humanoid_StandTurn.fbx.meta │ │ │ │ │ ├── Humanoid_Walk.fbx │ │ │ │ │ ├── Humanoid_Walk.fbx.meta │ │ │ │ │ ├── Humanoid_WalkTurn.fbx │ │ │ │ │ ├── Humanoid_WalkTurn.fbx.meta │ │ │ │ │ ├── Humanoid_WalkTurnSharp.fbx │ │ │ │ │ └── Humanoid_WalkTurnSharp.fbx.meta │ │ │ │ ├── Humanoid.controller │ │ │ │ └── Humanoid.controller.meta │ │ │ ├── Materials.meta │ │ │ ├── Materials │ │ │ │ ├── LowBody.mat │ │ │ │ └── LowBody.mat.meta │ │ │ ├── Models.meta │ │ │ ├── Models │ │ │ │ ├── LowBody.fbx │ │ │ │ └── LowBody.fbx.meta │ │ │ ├── Scripts.meta │ │ │ └── Scripts │ │ │ │ ├── ThirdPersonCharacter.cs │ │ │ │ └── ThirdPersonCharacter.cs.meta │ │ ├── Materials.meta │ │ └── Materials │ │ │ ├── Ground.mat │ │ │ ├── Ground.mat.meta │ │ │ ├── Walls.mat │ │ │ └── Walls.mat.meta │ ├── NavMeshComponents.meta │ └── NavMeshComponents │ │ ├── Editor.meta │ │ ├── Editor │ │ ├── NavMeshComponentsGUIUtility.cs │ │ ├── NavMeshComponentsGUIUtility.cs.meta │ │ ├── NavMeshLinkEditor.cs │ │ ├── NavMeshLinkEditor.cs.meta │ │ ├── NavMeshModifierEditor.cs │ │ ├── NavMeshModifierEditor.cs.meta │ │ ├── NavMeshModifierVolumeEditor.cs │ │ ├── NavMeshModifierVolumeEditor.cs.meta │ │ ├── NavMeshSurfaceEditor.cs │ │ └── NavMeshSurfaceEditor.cs.meta │ │ ├── Scripts.meta │ │ └── Scripts │ │ ├── NavMeshLink.cs │ │ ├── NavMeshLink.cs.meta │ │ ├── NavMeshModifier.cs │ │ ├── NavMeshModifier.cs.meta │ │ ├── NavMeshModifierVolume.cs │ │ ├── NavMeshModifierVolume.cs.meta │ │ ├── NavMeshSurface.cs │ │ └── NavMeshSurface.cs.meta └── ProjectSettings │ ├── AudioManager.asset │ ├── ClusterInputManager.asset │ ├── DynamicsManager.asset │ ├── EditorBuildSettings.asset │ ├── EditorSettings.asset │ ├── GraphicsSettings.asset │ ├── InputManager.asset │ ├── NavMeshAreas.asset │ ├── NetworkManager.asset │ ├── Physics2DSettings.asset │ ├── ProjectSettings.asset │ ├── ProjectVersion.txt │ ├── QualitySettings.asset │ ├── TagManager.asset │ ├── TimeManager.asset │ └── UnityConnectSettings.asset └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # =============== # 2 | # Unity folders # 3 | # =============== # 4 | [Ll]ibrary/ 5 | [Tt]emp/ 6 | [Oo]bj/ 7 | 3rdParty/ 8 | Builds/ 9 | 10 | # ===================================== # 11 | # Visual Studio / MonoDevelop generated # 12 | # ===================================== # 13 | ExportedObj/ 14 | obj/ 15 | *.svd 16 | *.userprefs 17 | *.csproj 18 | *.pidb 19 | *.suo 20 | *.sln 21 | *.user 22 | *.unityproj 23 | *.booproj 24 | 25 | # ===================================== # 26 | # Unity generated # 27 | # ===================================== # 28 | *.pidb.meta 29 | sysinfo.txt 30 | 31 | # ============ # 32 | # OS generated # 33 | # ============ # 34 | .DS_Store 35 | .DS_Store? 36 | ._* 37 | .Spotlight-V100 38 | .Trashes 39 | ehthumbs.db 40 | Thumbs.db 41 | -------------------------------------------------------------------------------- /NavMesh Example Project/.vs/NavMesh Example Project/v15/sqlite3/storage.ide: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Brackeys/NavMesh-Tutorial/c3285719eb38708475df619e6f6546a6f01af42d/NavMesh Example Project/.vs/NavMesh Example Project/v15/sqlite3/storage.ide -------------------------------------------------------------------------------- /NavMesh Example Project/.vs/NavMesh/v15/sqlite3/storage.ide: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Brackeys/NavMesh-Tutorial/c3285719eb38708475df619e6f6546a6f01af42d/NavMesh Example Project/.vs/NavMesh/v15/sqlite3/storage.ide -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example01 - Basics.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 681462158618ff14eb5993e39e8d0f19 3 | folderAsset: yes 4 | timeCreated: 1520587940 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example01 - Basics.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: 8 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: 2 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.44657844, g: 0.49641222, b: 0.57481694, a: 1} 42 | --- !u!157 &3 43 | LightmapSettings: 44 | m_ObjectHideFlags: 0 45 | serializedVersion: 11 46 | m_GIWorkflowMode: 0 47 | m_GISettings: 48 | serializedVersion: 2 49 | m_BounceScale: 1 50 | m_IndirectOutputScale: 1 51 | m_AlbedoBoost: 1 52 | m_TemporalCoherenceThreshold: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 1 56 | m_LightmapEditorSettings: 57 | serializedVersion: 9 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_TextureWidth: 1024 61 | m_TextureHeight: 1024 62 | m_AO: 0 63 | m_AOMaxDistance: 1 64 | m_CompAOExponent: 1 65 | m_CompAOExponentDirect: 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_PVRFilterTypeDirect: 0 81 | m_PVRFilterTypeIndirect: 0 82 | m_PVRFilterTypeAO: 0 83 | m_PVRFilteringMode: 1 84 | m_PVRCulling: 1 85 | m_PVRFilteringGaussRadiusDirect: 1 86 | m_PVRFilteringGaussRadiusIndirect: 5 87 | m_PVRFilteringGaussRadiusAO: 2 88 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 89 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 90 | m_PVRFilteringAtrousPositionSigmaAO: 1 91 | m_ShowResolutionOverlay: 1 92 | m_LightingDataAsset: {fileID: 0} 93 | m_UseShadowmask: 1 94 | --- !u!196 &4 95 | NavMeshSettings: 96 | serializedVersion: 2 97 | m_ObjectHideFlags: 0 98 | m_BuildSettings: 99 | serializedVersion: 2 100 | agentTypeID: 0 101 | agentRadius: 0.5 102 | agentHeight: 2 103 | agentSlope: 45 104 | agentClimb: 0.4 105 | ledgeDropHeight: 0 106 | maxJumpAcrossDistance: 0 107 | minRegionArea: 2 108 | manualCellSize: 0 109 | cellSize: 0.16666667 110 | manualTileSize: 0 111 | tileSize: 256 112 | accuratePlacement: 0 113 | debug: 114 | m_Flags: 0 115 | m_NavMeshData: {fileID: 0} 116 | --- !u!1 &262276909 117 | GameObject: 118 | m_ObjectHideFlags: 0 119 | m_PrefabParentObject: {fileID: 0} 120 | m_PrefabInternal: {fileID: 0} 121 | serializedVersion: 5 122 | m_Component: 123 | - component: {fileID: 262276911} 124 | - component: {fileID: 262276910} 125 | m_Layer: 0 126 | m_Name: Directional Light 127 | m_TagString: Untagged 128 | m_Icon: {fileID: 0} 129 | m_NavMeshLayer: 0 130 | m_StaticEditorFlags: 0 131 | m_IsActive: 1 132 | --- !u!108 &262276910 133 | Light: 134 | m_ObjectHideFlags: 0 135 | m_PrefabParentObject: {fileID: 0} 136 | m_PrefabInternal: {fileID: 0} 137 | m_GameObject: {fileID: 262276909} 138 | m_Enabled: 1 139 | serializedVersion: 8 140 | m_Type: 1 141 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 142 | m_Intensity: 1 143 | m_Range: 10 144 | m_SpotAngle: 30 145 | m_CookieSize: 10 146 | m_Shadows: 147 | m_Type: 2 148 | m_Resolution: -1 149 | m_CustomResolution: -1 150 | m_Strength: 1 151 | m_Bias: 0.05 152 | m_NormalBias: 0.4 153 | m_NearPlane: 0.2 154 | m_Cookie: {fileID: 0} 155 | m_DrawHalo: 0 156 | m_Flare: {fileID: 0} 157 | m_RenderMode: 0 158 | m_CullingMask: 159 | serializedVersion: 2 160 | m_Bits: 4294967295 161 | m_Lightmapping: 4 162 | m_AreaSize: {x: 1, y: 1} 163 | m_BounceIntensity: 1 164 | m_ColorTemperature: 6570 165 | m_UseColorTemperature: 0 166 | m_ShadowRadius: 0 167 | m_ShadowAngle: 0 168 | --- !u!4 &262276911 169 | Transform: 170 | m_ObjectHideFlags: 0 171 | m_PrefabParentObject: {fileID: 0} 172 | m_PrefabInternal: {fileID: 0} 173 | m_GameObject: {fileID: 262276909} 174 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 175 | m_LocalPosition: {x: 0, y: 3, z: 0} 176 | m_LocalScale: {x: 1, y: 1, z: 1} 177 | m_Children: [] 178 | m_Father: {fileID: 0} 179 | m_RootOrder: 1 180 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 181 | --- !u!1001 &730358490 182 | Prefab: 183 | m_ObjectHideFlags: 0 184 | serializedVersion: 2 185 | m_Modification: 186 | m_TransformParent: {fileID: 0} 187 | m_Modifications: 188 | - target: {fileID: 400002, guid: 172276cc9c6eac545ac9183214a11a68, type: 3} 189 | propertyPath: m_LocalPosition.x 190 | value: 0 191 | objectReference: {fileID: 0} 192 | - target: {fileID: 400002, guid: 172276cc9c6eac545ac9183214a11a68, type: 3} 193 | propertyPath: m_LocalPosition.y 194 | value: 1 195 | objectReference: {fileID: 0} 196 | - target: {fileID: 400002, guid: 172276cc9c6eac545ac9183214a11a68, type: 3} 197 | propertyPath: m_LocalPosition.z 198 | value: 0 199 | objectReference: {fileID: 0} 200 | - target: {fileID: 400002, guid: 172276cc9c6eac545ac9183214a11a68, type: 3} 201 | propertyPath: m_LocalRotation.x 202 | value: 0 203 | objectReference: {fileID: 0} 204 | - target: {fileID: 400002, guid: 172276cc9c6eac545ac9183214a11a68, type: 3} 205 | propertyPath: m_LocalRotation.y 206 | value: 0 207 | objectReference: {fileID: 0} 208 | - target: {fileID: 400002, guid: 172276cc9c6eac545ac9183214a11a68, type: 3} 209 | propertyPath: m_LocalRotation.z 210 | value: 0 211 | objectReference: {fileID: 0} 212 | - target: {fileID: 400002, guid: 172276cc9c6eac545ac9183214a11a68, type: 3} 213 | propertyPath: m_LocalRotation.w 214 | value: 1 215 | objectReference: {fileID: 0} 216 | - target: {fileID: 400002, guid: 172276cc9c6eac545ac9183214a11a68, type: 3} 217 | propertyPath: m_RootOrder 218 | value: 3 219 | objectReference: {fileID: 0} 220 | - target: {fileID: 2300000, guid: 172276cc9c6eac545ac9183214a11a68, type: 3} 221 | propertyPath: m_Materials.Array.data[0] 222 | value: 223 | objectReference: {fileID: 2100000, guid: 3f3eb11f68c607144aa56d9f83cd26c9, type: 2} 224 | - target: {fileID: 2300002, guid: 172276cc9c6eac545ac9183214a11a68, type: 3} 225 | propertyPath: m_Materials.Array.data[0] 226 | value: 227 | objectReference: {fileID: 2100000, guid: 516e6b06e20bb974aa29ea7459753cbe, type: 2} 228 | m_RemovedComponents: [] 229 | m_ParentPrefab: {fileID: 100100000, guid: 172276cc9c6eac545ac9183214a11a68, type: 3} 230 | m_IsPrefabParent: 0 231 | --- !u!1 &906444435 232 | GameObject: 233 | m_ObjectHideFlags: 0 234 | m_PrefabParentObject: {fileID: 0} 235 | m_PrefabInternal: {fileID: 0} 236 | serializedVersion: 5 237 | m_Component: 238 | - component: {fileID: 906444440} 239 | - component: {fileID: 906444439} 240 | - component: {fileID: 906444437} 241 | - component: {fileID: 906444436} 242 | m_Layer: 0 243 | m_Name: Main Camera 244 | m_TagString: MainCamera 245 | m_Icon: {fileID: 0} 246 | m_NavMeshLayer: 0 247 | m_StaticEditorFlags: 0 248 | m_IsActive: 1 249 | --- !u!81 &906444436 250 | AudioListener: 251 | m_ObjectHideFlags: 0 252 | m_PrefabParentObject: {fileID: 0} 253 | m_PrefabInternal: {fileID: 0} 254 | m_GameObject: {fileID: 906444435} 255 | m_Enabled: 1 256 | --- !u!124 &906444437 257 | Behaviour: 258 | m_ObjectHideFlags: 0 259 | m_PrefabParentObject: {fileID: 0} 260 | m_PrefabInternal: {fileID: 0} 261 | m_GameObject: {fileID: 906444435} 262 | m_Enabled: 1 263 | --- !u!20 &906444439 264 | Camera: 265 | m_ObjectHideFlags: 0 266 | m_PrefabParentObject: {fileID: 0} 267 | m_PrefabInternal: {fileID: 0} 268 | m_GameObject: {fileID: 906444435} 269 | m_Enabled: 1 270 | serializedVersion: 2 271 | m_ClearFlags: 2 272 | m_BackGroundColor: {r: 0.05060553, g: 0.8602941, b: 0.7970372, a: 0} 273 | m_NormalizedViewPortRect: 274 | serializedVersion: 2 275 | x: 0 276 | y: 0 277 | width: 1 278 | height: 1 279 | near clip plane: 0.3 280 | far clip plane: 1000 281 | field of view: 60 282 | orthographic: 1 283 | orthographic size: 12.1 284 | m_Depth: -1 285 | m_CullingMask: 286 | serializedVersion: 2 287 | m_Bits: 4294967295 288 | m_RenderingPath: -1 289 | m_TargetTexture: {fileID: 0} 290 | m_TargetDisplay: 0 291 | m_TargetEye: 3 292 | m_HDR: 1 293 | m_AllowMSAA: 1 294 | m_AllowDynamicResolution: 0 295 | m_ForceIntoRT: 0 296 | m_OcclusionCulling: 1 297 | m_StereoConvergence: 10 298 | m_StereoSeparation: 0.022 299 | --- !u!4 &906444440 300 | Transform: 301 | m_ObjectHideFlags: 0 302 | m_PrefabParentObject: {fileID: 0} 303 | m_PrefabInternal: {fileID: 0} 304 | m_GameObject: {fileID: 906444435} 305 | m_LocalRotation: {x: 0.27781588, y: 0.36497167, z: -0.1150751, w: 0.8811196} 306 | m_LocalPosition: {x: -11.55, y: 10.92, z: -11.55} 307 | m_LocalScale: {x: 1, y: 1, z: 1} 308 | m_Children: [] 309 | m_Father: {fileID: 0} 310 | m_RootOrder: 0 311 | m_LocalEulerAnglesHint: {x: 35, y: 45.000004, z: 0} 312 | --- !u!1 &1112826208 313 | GameObject: 314 | m_ObjectHideFlags: 0 315 | m_PrefabParentObject: {fileID: 0} 316 | m_PrefabInternal: {fileID: 0} 317 | serializedVersion: 5 318 | m_Component: 319 | - component: {fileID: 1112826212} 320 | - component: {fileID: 1112826211} 321 | - component: {fileID: 1112826210} 322 | - component: {fileID: 1112826209} 323 | m_Layer: 0 324 | m_Name: Player 325 | m_TagString: Untagged 326 | m_Icon: {fileID: 0} 327 | m_NavMeshLayer: 0 328 | m_StaticEditorFlags: 0 329 | m_IsActive: 1 330 | --- !u!23 &1112826209 331 | MeshRenderer: 332 | m_ObjectHideFlags: 0 333 | m_PrefabParentObject: {fileID: 0} 334 | m_PrefabInternal: {fileID: 0} 335 | m_GameObject: {fileID: 1112826208} 336 | m_Enabled: 1 337 | m_CastShadows: 1 338 | m_ReceiveShadows: 1 339 | m_DynamicOccludee: 1 340 | m_MotionVectors: 1 341 | m_LightProbeUsage: 1 342 | m_ReflectionProbeUsage: 1 343 | m_Materials: 344 | - {fileID: 2100000, guid: 98dfaa90a779f3e41818a88ee8ec8cc3, type: 2} 345 | m_StaticBatchInfo: 346 | firstSubMesh: 0 347 | subMeshCount: 0 348 | m_StaticBatchRoot: {fileID: 0} 349 | m_ProbeAnchor: {fileID: 0} 350 | m_LightProbeVolumeOverride: {fileID: 0} 351 | m_ScaleInLightmap: 1 352 | m_PreserveUVs: 1 353 | m_IgnoreNormalsForChartDetection: 0 354 | m_ImportantGI: 0 355 | m_StitchLightmapSeams: 0 356 | m_SelectedEditorRenderState: 3 357 | m_MinimumChartSize: 4 358 | m_AutoUVMaxDistance: 0.5 359 | m_AutoUVMaxAngle: 89 360 | m_LightmapParameters: {fileID: 0} 361 | m_SortingLayerID: 0 362 | m_SortingLayer: 0 363 | m_SortingOrder: 0 364 | --- !u!136 &1112826210 365 | CapsuleCollider: 366 | m_ObjectHideFlags: 0 367 | m_PrefabParentObject: {fileID: 0} 368 | m_PrefabInternal: {fileID: 0} 369 | m_GameObject: {fileID: 1112826208} 370 | m_Material: {fileID: 0} 371 | m_IsTrigger: 0 372 | m_Enabled: 1 373 | m_Radius: 0.5 374 | m_Height: 2 375 | m_Direction: 1 376 | m_Center: {x: 0, y: 0, z: 0} 377 | --- !u!33 &1112826211 378 | MeshFilter: 379 | m_ObjectHideFlags: 0 380 | m_PrefabParentObject: {fileID: 0} 381 | m_PrefabInternal: {fileID: 0} 382 | m_GameObject: {fileID: 1112826208} 383 | m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} 384 | --- !u!4 &1112826212 385 | Transform: 386 | m_ObjectHideFlags: 0 387 | m_PrefabParentObject: {fileID: 0} 388 | m_PrefabInternal: {fileID: 0} 389 | m_GameObject: {fileID: 1112826208} 390 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 391 | m_LocalPosition: {x: -9.3, y: 1.25, z: -4.94} 392 | m_LocalScale: {x: 1, y: 0.75, z: 1} 393 | m_Children: [] 394 | m_Father: {fileID: 0} 395 | m_RootOrder: 2 396 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 397 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example01 - Basics.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d027fe1a77511c544ad7d118a03fcb22 3 | timeCreated: 1520434153 4 | licenseType: Pro 5 | DefaultImporter: 6 | externalObjects: {} 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example01 - Basics/Level.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Brackeys/NavMesh-Tutorial/c3285719eb38708475df619e6f6546a6f01af42d/NavMesh Example Project/Assets/Example01 - Basics/Level.fbx -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example01 - Basics/Level.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 172276cc9c6eac545ac9183214a11a68 3 | timeCreated: 1520503083 4 | licenseType: Pro 5 | ModelImporter: 6 | serializedVersion: 22 7 | fileIDToRecycleName: 8 | 100000: Ground 9 | 100002: //RootNode 10 | 100004: Walls 11 | 400000: Ground 12 | 400002: //RootNode 13 | 400004: Walls 14 | 2100000: No Name 15 | 2300000: Ground 16 | 2300002: Walls 17 | 3300000: Ground 18 | 3300002: Walls 19 | 4300000: Walls 20 | 4300002: Ground 21 | externalObjects: {} 22 | materials: 23 | importMaterials: 0 24 | materialName: 0 25 | materialSearch: 1 26 | materialLocation: 1 27 | animations: 28 | legacyGenerateAnimations: 4 29 | bakeSimulation: 0 30 | resampleCurves: 1 31 | optimizeGameObjects: 0 32 | motionNodeName: 33 | rigImportErrors: 34 | rigImportWarnings: 35 | animationImportErrors: 36 | animationImportWarnings: 37 | animationRetargetingWarnings: 38 | animationDoRetargetingWarnings: 0 39 | importAnimatedCustomProperties: 0 40 | animationCompression: 1 41 | animationRotationError: 0.5 42 | animationPositionError: 0.5 43 | animationScaleError: 0.5 44 | animationWrapMode: 0 45 | extraExposedTransformPaths: [] 46 | extraUserProperties: [] 47 | clipAnimations: [] 48 | isReadable: 1 49 | meshes: 50 | lODScreenPercentages: [] 51 | globalScale: 1 52 | meshCompression: 0 53 | addColliders: 0 54 | importVisibility: 1 55 | importBlendShapes: 1 56 | importCameras: 1 57 | importLights: 1 58 | swapUVChannels: 0 59 | generateSecondaryUV: 0 60 | useFileUnits: 1 61 | optimizeMeshForGPU: 1 62 | keepQuads: 0 63 | weldVertices: 1 64 | preserveHierarchy: 0 65 | indexFormat: 0 66 | secondaryUVAngleDistortion: 8 67 | secondaryUVAreaDistortion: 15.000001 68 | secondaryUVHardAngle: 88 69 | secondaryUVPackMargin: 4 70 | useFileScale: 1 71 | tangentSpace: 72 | normalSmoothAngle: 60 73 | normalImportMode: 0 74 | tangentImportMode: 3 75 | normalCalculationMode: 4 76 | importAnimation: 1 77 | copyAvatar: 0 78 | humanDescription: 79 | serializedVersion: 2 80 | human: [] 81 | skeleton: [] 82 | armTwist: 0.5 83 | foreArmTwist: 0.5 84 | upperLegTwist: 0.5 85 | legTwist: 0.5 86 | armStretch: 0.05 87 | legStretch: 0.05 88 | feetSpacing: 0 89 | rootMotionBoneName: 90 | rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} 91 | hasTranslationDoF: 0 92 | hasExtraRoot: 0 93 | skeletonHasParents: 1 94 | lastHumanDescriptionAvatarSource: {instanceID: 0} 95 | animationType: 0 96 | humanoidOversampling: 1 97 | additionalBone: 0 98 | userData: 99 | assetBundleName: 100 | assetBundleVariant: 101 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example01 - Basics/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ae0ed63b2453e1146bdd4d6e616fe315 3 | folderAsset: yes 4 | timeCreated: 1520434743 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example01 - Basics/Materials/Ground.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Ground 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 0.6397059, g: 0.5343426, b: 0.3762976, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example01 - Basics/Materials/Ground.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3f3eb11f68c607144aa56d9f83cd26c9 3 | timeCreated: 1495102886 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example01 - Basics/Materials/Player.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Player 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 0.26309204, g: 0.6544118, b: 0.23096885, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example01 - Basics/Materials/Player.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 98dfaa90a779f3e41818a88ee8ec8cc3 3 | timeCreated: 1495102886 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example01 - Basics/Materials/Walls.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Walls 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 0.1773807, g: 0.18382353, b: 0.16625217, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example01 - Basics/Materials/Walls.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 516e6b06e20bb974aa29ea7459753cbe 3 | timeCreated: 1495102886 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example02 - Obstacles.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2d660dcb65e72f24897c2f1a19cde348 3 | folderAsset: yes 4 | timeCreated: 1520587940 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example02 - Obstacles.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 15808f7fbd554c14d8971512aec98bef 3 | timeCreated: 1520434153 4 | licenseType: Pro 5 | DefaultImporter: 6 | externalObjects: {} 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example02 - Obstacles/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 33ad059158989d6428f117068ea5d5c9 3 | folderAsset: yes 4 | timeCreated: 1520434743 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example02 - Obstacles/Materials/Ground.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Ground 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 0.08235294, g: 0.08235294, b: 0.08235294, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example02 - Obstacles/Materials/Ground.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3841a9e2bba08994ca2e9f4427f13318 3 | timeCreated: 1495102886 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example02 - Obstacles/Materials/Obstacle.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Obstacle 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 0.972549, g: 0.25882354, b: 0.25882354, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example02 - Obstacles/Materials/Obstacle.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7b3b4b9b2f30107469ccfb1934c3e2e3 3 | timeCreated: 1495102886 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example02 - Obstacles/Materials/Player.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Player 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 0.26309204, g: 0.6544118, b: 0.23096885, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example02 - Obstacles/Materials/Player.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7ab5b41445aaf9647a5bab173525f3b2 3 | timeCreated: 1495102886 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example02 - Obstacles/ObstacleAnimation.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class ObstacleAnimation : MonoBehaviour { 6 | 7 | public float speed = .2f; 8 | public float strength = 9f; 9 | 10 | private float randomOffset; 11 | 12 | // Use this for initialization 13 | void Start () { 14 | randomOffset = Random.Range(0f, 2f); 15 | } 16 | 17 | // Update is called once per frame 18 | void Update () { 19 | Vector3 pos = transform.position; 20 | pos.x = Mathf.Sin(Time.time * speed + randomOffset) * strength; 21 | transform.position = pos; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example02 - Obstacles/ObstacleAnimation.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 974c55d9ebac30b429a1413d331873d9 3 | timeCreated: 1520588366 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example03 - Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8d8bfd976eef0f349aa6accbb0f5d7a1 3 | folderAsset: yes 4 | timeCreated: 1520590059 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example03 - Runtime.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: 8 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: 2 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.44657844, g: 0.49641222, b: 0.57481694, a: 1} 42 | --- !u!157 &3 43 | LightmapSettings: 44 | m_ObjectHideFlags: 0 45 | serializedVersion: 11 46 | m_GIWorkflowMode: 0 47 | m_GISettings: 48 | serializedVersion: 2 49 | m_BounceScale: 1 50 | m_IndirectOutputScale: 1 51 | m_AlbedoBoost: 1 52 | m_TemporalCoherenceThreshold: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 1 56 | m_LightmapEditorSettings: 57 | serializedVersion: 9 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_TextureWidth: 1024 61 | m_TextureHeight: 1024 62 | m_AO: 0 63 | m_AOMaxDistance: 1 64 | m_CompAOExponent: 1 65 | m_CompAOExponentDirect: 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_PVRFilterTypeDirect: 0 81 | m_PVRFilterTypeIndirect: 0 82 | m_PVRFilterTypeAO: 0 83 | m_PVRFilteringMode: 1 84 | m_PVRCulling: 1 85 | m_PVRFilteringGaussRadiusDirect: 1 86 | m_PVRFilteringGaussRadiusIndirect: 5 87 | m_PVRFilteringGaussRadiusAO: 2 88 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 89 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 90 | m_PVRFilteringAtrousPositionSigmaAO: 1 91 | m_ShowResolutionOverlay: 1 92 | m_LightingDataAsset: {fileID: 0} 93 | m_UseShadowmask: 1 94 | --- !u!196 &4 95 | NavMeshSettings: 96 | serializedVersion: 2 97 | m_ObjectHideFlags: 0 98 | m_BuildSettings: 99 | serializedVersion: 2 100 | agentTypeID: 0 101 | agentRadius: 0.5 102 | agentHeight: 2 103 | agentSlope: 45 104 | agentClimb: 0.4 105 | ledgeDropHeight: 0 106 | maxJumpAcrossDistance: 0 107 | minRegionArea: 2 108 | manualCellSize: 0 109 | cellSize: 0.16666667 110 | manualTileSize: 0 111 | tileSize: 256 112 | accuratePlacement: 0 113 | debug: 114 | m_Flags: 0 115 | m_NavMeshData: {fileID: 0} 116 | --- !u!1 &141808496 117 | GameObject: 118 | m_ObjectHideFlags: 0 119 | m_PrefabParentObject: {fileID: 100000, guid: 172276cc9c6eac545ac9183214a11a68, type: 3} 120 | m_PrefabInternal: {fileID: 0} 121 | serializedVersion: 5 122 | m_Component: 123 | - component: {fileID: 141808500} 124 | - component: {fileID: 141808499} 125 | - component: {fileID: 141808497} 126 | - component: {fileID: 141808498} 127 | m_Layer: 0 128 | m_Name: Ground 129 | m_TagString: Untagged 130 | m_Icon: {fileID: 0} 131 | m_NavMeshLayer: 0 132 | m_StaticEditorFlags: 0 133 | m_IsActive: 1 134 | --- !u!23 &141808497 135 | MeshRenderer: 136 | m_ObjectHideFlags: 0 137 | m_PrefabParentObject: {fileID: 2300000, guid: 172276cc9c6eac545ac9183214a11a68, 138 | type: 3} 139 | m_PrefabInternal: {fileID: 0} 140 | m_GameObject: {fileID: 141808496} 141 | m_Enabled: 1 142 | m_CastShadows: 1 143 | m_ReceiveShadows: 1 144 | m_DynamicOccludee: 1 145 | m_MotionVectors: 1 146 | m_LightProbeUsage: 1 147 | m_ReflectionProbeUsage: 1 148 | m_Materials: 149 | - {fileID: 2100000, guid: daa68a32eef103b498047437a683799e, type: 2} 150 | m_StaticBatchInfo: 151 | firstSubMesh: 0 152 | subMeshCount: 0 153 | m_StaticBatchRoot: {fileID: 0} 154 | m_ProbeAnchor: {fileID: 0} 155 | m_LightProbeVolumeOverride: {fileID: 0} 156 | m_ScaleInLightmap: 1 157 | m_PreserveUVs: 0 158 | m_IgnoreNormalsForChartDetection: 0 159 | m_ImportantGI: 0 160 | m_StitchLightmapSeams: 0 161 | m_SelectedEditorRenderState: 3 162 | m_MinimumChartSize: 4 163 | m_AutoUVMaxDistance: 0.5 164 | m_AutoUVMaxAngle: 89 165 | m_LightmapParameters: {fileID: 0} 166 | m_SortingLayerID: 0 167 | m_SortingLayer: 0 168 | m_SortingOrder: 0 169 | --- !u!65 &141808498 170 | BoxCollider: 171 | m_ObjectHideFlags: 0 172 | m_PrefabParentObject: {fileID: 0} 173 | m_PrefabInternal: {fileID: 0} 174 | m_GameObject: {fileID: 141808496} 175 | m_Material: {fileID: 0} 176 | m_IsTrigger: 0 177 | m_Enabled: 1 178 | serializedVersion: 2 179 | m_Size: {x: 22, y: 1.32, z: 22} 180 | m_Center: {x: 0, y: 0.44, z: 0} 181 | --- !u!33 &141808499 182 | MeshFilter: 183 | m_ObjectHideFlags: 0 184 | m_PrefabParentObject: {fileID: 3300000, guid: 172276cc9c6eac545ac9183214a11a68, 185 | type: 3} 186 | m_PrefabInternal: {fileID: 0} 187 | m_GameObject: {fileID: 141808496} 188 | m_Mesh: {fileID: 4300002, guid: 172276cc9c6eac545ac9183214a11a68, type: 3} 189 | --- !u!4 &141808500 190 | Transform: 191 | m_ObjectHideFlags: 0 192 | m_PrefabParentObject: {fileID: 400000, guid: 172276cc9c6eac545ac9183214a11a68, type: 3} 193 | m_PrefabInternal: {fileID: 0} 194 | m_GameObject: {fileID: 141808496} 195 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 196 | m_LocalPosition: {x: 0, y: -0.5749999, z: 0} 197 | m_LocalScale: {x: 1, y: 1, z: 1} 198 | m_Children: [] 199 | m_Father: {fileID: 0} 200 | m_RootOrder: 4 201 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 202 | --- !u!1 &262276909 203 | GameObject: 204 | m_ObjectHideFlags: 0 205 | m_PrefabParentObject: {fileID: 0} 206 | m_PrefabInternal: {fileID: 0} 207 | serializedVersion: 5 208 | m_Component: 209 | - component: {fileID: 262276911} 210 | - component: {fileID: 262276910} 211 | m_Layer: 0 212 | m_Name: Directional Light 213 | m_TagString: Untagged 214 | m_Icon: {fileID: 0} 215 | m_NavMeshLayer: 0 216 | m_StaticEditorFlags: 0 217 | m_IsActive: 1 218 | --- !u!108 &262276910 219 | Light: 220 | m_ObjectHideFlags: 0 221 | m_PrefabParentObject: {fileID: 0} 222 | m_PrefabInternal: {fileID: 0} 223 | m_GameObject: {fileID: 262276909} 224 | m_Enabled: 1 225 | serializedVersion: 8 226 | m_Type: 1 227 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 228 | m_Intensity: 1 229 | m_Range: 10 230 | m_SpotAngle: 30 231 | m_CookieSize: 10 232 | m_Shadows: 233 | m_Type: 2 234 | m_Resolution: -1 235 | m_CustomResolution: -1 236 | m_Strength: 1 237 | m_Bias: 0.05 238 | m_NormalBias: 0.4 239 | m_NearPlane: 0.2 240 | m_Cookie: {fileID: 0} 241 | m_DrawHalo: 0 242 | m_Flare: {fileID: 0} 243 | m_RenderMode: 0 244 | m_CullingMask: 245 | serializedVersion: 2 246 | m_Bits: 4294967295 247 | m_Lightmapping: 4 248 | m_AreaSize: {x: 1, y: 1} 249 | m_BounceIntensity: 1 250 | m_ColorTemperature: 6570 251 | m_UseColorTemperature: 0 252 | m_ShadowRadius: 0 253 | m_ShadowAngle: 0 254 | --- !u!4 &262276911 255 | Transform: 256 | m_ObjectHideFlags: 0 257 | m_PrefabParentObject: {fileID: 0} 258 | m_PrefabInternal: {fileID: 0} 259 | m_GameObject: {fileID: 262276909} 260 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 261 | m_LocalPosition: {x: 0, y: 3, z: 0} 262 | m_LocalScale: {x: 1, y: 1, z: 1} 263 | m_Children: [] 264 | m_Father: {fileID: 0} 265 | m_RootOrder: 3 266 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 267 | --- !u!1 &906444435 268 | GameObject: 269 | m_ObjectHideFlags: 0 270 | m_PrefabParentObject: {fileID: 0} 271 | m_PrefabInternal: {fileID: 0} 272 | serializedVersion: 5 273 | m_Component: 274 | - component: {fileID: 906444440} 275 | - component: {fileID: 906444439} 276 | - component: {fileID: 906444437} 277 | - component: {fileID: 906444436} 278 | m_Layer: 0 279 | m_Name: Main Camera 280 | m_TagString: MainCamera 281 | m_Icon: {fileID: 0} 282 | m_NavMeshLayer: 0 283 | m_StaticEditorFlags: 0 284 | m_IsActive: 1 285 | --- !u!81 &906444436 286 | AudioListener: 287 | m_ObjectHideFlags: 0 288 | m_PrefabParentObject: {fileID: 0} 289 | m_PrefabInternal: {fileID: 0} 290 | m_GameObject: {fileID: 906444435} 291 | m_Enabled: 1 292 | --- !u!124 &906444437 293 | Behaviour: 294 | m_ObjectHideFlags: 0 295 | m_PrefabParentObject: {fileID: 0} 296 | m_PrefabInternal: {fileID: 0} 297 | m_GameObject: {fileID: 906444435} 298 | m_Enabled: 1 299 | --- !u!20 &906444439 300 | Camera: 301 | m_ObjectHideFlags: 0 302 | m_PrefabParentObject: {fileID: 0} 303 | m_PrefabInternal: {fileID: 0} 304 | m_GameObject: {fileID: 906444435} 305 | m_Enabled: 1 306 | serializedVersion: 2 307 | m_ClearFlags: 2 308 | m_BackGroundColor: {r: 0.05060553, g: 0.8602941, b: 0.7970372, a: 0} 309 | m_NormalizedViewPortRect: 310 | serializedVersion: 2 311 | x: 0 312 | y: 0 313 | width: 1 314 | height: 1 315 | near clip plane: 0.3 316 | far clip plane: 1000 317 | field of view: 60 318 | orthographic: 1 319 | orthographic size: 12.1 320 | m_Depth: -1 321 | m_CullingMask: 322 | serializedVersion: 2 323 | m_Bits: 4294967295 324 | m_RenderingPath: -1 325 | m_TargetTexture: {fileID: 0} 326 | m_TargetDisplay: 0 327 | m_TargetEye: 3 328 | m_HDR: 1 329 | m_AllowMSAA: 1 330 | m_AllowDynamicResolution: 0 331 | m_ForceIntoRT: 0 332 | m_OcclusionCulling: 1 333 | m_StereoConvergence: 10 334 | m_StereoSeparation: 0.022 335 | --- !u!4 &906444440 336 | Transform: 337 | m_ObjectHideFlags: 0 338 | m_PrefabParentObject: {fileID: 0} 339 | m_PrefabInternal: {fileID: 0} 340 | m_GameObject: {fileID: 906444435} 341 | m_LocalRotation: {x: 0.27781588, y: 0.36497167, z: -0.1150751, w: 0.8811196} 342 | m_LocalPosition: {x: -11.55, y: 10.92, z: -11.55} 343 | m_LocalScale: {x: 1, y: 1, z: 1} 344 | m_Children: [] 345 | m_Father: {fileID: 0} 346 | m_RootOrder: 2 347 | m_LocalEulerAnglesHint: {x: 35, y: 45.000004, z: 0} 348 | --- !u!1 &1007932015 349 | GameObject: 350 | m_ObjectHideFlags: 0 351 | m_PrefabParentObject: {fileID: 0} 352 | m_PrefabInternal: {fileID: 0} 353 | serializedVersion: 5 354 | m_Component: 355 | - component: {fileID: 1007932017} 356 | - component: {fileID: 1007932016} 357 | m_Layer: 0 358 | m_Name: NavMesh 359 | m_TagString: Untagged 360 | m_Icon: {fileID: 0} 361 | m_NavMeshLayer: 0 362 | m_StaticEditorFlags: 0 363 | m_IsActive: 1 364 | --- !u!114 &1007932016 365 | MonoBehaviour: 366 | m_ObjectHideFlags: 0 367 | m_PrefabParentObject: {fileID: 0} 368 | m_PrefabInternal: {fileID: 0} 369 | m_GameObject: {fileID: 1007932015} 370 | m_Enabled: 1 371 | m_EditorHideFlags: 0 372 | m_Script: {fileID: 11500000, guid: 3df27b9289d1e8c4fb82e0df4f4673ba, type: 3} 373 | m_Name: 374 | m_EditorClassIdentifier: 375 | m_AgentTypeID: 0 376 | m_CollectObjects: 0 377 | m_Size: {x: 10, y: 10, z: 10} 378 | m_Center: {x: 0, y: 2, z: 0} 379 | m_LayerMask: 380 | serializedVersion: 2 381 | m_Bits: 4294967039 382 | m_UseGeometry: 0 383 | m_DefaultArea: 0 384 | m_IgnoreNavMeshAgent: 1 385 | m_IgnoreNavMeshObstacle: 1 386 | m_OverrideTileSize: 0 387 | m_TileSize: 256 388 | m_OverrideVoxelSize: 0 389 | m_VoxelSize: 0.16666667 390 | m_BuildHeightMesh: 0 391 | m_NavMeshData: {fileID: 0} 392 | --- !u!4 &1007932017 393 | Transform: 394 | m_ObjectHideFlags: 0 395 | m_PrefabParentObject: {fileID: 0} 396 | m_PrefabInternal: {fileID: 0} 397 | m_GameObject: {fileID: 1007932015} 398 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 399 | m_LocalPosition: {x: 0, y: 0, z: 0} 400 | m_LocalScale: {x: 1, y: 1, z: 1} 401 | m_Children: [] 402 | m_Father: {fileID: 0} 403 | m_RootOrder: 0 404 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 405 | --- !u!1 &1578973043 406 | GameObject: 407 | m_ObjectHideFlags: 0 408 | m_PrefabParentObject: {fileID: 0} 409 | m_PrefabInternal: {fileID: 0} 410 | serializedVersion: 5 411 | m_Component: 412 | - component: {fileID: 1578973044} 413 | - component: {fileID: 1578973045} 414 | m_Layer: 0 415 | m_Name: LevelGenerator 416 | m_TagString: Untagged 417 | m_Icon: {fileID: 0} 418 | m_NavMeshLayer: 0 419 | m_StaticEditorFlags: 0 420 | m_IsActive: 1 421 | --- !u!4 &1578973044 422 | Transform: 423 | m_ObjectHideFlags: 0 424 | m_PrefabParentObject: {fileID: 0} 425 | m_PrefabInternal: {fileID: 0} 426 | m_GameObject: {fileID: 1578973043} 427 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 428 | m_LocalPosition: {x: 0, y: 0, z: 0} 429 | m_LocalScale: {x: 1, y: 1, z: 1} 430 | m_Children: [] 431 | m_Father: {fileID: 0} 432 | m_RootOrder: 1 433 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 434 | --- !u!114 &1578973045 435 | MonoBehaviour: 436 | m_ObjectHideFlags: 0 437 | m_PrefabParentObject: {fileID: 0} 438 | m_PrefabInternal: {fileID: 0} 439 | m_GameObject: {fileID: 1578973043} 440 | m_Enabled: 1 441 | m_EditorHideFlags: 0 442 | m_Script: {fileID: 11500000, guid: 9c84d09a7dd944e478b5dff1aca22dca, type: 3} 443 | m_Name: 444 | m_EditorClassIdentifier: 445 | width: 20 446 | height: 20 447 | wall: {fileID: 1958891013373530, guid: 50c2b0c5c4d64eb499af91a6741150ea, type: 2} 448 | player: {fileID: 1885277800803042, guid: 24a16ae1cdc113a4fbe8be04672f1592, type: 2} 449 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example03 - Runtime.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3b7d1a8aea3e8e544bbd87836cfae60e 3 | timeCreated: 1520434153 4 | licenseType: Pro 5 | DefaultImporter: 6 | externalObjects: {} 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example03 - Runtime/LevelGenerator.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class LevelGenerator : MonoBehaviour { 4 | 5 | public int width = 10; 6 | public int height = 10; 7 | 8 | public GameObject wall; 9 | public GameObject player; 10 | 11 | private bool playerSpawned = false; 12 | 13 | // Use this for initialization 14 | void Start () { 15 | GenerateLevel(); 16 | } 17 | 18 | // Create a grid based level 19 | void GenerateLevel() 20 | { 21 | // Loop over the grid 22 | for (int x = 0; x <= width; x+=2) 23 | { 24 | for (int y = 0; y <= height; y+=2) 25 | { 26 | // Should we place a wall? 27 | if (Random.value > .7f) 28 | { 29 | // Spawn a wall 30 | Vector3 pos = new Vector3(x - width / 2f, 1f, y - height / 2f); 31 | Instantiate(wall, pos, Quaternion.identity, transform); 32 | } else if (!playerSpawned) // Should we spawn a player? 33 | { 34 | // Spawn the player 35 | Vector3 pos = new Vector3(x - width / 2f, 1.25f, y - height / 2f); 36 | Instantiate(player, pos, Quaternion.identity); 37 | playerSpawned = true; 38 | } 39 | } 40 | } 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example03 - Runtime/LevelGenerator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9c84d09a7dd944e478b5dff1aca22dca 3 | timeCreated: 1520589840 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example03 - Runtime/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6b0b42231020cb541957d4b9a9097a87 3 | folderAsset: yes 4 | timeCreated: 1520434743 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example03 - Runtime/Materials/Ground.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Ground 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 0.08235294, g: 0.08235294, b: 0.08235294, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example03 - Runtime/Materials/Ground.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: daa68a32eef103b498047437a683799e 3 | timeCreated: 1495102886 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example03 - Runtime/Materials/Player.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Player 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 0.26309204, g: 0.6544118, b: 0.23096885, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example03 - Runtime/Materials/Player.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9494caa7ee80f6e4385e191ee0f242e8 3 | timeCreated: 1495102886 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example03 - Runtime/Materials/Walls.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Walls 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 0.25882357, g: 0.50001365, b: 0.972549, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example03 - Runtime/Materials/Walls.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1c4058d5cb706fe4a98fda6995eecdb6 3 | timeCreated: 1495102886 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example03 - Runtime/Player.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_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1885277800803042} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1885277800803042 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4709505581537890} 22 | - component: {fileID: 33362126971568244} 23 | - component: {fileID: 136508432818967268} 24 | - component: {fileID: 23804264398939652} 25 | - component: {fileID: 195871887324367816} 26 | m_Layer: 8 27 | m_Name: Player 28 | m_TagString: Untagged 29 | m_Icon: {fileID: 0} 30 | m_NavMeshLayer: 0 31 | m_StaticEditorFlags: 0 32 | m_IsActive: 1 33 | --- !u!4 &4709505581537890 34 | Transform: 35 | m_ObjectHideFlags: 1 36 | m_PrefabParentObject: {fileID: 0} 37 | m_PrefabInternal: {fileID: 100100000} 38 | m_GameObject: {fileID: 1885277800803042} 39 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 40 | m_LocalPosition: {x: -9.3, y: 1.25, z: -4.94} 41 | m_LocalScale: {x: 1, y: 0.75, z: 1} 42 | m_Children: [] 43 | m_Father: {fileID: 0} 44 | m_RootOrder: 0 45 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 46 | --- !u!23 &23804264398939652 47 | MeshRenderer: 48 | m_ObjectHideFlags: 1 49 | m_PrefabParentObject: {fileID: 0} 50 | m_PrefabInternal: {fileID: 100100000} 51 | m_GameObject: {fileID: 1885277800803042} 52 | m_Enabled: 1 53 | m_CastShadows: 1 54 | m_ReceiveShadows: 1 55 | m_DynamicOccludee: 1 56 | m_MotionVectors: 1 57 | m_LightProbeUsage: 1 58 | m_ReflectionProbeUsage: 1 59 | m_Materials: 60 | - {fileID: 2100000, guid: 9494caa7ee80f6e4385e191ee0f242e8, type: 2} 61 | m_StaticBatchInfo: 62 | firstSubMesh: 0 63 | subMeshCount: 0 64 | m_StaticBatchRoot: {fileID: 0} 65 | m_ProbeAnchor: {fileID: 0} 66 | m_LightProbeVolumeOverride: {fileID: 0} 67 | m_ScaleInLightmap: 1 68 | m_PreserveUVs: 1 69 | m_IgnoreNormalsForChartDetection: 0 70 | m_ImportantGI: 0 71 | m_StitchLightmapSeams: 0 72 | m_SelectedEditorRenderState: 3 73 | m_MinimumChartSize: 4 74 | m_AutoUVMaxDistance: 0.5 75 | m_AutoUVMaxAngle: 89 76 | m_LightmapParameters: {fileID: 0} 77 | m_SortingLayerID: 0 78 | m_SortingLayer: 0 79 | m_SortingOrder: 0 80 | --- !u!33 &33362126971568244 81 | MeshFilter: 82 | m_ObjectHideFlags: 1 83 | m_PrefabParentObject: {fileID: 0} 84 | m_PrefabInternal: {fileID: 100100000} 85 | m_GameObject: {fileID: 1885277800803042} 86 | m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} 87 | --- !u!136 &136508432818967268 88 | CapsuleCollider: 89 | m_ObjectHideFlags: 1 90 | m_PrefabParentObject: {fileID: 0} 91 | m_PrefabInternal: {fileID: 100100000} 92 | m_GameObject: {fileID: 1885277800803042} 93 | m_Material: {fileID: 0} 94 | m_IsTrigger: 0 95 | m_Enabled: 1 96 | m_Radius: 0.5 97 | m_Height: 2 98 | m_Direction: 1 99 | m_Center: {x: 0, y: 0, z: 0} 100 | --- !u!195 &195871887324367816 101 | NavMeshAgent: 102 | m_ObjectHideFlags: 1 103 | m_PrefabParentObject: {fileID: 0} 104 | m_PrefabInternal: {fileID: 100100000} 105 | m_GameObject: {fileID: 1885277800803042} 106 | m_Enabled: 1 107 | m_AgentTypeID: 0 108 | m_Radius: 0.5000001 109 | m_Speed: 8 110 | m_Acceleration: 15 111 | avoidancePriority: 50 112 | m_AngularSpeed: 180 113 | m_StoppingDistance: 0.1 114 | m_AutoTraverseOffMeshLink: 1 115 | m_AutoBraking: 1 116 | m_AutoRepath: 1 117 | m_Height: 2 118 | m_BaseOffset: 1 119 | m_WalkableMask: 4294967295 120 | m_ObstacleAvoidanceType: 4 121 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example03 - Runtime/Player.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 24a16ae1cdc113a4fbe8be04672f1592 3 | timeCreated: 1520590595 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | externalObjects: {} 7 | mainObjectFileID: 100100000 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example03 - Runtime/Wall.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_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1958891013373530} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1958891013373530 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4241873253535476} 22 | - component: {fileID: 33899671129081696} 23 | - component: {fileID: 65447223335432346} 24 | - component: {fileID: 23215342339374286} 25 | - component: {fileID: 114063094336746440} 26 | m_Layer: 0 27 | m_Name: Wall 28 | m_TagString: Untagged 29 | m_Icon: {fileID: 0} 30 | m_NavMeshLayer: 0 31 | m_StaticEditorFlags: 0 32 | m_IsActive: 1 33 | --- !u!4 &4241873253535476 34 | Transform: 35 | m_ObjectHideFlags: 1 36 | m_PrefabParentObject: {fileID: 0} 37 | m_PrefabInternal: {fileID: 100100000} 38 | m_GameObject: {fileID: 1958891013373530} 39 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 40 | m_LocalPosition: {x: 0, y: 1, z: 0} 41 | m_LocalScale: {x: 2, y: 1, z: 2} 42 | m_Children: [] 43 | m_Father: {fileID: 0} 44 | m_RootOrder: 0 45 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 46 | --- !u!23 &23215342339374286 47 | MeshRenderer: 48 | m_ObjectHideFlags: 1 49 | m_PrefabParentObject: {fileID: 0} 50 | m_PrefabInternal: {fileID: 100100000} 51 | m_GameObject: {fileID: 1958891013373530} 52 | m_Enabled: 1 53 | m_CastShadows: 1 54 | m_ReceiveShadows: 1 55 | m_DynamicOccludee: 1 56 | m_MotionVectors: 1 57 | m_LightProbeUsage: 1 58 | m_ReflectionProbeUsage: 1 59 | m_Materials: 60 | - {fileID: 2100000, guid: 1c4058d5cb706fe4a98fda6995eecdb6, type: 2} 61 | m_StaticBatchInfo: 62 | firstSubMesh: 0 63 | subMeshCount: 0 64 | m_StaticBatchRoot: {fileID: 0} 65 | m_ProbeAnchor: {fileID: 0} 66 | m_LightProbeVolumeOverride: {fileID: 0} 67 | m_ScaleInLightmap: 1 68 | m_PreserveUVs: 1 69 | m_IgnoreNormalsForChartDetection: 0 70 | m_ImportantGI: 0 71 | m_StitchLightmapSeams: 0 72 | m_SelectedEditorRenderState: 3 73 | m_MinimumChartSize: 4 74 | m_AutoUVMaxDistance: 0.5 75 | m_AutoUVMaxAngle: 89 76 | m_LightmapParameters: {fileID: 0} 77 | m_SortingLayerID: 0 78 | m_SortingLayer: 0 79 | m_SortingOrder: 0 80 | --- !u!33 &33899671129081696 81 | MeshFilter: 82 | m_ObjectHideFlags: 1 83 | m_PrefabParentObject: {fileID: 0} 84 | m_PrefabInternal: {fileID: 100100000} 85 | m_GameObject: {fileID: 1958891013373530} 86 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 87 | --- !u!65 &65447223335432346 88 | BoxCollider: 89 | m_ObjectHideFlags: 1 90 | m_PrefabParentObject: {fileID: 0} 91 | m_PrefabInternal: {fileID: 100100000} 92 | m_GameObject: {fileID: 1958891013373530} 93 | m_Material: {fileID: 0} 94 | m_IsTrigger: 0 95 | m_Enabled: 1 96 | serializedVersion: 2 97 | m_Size: {x: 1, y: 1, z: 1} 98 | m_Center: {x: 0, y: 0, z: 0} 99 | --- !u!114 &114063094336746440 100 | MonoBehaviour: 101 | m_ObjectHideFlags: 1 102 | m_PrefabParentObject: {fileID: 0} 103 | m_PrefabInternal: {fileID: 100100000} 104 | m_GameObject: {fileID: 1958891013373530} 105 | m_Enabled: 1 106 | m_EditorHideFlags: 0 107 | m_Script: {fileID: 11500000, guid: 6d07ce676d7afda4dabb3b0f7dd5e654, type: 3} 108 | m_Name: 109 | m_EditorClassIdentifier: 110 | m_OverrideArea: 1 111 | m_Area: 1 112 | m_IgnoreFromBuild: 0 113 | m_AffectedAgents: ffffffff 114 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example03 - Runtime/Wall.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 50c2b0c5c4d64eb499af91a6741150ea 3 | timeCreated: 1520590132 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | externalObjects: {} 7 | mainObjectFileID: 100100000 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example04 - Links.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3c6085e5a0ab67f45a5c3224414d9ea5 3 | folderAsset: yes 4 | timeCreated: 1520587940 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example04 - Links.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6c3391d23674c2345b1108e82c422e4a 3 | timeCreated: 1520434153 4 | licenseType: Pro 5 | DefaultImporter: 6 | externalObjects: {} 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example04 - Links/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 74f2050bafd19a842b3f99e018c51cdb 3 | folderAsset: yes 4 | timeCreated: 1520434743 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example04 - Links/Materials/Ground01.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Ground01 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 0.08235294, g: 0.08235294, b: 0.08235294, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example04 - Links/Materials/Ground01.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 780df1357ed28f44eb476949ffaa96da 3 | timeCreated: 1495102886 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example04 - Links/Materials/Ground02.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Ground02 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 1, g: 0.17647058, b: 0.17647058, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example04 - Links/Materials/Ground02.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e81df52f60ce48b4ba15bfd351252c61 3 | timeCreated: 1495102886 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example04 - Links/Materials/Player.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Player 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 0.26309204, g: 0.6544118, b: 0.23096885, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example04 - Links/Materials/Player.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ee219b6fc3a0c794dbe2f8195b3c7da8 3 | timeCreated: 1495102886 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b2a57d17f46fa794a84a41335c98bfd2 3 | folderAsset: yes 4 | timeCreated: 1520587940 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan.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: 8 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: 2 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.44657844, g: 0.49641222, b: 0.57481694, a: 1} 42 | --- !u!157 &3 43 | LightmapSettings: 44 | m_ObjectHideFlags: 0 45 | serializedVersion: 11 46 | m_GIWorkflowMode: 0 47 | m_GISettings: 48 | serializedVersion: 2 49 | m_BounceScale: 1 50 | m_IndirectOutputScale: 1 51 | m_AlbedoBoost: 1 52 | m_TemporalCoherenceThreshold: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 1 56 | m_LightmapEditorSettings: 57 | serializedVersion: 9 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_TextureWidth: 1024 61 | m_TextureHeight: 1024 62 | m_AO: 0 63 | m_AOMaxDistance: 1 64 | m_CompAOExponent: 1 65 | m_CompAOExponentDirect: 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_PVRFilterTypeDirect: 0 81 | m_PVRFilterTypeIndirect: 0 82 | m_PVRFilterTypeAO: 0 83 | m_PVRFilteringMode: 1 84 | m_PVRCulling: 1 85 | m_PVRFilteringGaussRadiusDirect: 1 86 | m_PVRFilteringGaussRadiusIndirect: 5 87 | m_PVRFilteringGaussRadiusAO: 2 88 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 89 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 90 | m_PVRFilteringAtrousPositionSigmaAO: 1 91 | m_ShowResolutionOverlay: 1 92 | m_LightingDataAsset: {fileID: 0} 93 | m_UseShadowmask: 1 94 | --- !u!196 &4 95 | NavMeshSettings: 96 | serializedVersion: 2 97 | m_ObjectHideFlags: 0 98 | m_BuildSettings: 99 | serializedVersion: 2 100 | agentTypeID: 0 101 | agentRadius: 0.5 102 | agentHeight: 2 103 | agentSlope: 45 104 | agentClimb: 0.4 105 | ledgeDropHeight: 0 106 | maxJumpAcrossDistance: 0 107 | minRegionArea: 2 108 | manualCellSize: 0 109 | cellSize: 0.16666667 110 | manualTileSize: 0 111 | tileSize: 256 112 | accuratePlacement: 0 113 | debug: 114 | m_Flags: 0 115 | m_NavMeshData: {fileID: 0} 116 | --- !u!1 &141808496 stripped 117 | GameObject: 118 | m_PrefabParentObject: {fileID: 100000, guid: 172276cc9c6eac545ac9183214a11a68, type: 3} 119 | m_PrefabInternal: {fileID: 730358490} 120 | --- !u!65 &141808498 121 | BoxCollider: 122 | m_ObjectHideFlags: 0 123 | m_PrefabParentObject: {fileID: 0} 124 | m_PrefabInternal: {fileID: 0} 125 | m_GameObject: {fileID: 141808496} 126 | m_Material: {fileID: 0} 127 | m_IsTrigger: 0 128 | m_Enabled: 1 129 | serializedVersion: 2 130 | m_Size: {x: 22, y: 1.32, z: 22} 131 | m_Center: {x: 0, y: 0.44, z: 0} 132 | --- !u!1 &262276909 133 | GameObject: 134 | m_ObjectHideFlags: 0 135 | m_PrefabParentObject: {fileID: 0} 136 | m_PrefabInternal: {fileID: 0} 137 | serializedVersion: 5 138 | m_Component: 139 | - component: {fileID: 262276911} 140 | - component: {fileID: 262276910} 141 | m_Layer: 0 142 | m_Name: Directional Light 143 | m_TagString: Untagged 144 | m_Icon: {fileID: 0} 145 | m_NavMeshLayer: 0 146 | m_StaticEditorFlags: 0 147 | m_IsActive: 1 148 | --- !u!108 &262276910 149 | Light: 150 | m_ObjectHideFlags: 0 151 | m_PrefabParentObject: {fileID: 0} 152 | m_PrefabInternal: {fileID: 0} 153 | m_GameObject: {fileID: 262276909} 154 | m_Enabled: 1 155 | serializedVersion: 8 156 | m_Type: 1 157 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 158 | m_Intensity: 1 159 | m_Range: 10 160 | m_SpotAngle: 30 161 | m_CookieSize: 10 162 | m_Shadows: 163 | m_Type: 2 164 | m_Resolution: -1 165 | m_CustomResolution: -1 166 | m_Strength: 1 167 | m_Bias: 0.05 168 | m_NormalBias: 0.4 169 | m_NearPlane: 0.2 170 | m_Cookie: {fileID: 0} 171 | m_DrawHalo: 0 172 | m_Flare: {fileID: 0} 173 | m_RenderMode: 0 174 | m_CullingMask: 175 | serializedVersion: 2 176 | m_Bits: 4294967295 177 | m_Lightmapping: 4 178 | m_AreaSize: {x: 1, y: 1} 179 | m_BounceIntensity: 1 180 | m_ColorTemperature: 6570 181 | m_UseColorTemperature: 0 182 | m_ShadowRadius: 0 183 | m_ShadowAngle: 0 184 | --- !u!4 &262276911 185 | Transform: 186 | m_ObjectHideFlags: 0 187 | m_PrefabParentObject: {fileID: 0} 188 | m_PrefabInternal: {fileID: 0} 189 | m_GameObject: {fileID: 262276909} 190 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 191 | m_LocalPosition: {x: 0, y: 3, z: 0} 192 | m_LocalScale: {x: 1, y: 1, z: 1} 193 | m_Children: [] 194 | m_Father: {fileID: 0} 195 | m_RootOrder: 2 196 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 197 | --- !u!1001 &730358490 198 | Prefab: 199 | m_ObjectHideFlags: 0 200 | serializedVersion: 2 201 | m_Modification: 202 | m_TransformParent: {fileID: 0} 203 | m_Modifications: 204 | - target: {fileID: 400002, guid: 172276cc9c6eac545ac9183214a11a68, type: 3} 205 | propertyPath: m_LocalPosition.x 206 | value: 0 207 | objectReference: {fileID: 0} 208 | - target: {fileID: 400002, guid: 172276cc9c6eac545ac9183214a11a68, type: 3} 209 | propertyPath: m_LocalPosition.y 210 | value: 1 211 | objectReference: {fileID: 0} 212 | - target: {fileID: 400002, guid: 172276cc9c6eac545ac9183214a11a68, type: 3} 213 | propertyPath: m_LocalPosition.z 214 | value: 0 215 | objectReference: {fileID: 0} 216 | - target: {fileID: 400002, guid: 172276cc9c6eac545ac9183214a11a68, type: 3} 217 | propertyPath: m_LocalRotation.x 218 | value: 0 219 | objectReference: {fileID: 0} 220 | - target: {fileID: 400002, guid: 172276cc9c6eac545ac9183214a11a68, type: 3} 221 | propertyPath: m_LocalRotation.y 222 | value: 0 223 | objectReference: {fileID: 0} 224 | - target: {fileID: 400002, guid: 172276cc9c6eac545ac9183214a11a68, type: 3} 225 | propertyPath: m_LocalRotation.z 226 | value: 0 227 | objectReference: {fileID: 0} 228 | - target: {fileID: 400002, guid: 172276cc9c6eac545ac9183214a11a68, type: 3} 229 | propertyPath: m_LocalRotation.w 230 | value: 1 231 | objectReference: {fileID: 0} 232 | - target: {fileID: 400002, guid: 172276cc9c6eac545ac9183214a11a68, type: 3} 233 | propertyPath: m_RootOrder 234 | value: 4 235 | objectReference: {fileID: 0} 236 | - target: {fileID: 2300000, guid: 172276cc9c6eac545ac9183214a11a68, type: 3} 237 | propertyPath: m_Materials.Array.data[0] 238 | value: 239 | objectReference: {fileID: 2100000, guid: 8de8d2473f02b4941a3f9b34d257cb6a, type: 2} 240 | - target: {fileID: 2300002, guid: 172276cc9c6eac545ac9183214a11a68, type: 3} 241 | propertyPath: m_Materials.Array.data[0] 242 | value: 243 | objectReference: {fileID: 2100000, guid: 308b2ce0d6a40ab4aa0cb7e71720fcc4, type: 2} 244 | m_RemovedComponents: [] 245 | m_ParentPrefab: {fileID: 100100000, guid: 172276cc9c6eac545ac9183214a11a68, type: 3} 246 | m_IsPrefabParent: 0 247 | --- !u!1 &906444435 248 | GameObject: 249 | m_ObjectHideFlags: 0 250 | m_PrefabParentObject: {fileID: 0} 251 | m_PrefabInternal: {fileID: 0} 252 | serializedVersion: 5 253 | m_Component: 254 | - component: {fileID: 906444440} 255 | - component: {fileID: 906444439} 256 | - component: {fileID: 906444437} 257 | - component: {fileID: 906444436} 258 | m_Layer: 0 259 | m_Name: Main Camera 260 | m_TagString: MainCamera 261 | m_Icon: {fileID: 0} 262 | m_NavMeshLayer: 0 263 | m_StaticEditorFlags: 0 264 | m_IsActive: 1 265 | --- !u!81 &906444436 266 | AudioListener: 267 | m_ObjectHideFlags: 0 268 | m_PrefabParentObject: {fileID: 0} 269 | m_PrefabInternal: {fileID: 0} 270 | m_GameObject: {fileID: 906444435} 271 | m_Enabled: 1 272 | --- !u!124 &906444437 273 | Behaviour: 274 | m_ObjectHideFlags: 0 275 | m_PrefabParentObject: {fileID: 0} 276 | m_PrefabInternal: {fileID: 0} 277 | m_GameObject: {fileID: 906444435} 278 | m_Enabled: 1 279 | --- !u!20 &906444439 280 | Camera: 281 | m_ObjectHideFlags: 0 282 | m_PrefabParentObject: {fileID: 0} 283 | m_PrefabInternal: {fileID: 0} 284 | m_GameObject: {fileID: 906444435} 285 | m_Enabled: 1 286 | serializedVersion: 2 287 | m_ClearFlags: 2 288 | m_BackGroundColor: {r: 0.05060553, g: 0.8602941, b: 0.7970372, a: 0} 289 | m_NormalizedViewPortRect: 290 | serializedVersion: 2 291 | x: 0 292 | y: 0 293 | width: 1 294 | height: 1 295 | near clip plane: 0.3 296 | far clip plane: 1000 297 | field of view: 60 298 | orthographic: 1 299 | orthographic size: 12.1 300 | m_Depth: -1 301 | m_CullingMask: 302 | serializedVersion: 2 303 | m_Bits: 4294967295 304 | m_RenderingPath: -1 305 | m_TargetTexture: {fileID: 0} 306 | m_TargetDisplay: 0 307 | m_TargetEye: 3 308 | m_HDR: 1 309 | m_AllowMSAA: 1 310 | m_AllowDynamicResolution: 0 311 | m_ForceIntoRT: 0 312 | m_OcclusionCulling: 1 313 | m_StereoConvergence: 10 314 | m_StereoSeparation: 0.022 315 | --- !u!4 &906444440 316 | Transform: 317 | m_ObjectHideFlags: 0 318 | m_PrefabParentObject: {fileID: 0} 319 | m_PrefabInternal: {fileID: 0} 320 | m_GameObject: {fileID: 906444435} 321 | m_LocalRotation: {x: 0.27781588, y: 0.36497167, z: -0.1150751, w: 0.8811196} 322 | m_LocalPosition: {x: -11.55, y: 10.92, z: -11.55} 323 | m_LocalScale: {x: 1, y: 1, z: 1} 324 | m_Children: [] 325 | m_Father: {fileID: 0} 326 | m_RootOrder: 1 327 | m_LocalEulerAnglesHint: {x: 35, y: 45.000004, z: 0} 328 | --- !u!1 &1007932015 329 | GameObject: 330 | m_ObjectHideFlags: 0 331 | m_PrefabParentObject: {fileID: 0} 332 | m_PrefabInternal: {fileID: 0} 333 | serializedVersion: 5 334 | m_Component: 335 | - component: {fileID: 1007932017} 336 | - component: {fileID: 1007932016} 337 | m_Layer: 0 338 | m_Name: NavMesh 339 | m_TagString: Untagged 340 | m_Icon: {fileID: 0} 341 | m_NavMeshLayer: 0 342 | m_StaticEditorFlags: 0 343 | m_IsActive: 1 344 | --- !u!114 &1007932016 345 | MonoBehaviour: 346 | m_ObjectHideFlags: 0 347 | m_PrefabParentObject: {fileID: 0} 348 | m_PrefabInternal: {fileID: 0} 349 | m_GameObject: {fileID: 1007932015} 350 | m_Enabled: 1 351 | m_EditorHideFlags: 0 352 | m_Script: {fileID: 11500000, guid: 3df27b9289d1e8c4fb82e0df4f4673ba, type: 3} 353 | m_Name: 354 | m_EditorClassIdentifier: 355 | m_AgentTypeID: 0 356 | m_CollectObjects: 0 357 | m_Size: {x: 10, y: 10, z: 10} 358 | m_Center: {x: 0, y: 2, z: 0} 359 | m_LayerMask: 360 | serializedVersion: 2 361 | m_Bits: 4294967039 362 | m_UseGeometry: 0 363 | m_DefaultArea: 0 364 | m_IgnoreNavMeshAgent: 1 365 | m_IgnoreNavMeshObstacle: 1 366 | m_OverrideTileSize: 0 367 | m_TileSize: 256 368 | m_OverrideVoxelSize: 0 369 | m_VoxelSize: 0.16666667 370 | m_BuildHeightMesh: 0 371 | m_NavMeshData: {fileID: 0} 372 | --- !u!4 &1007932017 373 | Transform: 374 | m_ObjectHideFlags: 0 375 | m_PrefabParentObject: {fileID: 0} 376 | m_PrefabInternal: {fileID: 0} 377 | m_GameObject: {fileID: 1007932015} 378 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 379 | m_LocalPosition: {x: 0, y: 0, z: 0} 380 | m_LocalScale: {x: 1, y: 1, z: 1} 381 | m_Children: [] 382 | m_Father: {fileID: 0} 383 | m_RootOrder: 0 384 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 385 | --- !u!1 &1112826208 386 | GameObject: 387 | m_ObjectHideFlags: 0 388 | m_PrefabParentObject: {fileID: 0} 389 | m_PrefabInternal: {fileID: 0} 390 | serializedVersion: 5 391 | m_Component: 392 | - component: {fileID: 1112826212} 393 | - component: {fileID: 1112826211} 394 | - component: {fileID: 1112826209} 395 | - component: {fileID: 1112826210} 396 | - component: {fileID: 1112826214} 397 | m_Layer: 8 398 | m_Name: Player 399 | m_TagString: Untagged 400 | m_Icon: {fileID: 0} 401 | m_NavMeshLayer: 0 402 | m_StaticEditorFlags: 0 403 | m_IsActive: 1 404 | --- !u!23 &1112826209 405 | MeshRenderer: 406 | m_ObjectHideFlags: 0 407 | m_PrefabParentObject: {fileID: 0} 408 | m_PrefabInternal: {fileID: 0} 409 | m_GameObject: {fileID: 1112826208} 410 | m_Enabled: 1 411 | m_CastShadows: 1 412 | m_ReceiveShadows: 1 413 | m_DynamicOccludee: 1 414 | m_MotionVectors: 1 415 | m_LightProbeUsage: 1 416 | m_ReflectionProbeUsage: 1 417 | m_Materials: 418 | - {fileID: 2100000, guid: 2019ad135fac453488b693f57027201c, type: 2} 419 | m_StaticBatchInfo: 420 | firstSubMesh: 0 421 | subMeshCount: 0 422 | m_StaticBatchRoot: {fileID: 0} 423 | m_ProbeAnchor: {fileID: 0} 424 | m_LightProbeVolumeOverride: {fileID: 0} 425 | m_ScaleInLightmap: 1 426 | m_PreserveUVs: 0 427 | m_IgnoreNormalsForChartDetection: 0 428 | m_ImportantGI: 0 429 | m_StitchLightmapSeams: 0 430 | m_SelectedEditorRenderState: 3 431 | m_MinimumChartSize: 4 432 | m_AutoUVMaxDistance: 0.5 433 | m_AutoUVMaxAngle: 89 434 | m_LightmapParameters: {fileID: 0} 435 | m_SortingLayerID: 0 436 | m_SortingLayer: 0 437 | m_SortingOrder: 0 438 | --- !u!136 &1112826210 439 | CapsuleCollider: 440 | m_ObjectHideFlags: 0 441 | m_PrefabParentObject: {fileID: 0} 442 | m_PrefabInternal: {fileID: 0} 443 | m_GameObject: {fileID: 1112826208} 444 | m_Material: {fileID: 0} 445 | m_IsTrigger: 0 446 | m_Enabled: 1 447 | m_Radius: 0.5 448 | m_Height: 2 449 | m_Direction: 1 450 | m_Center: {x: 0, y: 1, z: 0} 451 | --- !u!33 &1112826211 452 | MeshFilter: 453 | m_ObjectHideFlags: 0 454 | m_PrefabParentObject: {fileID: 0} 455 | m_PrefabInternal: {fileID: 0} 456 | m_GameObject: {fileID: 1112826208} 457 | m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} 458 | --- !u!4 &1112826212 459 | Transform: 460 | m_ObjectHideFlags: 0 461 | m_PrefabParentObject: {fileID: 0} 462 | m_PrefabInternal: {fileID: 0} 463 | m_GameObject: {fileID: 1112826208} 464 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 465 | m_LocalPosition: {x: -9.3, y: 1.54, z: -4.94} 466 | m_LocalScale: {x: 1, y: 1, z: 1} 467 | m_Children: [] 468 | m_Father: {fileID: 0} 469 | m_RootOrder: 3 470 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 471 | --- !u!195 &1112826214 472 | NavMeshAgent: 473 | m_ObjectHideFlags: 0 474 | m_PrefabParentObject: {fileID: 0} 475 | m_PrefabInternal: {fileID: 0} 476 | m_GameObject: {fileID: 1112826208} 477 | m_Enabled: 1 478 | m_AgentTypeID: 0 479 | m_Radius: 0.5 480 | m_Speed: 3 481 | m_Acceleration: 10 482 | avoidancePriority: 50 483 | m_AngularSpeed: 120 484 | m_StoppingDistance: 0.2 485 | m_AutoTraverseOffMeshLink: 1 486 | m_AutoBraking: 1 487 | m_AutoRepath: 1 488 | m_Height: 2 489 | m_BaseOffset: 1 490 | m_WalkableMask: 4294967295 491 | m_ObstacleAvoidanceType: 4 492 | --- !u!1 &1379624012 stripped 493 | GameObject: 494 | m_PrefabParentObject: {fileID: 100004, guid: 172276cc9c6eac545ac9183214a11a68, type: 3} 495 | m_PrefabInternal: {fileID: 730358490} 496 | --- !u!114 &1379624014 497 | MonoBehaviour: 498 | m_ObjectHideFlags: 0 499 | m_PrefabParentObject: {fileID: 0} 500 | m_PrefabInternal: {fileID: 0} 501 | m_GameObject: {fileID: 1379624012} 502 | m_Enabled: 1 503 | m_EditorHideFlags: 0 504 | m_Script: {fileID: 11500000, guid: 6d07ce676d7afda4dabb3b0f7dd5e654, type: 3} 505 | m_Name: 506 | m_EditorClassIdentifier: 507 | m_OverrideArea: 1 508 | m_Area: 1 509 | m_IgnoreFromBuild: 0 510 | m_AffectedAgents: ffffffff 511 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 75e05c5681f54c84d92c7fcf306ce093 3 | timeCreated: 1520434153 4 | licenseType: Pro 5 | DefaultImporter: 6 | externalObjects: {} 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan/LowMan.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 03295b9f51019ef458e67a8651e2f109 3 | folderAsset: yes 4 | timeCreated: 1520852402 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Animation.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5cda2461169b54a4ea0d475fda129d73 3 | folderAsset: yes 4 | timeCreated: 1520936932 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Animation/Clips.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4621f20531b008c4dbde041d4877e157 3 | folderAsset: yes 4 | timeCreated: 1520938224 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Animation/Clips/Humanoid_Crouch.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Brackeys/NavMesh-Tutorial/c3285719eb38708475df619e6f6546a6f01af42d/NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Animation/Clips/Humanoid_Crouch.fbx -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Animation/Clips/Humanoid_Dying.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Brackeys/NavMesh-Tutorial/c3285719eb38708475df619e6f6546a6f01af42d/NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Animation/Clips/Humanoid_Dying.fbx -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Animation/Clips/Humanoid_Idle.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Brackeys/NavMesh-Tutorial/c3285719eb38708475df619e6f6546a6f01af42d/NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Animation/Clips/Humanoid_Idle.fbx -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Animation/Clips/Humanoid_IdleJumpUp.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Brackeys/NavMesh-Tutorial/c3285719eb38708475df619e6f6546a6f01af42d/NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Animation/Clips/Humanoid_IdleJumpUp.fbx -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Animation/Clips/Humanoid_IdleWin.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Brackeys/NavMesh-Tutorial/c3285719eb38708475df619e6f6546a6f01af42d/NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Animation/Clips/Humanoid_IdleWin.fbx -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Animation/Clips/Humanoid_JumpAndFall.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Brackeys/NavMesh-Tutorial/c3285719eb38708475df619e6f6546a6f01af42d/NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Animation/Clips/Humanoid_JumpAndFall.fbx -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Animation/Clips/Humanoid_MidAir.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Brackeys/NavMesh-Tutorial/c3285719eb38708475df619e6f6546a6f01af42d/NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Animation/Clips/Humanoid_MidAir.fbx -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Animation/Clips/Humanoid_Run.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Brackeys/NavMesh-Tutorial/c3285719eb38708475df619e6f6546a6f01af42d/NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Animation/Clips/Humanoid_Run.fbx -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Animation/Clips/Humanoid_RunTurn.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Brackeys/NavMesh-Tutorial/c3285719eb38708475df619e6f6546a6f01af42d/NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Animation/Clips/Humanoid_RunTurn.fbx -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Animation/Clips/Humanoid_RunTurnSharp.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Brackeys/NavMesh-Tutorial/c3285719eb38708475df619e6f6546a6f01af42d/NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Animation/Clips/Humanoid_RunTurnSharp.fbx -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Animation/Clips/Humanoid_StandTurn.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Brackeys/NavMesh-Tutorial/c3285719eb38708475df619e6f6546a6f01af42d/NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Animation/Clips/Humanoid_StandTurn.fbx -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Animation/Clips/Humanoid_Walk.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Brackeys/NavMesh-Tutorial/c3285719eb38708475df619e6f6546a6f01af42d/NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Animation/Clips/Humanoid_Walk.fbx -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Animation/Clips/Humanoid_WalkTurn.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Brackeys/NavMesh-Tutorial/c3285719eb38708475df619e6f6546a6f01af42d/NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Animation/Clips/Humanoid_WalkTurn.fbx -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Animation/Clips/Humanoid_WalkTurnSharp.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Brackeys/NavMesh-Tutorial/c3285719eb38708475df619e6f6546a6f01af42d/NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Animation/Clips/Humanoid_WalkTurnSharp.fbx -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Animation/Humanoid.controller.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e2cf68ff4b1ffda45a77f7307dd789b9 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f4a73430305585e45bccbaba70b9fcdb 3 | folderAsset: yes 4 | timeCreated: 1520852321 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Materials/LowBody.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: LowBody 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 0.26309204, g: 0.6544118, b: 0.23096885, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Materials/LowBody.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2019ad135fac453488b693f57027201c 3 | timeCreated: 1495102886 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Models.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a158c1021221ed04ca132b4ab09d94c1 3 | folderAsset: yes 4 | timeCreated: 1520852321 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Models/LowBody.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Brackeys/NavMesh-Tutorial/c3285719eb38708475df619e6f6546a6f01af42d/NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Models/LowBody.fbx -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5f81fdd78263e384985e9d227e202bb2 3 | folderAsset: yes 4 | timeCreated: 1520936941 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Scripts/ThirdPersonCharacter.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace UnityStandardAssets.Characters.ThirdPerson 4 | { 5 | [RequireComponent(typeof(Rigidbody))] 6 | [RequireComponent(typeof(CapsuleCollider))] 7 | [RequireComponent(typeof(Animator))] 8 | public class ThirdPersonCharacter : MonoBehaviour 9 | { 10 | [SerializeField] float m_MovingTurnSpeed = 360; 11 | [SerializeField] float m_StationaryTurnSpeed = 180; 12 | [SerializeField] float m_JumpPower = 6f; 13 | [Range(1f, 4f)][SerializeField] float m_GravityMultiplier = 2f; 14 | [SerializeField] float m_RunCycleLegOffset = 0.2f; //specific to the character in sample assets, will need to be modified to work with others 15 | [SerializeField] float m_MoveSpeedMultiplier = 1f; 16 | [SerializeField] float m_AnimSpeedMultiplier = 1f; 17 | [SerializeField] float m_GroundCheckDistance = 0.2f; 18 | 19 | Rigidbody m_Rigidbody; 20 | Animator m_Animator; 21 | bool m_IsGrounded; 22 | float m_OrigGroundCheckDistance; 23 | const float k_Half = 0.5f; 24 | float m_TurnAmount; 25 | float m_ForwardAmount; 26 | Vector3 m_GroundNormal; 27 | float m_CapsuleHeight; 28 | Vector3 m_CapsuleCenter; 29 | CapsuleCollider m_Capsule; 30 | bool m_Crouching; 31 | 32 | 33 | void Start() 34 | { 35 | m_Animator = GetComponent(); 36 | m_Rigidbody = GetComponent(); 37 | m_Capsule = GetComponent(); 38 | m_CapsuleHeight = m_Capsule.height; 39 | m_CapsuleCenter = m_Capsule.center; 40 | 41 | m_Rigidbody.constraints = RigidbodyConstraints.FreezeRotationX | RigidbodyConstraints.FreezeRotationY | RigidbodyConstraints.FreezeRotationZ; 42 | m_OrigGroundCheckDistance = m_GroundCheckDistance; 43 | } 44 | 45 | 46 | public void Move(Vector3 move, bool crouch, bool jump) 47 | { 48 | 49 | // convert the world relative moveInput vector into a local-relative 50 | // turn amount and forward amount required to head in the desired 51 | // direction. 52 | if (move.magnitude > 1f) move.Normalize(); 53 | move = transform.InverseTransformDirection(move); 54 | CheckGroundStatus(); 55 | move = Vector3.ProjectOnPlane(move, m_GroundNormal); 56 | m_TurnAmount = Mathf.Atan2(move.x, move.z); 57 | m_ForwardAmount = move.z; 58 | 59 | ApplyExtraTurnRotation(); 60 | 61 | // control and velocity handling is different when grounded and airborne: 62 | if (m_IsGrounded) 63 | { 64 | HandleGroundedMovement(crouch, jump); 65 | } 66 | else 67 | { 68 | HandleAirborneMovement(); 69 | } 70 | 71 | ScaleCapsuleForCrouching(crouch); 72 | PreventStandingInLowHeadroom(); 73 | 74 | // send input and other state parameters to the animator 75 | UpdateAnimator(move); 76 | } 77 | 78 | 79 | void ScaleCapsuleForCrouching(bool crouch) 80 | { 81 | if (m_IsGrounded && crouch) 82 | { 83 | if (m_Crouching) return; 84 | m_Capsule.height = m_Capsule.height / 2f; 85 | m_Capsule.center = m_Capsule.center / 2f; 86 | m_Crouching = true; 87 | } 88 | else 89 | { 90 | Ray crouchRay = new Ray(m_Rigidbody.position + Vector3.up * m_Capsule.radius * k_Half, Vector3.up); 91 | float crouchRayLength = m_CapsuleHeight - m_Capsule.radius * k_Half; 92 | if (Physics.SphereCast(crouchRay, m_Capsule.radius * k_Half, crouchRayLength, Physics.AllLayers, QueryTriggerInteraction.Ignore)) 93 | { 94 | m_Crouching = true; 95 | return; 96 | } 97 | m_Capsule.height = m_CapsuleHeight; 98 | m_Capsule.center = m_CapsuleCenter; 99 | m_Crouching = false; 100 | } 101 | } 102 | 103 | void PreventStandingInLowHeadroom() 104 | { 105 | // prevent standing up in crouch-only zones 106 | if (!m_Crouching) 107 | { 108 | Ray crouchRay = new Ray(m_Rigidbody.position + Vector3.up * m_Capsule.radius * k_Half, Vector3.up); 109 | float crouchRayLength = m_CapsuleHeight - m_Capsule.radius * k_Half; 110 | if (Physics.SphereCast(crouchRay, m_Capsule.radius * k_Half, crouchRayLength, Physics.AllLayers, QueryTriggerInteraction.Ignore)) 111 | { 112 | m_Crouching = true; 113 | } 114 | } 115 | } 116 | 117 | 118 | void UpdateAnimator(Vector3 move) 119 | { 120 | // update the animator parameters 121 | m_Animator.SetFloat("Forward", m_ForwardAmount, 0.1f, Time.deltaTime); 122 | m_Animator.SetFloat("Turn", m_TurnAmount, 0.1f, Time.deltaTime); 123 | m_Animator.SetBool("Crouch", m_Crouching); 124 | m_Animator.SetBool("OnGround", m_IsGrounded); 125 | if (!m_IsGrounded) 126 | { 127 | m_Animator.SetFloat("Jump", m_Rigidbody.velocity.y); 128 | } 129 | 130 | // calculate which leg is behind, so as to leave that leg trailing in the jump animation 131 | // (This code is reliant on the specific run cycle offset in our animations, 132 | // and assumes one leg passes the other at the normalized clip times of 0.0 and 0.5) 133 | float runCycle = 134 | Mathf.Repeat( 135 | m_Animator.GetCurrentAnimatorStateInfo(0).normalizedTime + m_RunCycleLegOffset, 1); 136 | float jumpLeg = (runCycle < k_Half ? 1 : -1) * m_ForwardAmount; 137 | if (m_IsGrounded) 138 | { 139 | m_Animator.SetFloat("JumpLeg", jumpLeg); 140 | } 141 | 142 | // the anim speed multiplier allows the overall speed of walking/running to be tweaked in the inspector, 143 | // which affects the movement speed because of the root motion. 144 | if (m_IsGrounded && move.magnitude > 0) 145 | { 146 | m_Animator.speed = m_AnimSpeedMultiplier; 147 | } 148 | else 149 | { 150 | // don't use that while airborne 151 | m_Animator.speed = 1; 152 | } 153 | } 154 | 155 | 156 | void HandleAirborneMovement() 157 | { 158 | // apply extra gravity from multiplier: 159 | Vector3 extraGravityForce = (Physics.gravity * m_GravityMultiplier) - Physics.gravity; 160 | m_Rigidbody.AddForce(extraGravityForce); 161 | 162 | m_GroundCheckDistance = m_Rigidbody.velocity.y < 0 ? m_OrigGroundCheckDistance : 0.01f; 163 | } 164 | 165 | 166 | void HandleGroundedMovement(bool crouch, bool jump) 167 | { 168 | // check whether conditions are right to allow a jump: 169 | if (jump && !crouch && m_Animator.GetCurrentAnimatorStateInfo(0).IsName("Grounded")) 170 | { 171 | // jump! 172 | m_Rigidbody.velocity = new Vector3(m_Rigidbody.velocity.x, m_JumpPower, m_Rigidbody.velocity.z); 173 | m_IsGrounded = false; 174 | m_Animator.applyRootMotion = false; 175 | m_GroundCheckDistance = 0.1f; 176 | } 177 | } 178 | 179 | void ApplyExtraTurnRotation() 180 | { 181 | // help the character turn faster (this is in addition to root rotation in the animation) 182 | float turnSpeed = Mathf.Lerp(m_StationaryTurnSpeed, m_MovingTurnSpeed, m_ForwardAmount); 183 | transform.Rotate(0, m_TurnAmount * turnSpeed * Time.deltaTime, 0); 184 | } 185 | 186 | 187 | public void OnAnimatorMove() 188 | { 189 | // we implement this function to override the default root motion. 190 | // this allows us to modify the positional speed before it's applied. 191 | if (m_IsGrounded && Time.deltaTime > 0) 192 | { 193 | Vector3 v = (m_Animator.deltaPosition * m_MoveSpeedMultiplier) / Time.deltaTime; 194 | 195 | // we preserve the existing y part of the current velocity. 196 | v.y = m_Rigidbody.velocity.y; 197 | m_Rigidbody.velocity = v; 198 | } 199 | } 200 | 201 | 202 | void CheckGroundStatus() 203 | { 204 | RaycastHit hitInfo; 205 | #if UNITY_EDITOR 206 | // helper to visualise the ground check ray in the scene view 207 | Debug.DrawLine(transform.position + (Vector3.up * 0.1f), transform.position + (Vector3.up * 0.1f) + (Vector3.down * m_GroundCheckDistance)); 208 | #endif 209 | // 0.1f is a small offset to start the ray from inside the character 210 | // it is also good to note that the transform position in the sample assets is at the base of the character 211 | if (Physics.Raycast(transform.position + (Vector3.up * 0.1f), Vector3.down, out hitInfo, m_GroundCheckDistance)) 212 | { 213 | m_GroundNormal = hitInfo.normal; 214 | m_IsGrounded = true; 215 | m_Animator.applyRootMotion = true; 216 | } 217 | else 218 | { 219 | m_IsGrounded = false; 220 | m_GroundNormal = Vector3.up; 221 | m_Animator.applyRootMotion = false; 222 | } 223 | } 224 | } 225 | } 226 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan/LowMan/Scripts/ThirdPersonCharacter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ce7a80d520cacc042b5fe14f373d8173 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 19d1cbcd4d4380e4db0c15c39f312731 3 | folderAsset: yes 4 | timeCreated: 1520434743 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan/Materials/Ground.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Ground 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 0.08235294, g: 0.08235294, b: 0.08235294, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan/Materials/Ground.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8de8d2473f02b4941a3f9b34d257cb6a 3 | timeCreated: 1495102886 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan/Materials/Walls.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Walls 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 1, g: 0.17647058, b: 0.17647058, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/Example05 - LowMan/Materials/Walls.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 308b2ce0d6a40ab4aa0cb7e71720fcc4 3 | timeCreated: 1495102886 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/NavMeshComponents.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1c0b808f577db514ba90ce8c1745eff3 3 | folderAsset: yes 4 | timeCreated: 1520502094 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/NavMeshComponents/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 850e808bcaf82ff47b2c0ea5f611c248 3 | folderAsset: yes 4 | timeCreated: 1520502094 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/NavMeshComponents/Editor/NavMeshComponentsGUIUtility.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.AI; 3 | 4 | namespace UnityEditor.AI 5 | { 6 | public static class NavMeshComponentsGUIUtility 7 | { 8 | public static void AreaPopup(string labelName, SerializedProperty areaProperty) 9 | { 10 | var areaIndex = -1; 11 | var areaNames = GameObjectUtility.GetNavMeshAreaNames(); 12 | for (var i = 0; i < areaNames.Length; i++) 13 | { 14 | var areaValue = GameObjectUtility.GetNavMeshAreaFromName(areaNames[i]); 15 | if (areaValue == areaProperty.intValue) 16 | areaIndex = i; 17 | } 18 | ArrayUtility.Add(ref areaNames, ""); 19 | ArrayUtility.Add(ref areaNames, "Open Area Settings..."); 20 | 21 | var rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight); 22 | EditorGUI.BeginProperty(rect, GUIContent.none, areaProperty); 23 | 24 | EditorGUI.BeginChangeCheck(); 25 | areaIndex = EditorGUI.Popup(rect, labelName, areaIndex, areaNames); 26 | 27 | if (EditorGUI.EndChangeCheck()) 28 | { 29 | if (areaIndex >= 0 && areaIndex < areaNames.Length - 2) 30 | areaProperty.intValue = GameObjectUtility.GetNavMeshAreaFromName(areaNames[areaIndex]); 31 | else if (areaIndex == areaNames.Length - 1) 32 | NavMeshEditorHelpers.OpenAreaSettings(); 33 | } 34 | 35 | EditorGUI.EndProperty(); 36 | } 37 | 38 | public static void AgentTypePopup(string labelName, SerializedProperty agentTypeID) 39 | { 40 | var index = -1; 41 | var count = NavMesh.GetSettingsCount(); 42 | var agentTypeNames = new string[count + 2]; 43 | for (var i = 0; i < count; i++) 44 | { 45 | var id = NavMesh.GetSettingsByIndex(i).agentTypeID; 46 | var name = NavMesh.GetSettingsNameFromID(id); 47 | agentTypeNames[i] = name; 48 | if (id == agentTypeID.intValue) 49 | index = i; 50 | } 51 | agentTypeNames[count] = ""; 52 | agentTypeNames[count + 1] = "Open Agent Settings..."; 53 | 54 | bool validAgentType = index != -1; 55 | if (!validAgentType) 56 | { 57 | EditorGUILayout.HelpBox("Agent Type invalid.", MessageType.Warning); 58 | } 59 | 60 | var rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight); 61 | EditorGUI.BeginProperty(rect, GUIContent.none, agentTypeID); 62 | 63 | EditorGUI.BeginChangeCheck(); 64 | index = EditorGUI.Popup(rect, labelName, index, agentTypeNames); 65 | if (EditorGUI.EndChangeCheck()) 66 | { 67 | if (index >= 0 && index < count) 68 | { 69 | var id = NavMesh.GetSettingsByIndex(index).agentTypeID; 70 | agentTypeID.intValue = id; 71 | } 72 | else if (index == count + 1) 73 | { 74 | NavMeshEditorHelpers.OpenAgentSettings(-1); 75 | } 76 | } 77 | 78 | EditorGUI.EndProperty(); 79 | } 80 | 81 | // Agent mask is a set (internally array/list) of agentTypeIDs. 82 | // It is used to describe which agents modifiers apply to. 83 | // There is a special case of "None" which is an empty array. 84 | // There is a special case of "All" which is an array of length 1, and value of -1. 85 | public static void AgentMaskPopup(string labelName, SerializedProperty agentMask) 86 | { 87 | // Contents of the dropdown box. 88 | string popupContent = ""; 89 | 90 | if (agentMask.hasMultipleDifferentValues) 91 | popupContent = "\u2014"; 92 | else 93 | popupContent = GetAgentMaskLabelName(agentMask); 94 | 95 | var content = new GUIContent(popupContent); 96 | var popupRect = GUILayoutUtility.GetRect(content, EditorStyles.popup); 97 | 98 | EditorGUI.BeginProperty(popupRect, GUIContent.none, agentMask); 99 | popupRect = EditorGUI.PrefixLabel(popupRect, 0, new GUIContent(labelName)); 100 | bool pressed = GUI.Button(popupRect, content, EditorStyles.popup); 101 | 102 | if (pressed) 103 | { 104 | var show = !agentMask.hasMultipleDifferentValues; 105 | var showNone = show && agentMask.arraySize == 0; 106 | var showAll = show && IsAll(agentMask); 107 | 108 | var menu = new GenericMenu(); 109 | menu.AddItem(new GUIContent("None"), showNone, SetAgentMaskNone, agentMask); 110 | menu.AddItem(new GUIContent("All"), showAll, SetAgentMaskAll, agentMask); 111 | menu.AddSeparator(""); 112 | 113 | var count = NavMesh.GetSettingsCount(); 114 | for (var i = 0; i < count; i++) 115 | { 116 | var id = NavMesh.GetSettingsByIndex(i).agentTypeID; 117 | var sname = NavMesh.GetSettingsNameFromID(id); 118 | 119 | var showSelected = show && AgentMaskHasSelectedAgentTypeID(agentMask, id); 120 | var userData = new object[] { agentMask, id, !showSelected }; 121 | menu.AddItem(new GUIContent(sname), showSelected, ToggleAgentMaskItem, userData); 122 | } 123 | 124 | menu.DropDown(popupRect); 125 | } 126 | 127 | EditorGUI.EndProperty(); 128 | } 129 | 130 | public static GameObject CreateAndSelectGameObject(string suggestedName, GameObject parent) 131 | { 132 | var parentTransform = parent != null ? parent.transform : null; 133 | var uniqueName = GameObjectUtility.GetUniqueNameForSibling(parentTransform, suggestedName); 134 | var child = new GameObject(uniqueName); 135 | 136 | Undo.RegisterCreatedObjectUndo(child, "Create " + uniqueName); 137 | if (parentTransform != null) 138 | Undo.SetTransformParent(child.transform, parentTransform, "Parent " + uniqueName); 139 | 140 | Selection.activeGameObject = child; 141 | 142 | return child; 143 | } 144 | 145 | static bool IsAll(SerializedProperty agentMask) 146 | { 147 | return agentMask.arraySize == 1 && agentMask.GetArrayElementAtIndex(0).intValue == -1; 148 | } 149 | 150 | static void ToggleAgentMaskItem(object userData) 151 | { 152 | var args = (object[])userData; 153 | var agentMask = (SerializedProperty)args[0]; 154 | var agentTypeID = (int)args[1]; 155 | var value = (bool)args[2]; 156 | 157 | ToggleAgentMaskItem(agentMask, agentTypeID, value); 158 | } 159 | 160 | static void ToggleAgentMaskItem(SerializedProperty agentMask, int agentTypeID, bool value) 161 | { 162 | if (agentMask.hasMultipleDifferentValues) 163 | { 164 | agentMask.ClearArray(); 165 | agentMask.serializedObject.ApplyModifiedProperties(); 166 | } 167 | 168 | // Find which index this agent type is in the agentMask array. 169 | int idx = -1; 170 | for (var j = 0; j < agentMask.arraySize; j++) 171 | { 172 | var elem = agentMask.GetArrayElementAtIndex(j); 173 | if (elem.intValue == agentTypeID) 174 | idx = j; 175 | } 176 | 177 | // Handle "All" special case. 178 | if (IsAll(agentMask)) 179 | { 180 | agentMask.DeleteArrayElementAtIndex(0); 181 | } 182 | 183 | // Toggle value. 184 | if (value) 185 | { 186 | if (idx == -1) 187 | { 188 | agentMask.InsertArrayElementAtIndex(agentMask.arraySize); 189 | agentMask.GetArrayElementAtIndex(agentMask.arraySize - 1).intValue = agentTypeID; 190 | } 191 | } 192 | else 193 | { 194 | if (idx != -1) 195 | { 196 | agentMask.DeleteArrayElementAtIndex(idx); 197 | } 198 | } 199 | 200 | agentMask.serializedObject.ApplyModifiedProperties(); 201 | } 202 | 203 | static void SetAgentMaskNone(object data) 204 | { 205 | var agentMask = (SerializedProperty)data; 206 | agentMask.ClearArray(); 207 | agentMask.serializedObject.ApplyModifiedProperties(); 208 | } 209 | 210 | static void SetAgentMaskAll(object data) 211 | { 212 | var agentMask = (SerializedProperty)data; 213 | agentMask.ClearArray(); 214 | agentMask.InsertArrayElementAtIndex(0); 215 | agentMask.GetArrayElementAtIndex(0).intValue = -1; 216 | agentMask.serializedObject.ApplyModifiedProperties(); 217 | } 218 | 219 | static string GetAgentMaskLabelName(SerializedProperty agentMask) 220 | { 221 | if (agentMask.arraySize == 0) 222 | return "None"; 223 | 224 | if (IsAll(agentMask)) 225 | return "All"; 226 | 227 | if (agentMask.arraySize <= 3) 228 | { 229 | var labelName = ""; 230 | for (var j = 0; j < agentMask.arraySize; j++) 231 | { 232 | var elem = agentMask.GetArrayElementAtIndex(j); 233 | var settingsName = NavMesh.GetSettingsNameFromID(elem.intValue); 234 | if (string.IsNullOrEmpty(settingsName)) 235 | continue; 236 | 237 | if (labelName.Length > 0) 238 | labelName += ", "; 239 | labelName += settingsName; 240 | } 241 | return labelName; 242 | } 243 | 244 | return "Mixed..."; 245 | } 246 | 247 | static bool AgentMaskHasSelectedAgentTypeID(SerializedProperty agentMask, int agentTypeID) 248 | { 249 | for (var j = 0; j < agentMask.arraySize; j++) 250 | { 251 | var elem = agentMask.GetArrayElementAtIndex(j); 252 | if (elem.intValue == agentTypeID) 253 | return true; 254 | } 255 | return false; 256 | } 257 | } 258 | } 259 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/NavMeshComponents/Editor/NavMeshComponentsGUIUtility.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 15548e45f29cdba49aea85acca959a91 3 | timeCreated: 1520502094 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/NavMeshComponents/Editor/NavMeshLinkEditor.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.AI; 3 | 4 | namespace UnityEditor.AI 5 | { 6 | [CanEditMultipleObjects] 7 | [CustomEditor(typeof(NavMeshLink))] 8 | class NavMeshLinkEditor : Editor 9 | { 10 | SerializedProperty m_AgentTypeID; 11 | SerializedProperty m_Area; 12 | SerializedProperty m_CostModifier; 13 | SerializedProperty m_AutoUpdatePosition; 14 | SerializedProperty m_Bidirectional; 15 | SerializedProperty m_EndPoint; 16 | SerializedProperty m_StartPoint; 17 | SerializedProperty m_Width; 18 | 19 | static int s_SelectedID; 20 | static int s_SelectedPoint = -1; 21 | 22 | static Color s_HandleColor = new Color(255f, 167f, 39f, 210f) / 255; 23 | static Color s_HandleColorDisabled = new Color(255f * 0.75f, 167f * 0.75f, 39f * 0.75f, 100f) / 255; 24 | 25 | void OnEnable() 26 | { 27 | m_AgentTypeID = serializedObject.FindProperty("m_AgentTypeID"); 28 | m_Area = serializedObject.FindProperty("m_Area"); 29 | m_CostModifier = serializedObject.FindProperty("m_CostModifier"); 30 | m_AutoUpdatePosition = serializedObject.FindProperty("m_AutoUpdatePosition"); 31 | m_Bidirectional = serializedObject.FindProperty("m_Bidirectional"); 32 | m_EndPoint = serializedObject.FindProperty("m_EndPoint"); 33 | m_StartPoint = serializedObject.FindProperty("m_StartPoint"); 34 | m_Width = serializedObject.FindProperty("m_Width"); 35 | 36 | s_SelectedID = 0; 37 | s_SelectedPoint = -1; 38 | 39 | NavMeshVisualizationSettings.showNavigation++; 40 | } 41 | 42 | void OnDisable() 43 | { 44 | NavMeshVisualizationSettings.showNavigation--; 45 | } 46 | 47 | static Matrix4x4 UnscaledLocalToWorldMatrix(Transform t) 48 | { 49 | return Matrix4x4.TRS(t.position, t.rotation, Vector3.one); 50 | } 51 | 52 | void AlignTransformToEndPoints(NavMeshLink navLink) 53 | { 54 | var mat = UnscaledLocalToWorldMatrix(navLink.transform); 55 | 56 | var worldStartPt = mat.MultiplyPoint(navLink.startPoint); 57 | var worldEndPt = mat.MultiplyPoint(navLink.endPoint); 58 | 59 | var forward = worldEndPt - worldStartPt; 60 | var up = navLink.transform.up; 61 | 62 | // Flatten 63 | forward -= Vector3.Dot(up, forward) * up; 64 | 65 | var transform = navLink.transform; 66 | transform.rotation = Quaternion.LookRotation(forward, up); 67 | transform.position = (worldEndPt + worldStartPt) * 0.5f; 68 | transform.localScale = Vector3.one; 69 | 70 | navLink.startPoint = transform.InverseTransformPoint(worldStartPt); 71 | navLink.endPoint = transform.InverseTransformPoint(worldEndPt); 72 | } 73 | 74 | public override void OnInspectorGUI() 75 | { 76 | serializedObject.Update(); 77 | 78 | NavMeshComponentsGUIUtility.AgentTypePopup("Agent Type", m_AgentTypeID); 79 | EditorGUILayout.Space(); 80 | 81 | EditorGUILayout.PropertyField(m_StartPoint); 82 | EditorGUILayout.PropertyField(m_EndPoint); 83 | 84 | GUILayout.BeginHorizontal(); 85 | GUILayout.Space(EditorGUIUtility.labelWidth); 86 | if (GUILayout.Button("Swap")) 87 | { 88 | foreach (NavMeshLink navLink in targets) 89 | { 90 | var tmp = navLink.startPoint; 91 | navLink.startPoint = navLink.endPoint; 92 | navLink.endPoint = tmp; 93 | } 94 | SceneView.RepaintAll(); 95 | } 96 | if (GUILayout.Button("Align Transform")) 97 | { 98 | foreach (NavMeshLink navLink in targets) 99 | { 100 | Undo.RecordObject(navLink.transform, "Align Transform to End Points"); 101 | Undo.RecordObject(navLink, "Align Transform to End Points"); 102 | AlignTransformToEndPoints(navLink); 103 | } 104 | SceneView.RepaintAll(); 105 | } 106 | GUILayout.EndHorizontal(); 107 | EditorGUILayout.Space(); 108 | 109 | EditorGUILayout.PropertyField(m_Width); 110 | EditorGUILayout.PropertyField(m_CostModifier); 111 | EditorGUILayout.PropertyField(m_AutoUpdatePosition); 112 | EditorGUILayout.PropertyField(m_Bidirectional); 113 | 114 | NavMeshComponentsGUIUtility.AreaPopup("Area Type", m_Area); 115 | 116 | serializedObject.ApplyModifiedProperties(); 117 | 118 | EditorGUILayout.Space(); 119 | } 120 | 121 | static Vector3 CalcLinkRight(NavMeshLink navLink) 122 | { 123 | var dir = navLink.endPoint - navLink.startPoint; 124 | return (new Vector3(-dir.z, 0.0f, dir.x)).normalized; 125 | } 126 | 127 | static void DrawLink(NavMeshLink navLink) 128 | { 129 | var right = CalcLinkRight(navLink); 130 | var rad = navLink.width * 0.5f; 131 | 132 | Gizmos.DrawLine(navLink.startPoint - right * rad, navLink.startPoint + right * rad); 133 | Gizmos.DrawLine(navLink.endPoint - right * rad, navLink.endPoint + right * rad); 134 | Gizmos.DrawLine(navLink.startPoint - right * rad, navLink.endPoint - right * rad); 135 | Gizmos.DrawLine(navLink.startPoint + right * rad, navLink.endPoint + right * rad); 136 | } 137 | 138 | [DrawGizmo(GizmoType.Selected | GizmoType.Active | GizmoType.Pickable)] 139 | static void RenderBoxGizmo(NavMeshLink navLink, GizmoType gizmoType) 140 | { 141 | if (!EditorApplication.isPlaying) 142 | navLink.UpdateLink(); 143 | 144 | var color = s_HandleColor; 145 | if (!navLink.enabled) 146 | color = s_HandleColorDisabled; 147 | 148 | var oldColor = Gizmos.color; 149 | var oldMatrix = Gizmos.matrix; 150 | 151 | Gizmos.matrix = UnscaledLocalToWorldMatrix(navLink.transform); 152 | 153 | Gizmos.color = color; 154 | DrawLink(navLink); 155 | 156 | Gizmos.matrix = oldMatrix; 157 | Gizmos.color = oldColor; 158 | 159 | Gizmos.DrawIcon(navLink.transform.position, "NavMeshLink Icon", true); 160 | } 161 | 162 | [DrawGizmo(GizmoType.NotInSelectionHierarchy | GizmoType.Pickable)] 163 | static void RenderBoxGizmoNotSelected(NavMeshLink navLink, GizmoType gizmoType) 164 | { 165 | if (NavMeshVisualizationSettings.showNavigation > 0) 166 | { 167 | var color = s_HandleColor; 168 | if (!navLink.enabled) 169 | color = s_HandleColorDisabled; 170 | 171 | var oldColor = Gizmos.color; 172 | var oldMatrix = Gizmos.matrix; 173 | 174 | Gizmos.matrix = UnscaledLocalToWorldMatrix(navLink.transform); 175 | 176 | Gizmos.color = color; 177 | DrawLink(navLink); 178 | 179 | Gizmos.matrix = oldMatrix; 180 | Gizmos.color = oldColor; 181 | } 182 | 183 | Gizmos.DrawIcon(navLink.transform.position, "NavMeshLink Icon", true); 184 | } 185 | 186 | public void OnSceneGUI() 187 | { 188 | var navLink = (NavMeshLink)target; 189 | if (!navLink.enabled) 190 | return; 191 | 192 | var mat = UnscaledLocalToWorldMatrix(navLink.transform); 193 | 194 | var startPt = mat.MultiplyPoint(navLink.startPoint); 195 | var endPt = mat.MultiplyPoint(navLink.endPoint); 196 | var midPt = Vector3.Lerp(startPt, endPt, 0.35f); 197 | var startSize = HandleUtility.GetHandleSize(startPt); 198 | var endSize = HandleUtility.GetHandleSize(endPt); 199 | var midSize = HandleUtility.GetHandleSize(midPt); 200 | 201 | var zup = Quaternion.FromToRotation(Vector3.forward, Vector3.up); 202 | var right = mat.MultiplyVector(CalcLinkRight(navLink)); 203 | 204 | var oldColor = Handles.color; 205 | Handles.color = s_HandleColor; 206 | 207 | Vector3 pos; 208 | 209 | if (navLink.GetInstanceID() == s_SelectedID && s_SelectedPoint == 0) 210 | { 211 | EditorGUI.BeginChangeCheck(); 212 | Handles.CubeHandleCap(0, startPt, zup, 0.1f * startSize, Event.current.type); 213 | pos = Handles.PositionHandle(startPt, navLink.transform.rotation); 214 | if (EditorGUI.EndChangeCheck()) 215 | { 216 | Undo.RecordObject(navLink, "Move link point"); 217 | navLink.startPoint = mat.inverse.MultiplyPoint(pos); 218 | } 219 | } 220 | else 221 | { 222 | if (Handles.Button(startPt, zup, 0.1f * startSize, 0.1f * startSize, Handles.CubeHandleCap)) 223 | { 224 | s_SelectedPoint = 0; 225 | s_SelectedID = navLink.GetInstanceID(); 226 | } 227 | } 228 | 229 | if (navLink.GetInstanceID() == s_SelectedID && s_SelectedPoint == 1) 230 | { 231 | EditorGUI.BeginChangeCheck(); 232 | Handles.CubeHandleCap(0, endPt, zup, 0.1f * startSize, Event.current.type); 233 | pos = Handles.PositionHandle(endPt, navLink.transform.rotation); 234 | if (EditorGUI.EndChangeCheck()) 235 | { 236 | Undo.RecordObject(navLink, "Move link point"); 237 | navLink.endPoint = mat.inverse.MultiplyPoint(pos); 238 | } 239 | } 240 | else 241 | { 242 | if (Handles.Button(endPt, zup, 0.1f * endSize, 0.1f * endSize, Handles.CubeHandleCap)) 243 | { 244 | s_SelectedPoint = 1; 245 | s_SelectedID = navLink.GetInstanceID(); 246 | } 247 | } 248 | 249 | EditorGUI.BeginChangeCheck(); 250 | pos = Handles.Slider(midPt + right * navLink.width * 0.5f, right, midSize * 0.03f, Handles.DotHandleCap, 0); 251 | if (EditorGUI.EndChangeCheck()) 252 | { 253 | Undo.RecordObject(navLink, "Adjust link width"); 254 | navLink.width = Mathf.Max(0.0f, 2.0f * Vector3.Dot(right, (pos - midPt))); 255 | } 256 | 257 | EditorGUI.BeginChangeCheck(); 258 | pos = Handles.Slider(midPt - right * navLink.width * 0.5f, -right, midSize * 0.03f, Handles.DotHandleCap, 0); 259 | if (EditorGUI.EndChangeCheck()) 260 | { 261 | Undo.RecordObject(navLink, "Adjust link width"); 262 | navLink.width = Mathf.Max(0.0f, 2.0f * Vector3.Dot(-right, (pos - midPt))); 263 | } 264 | 265 | Handles.color = oldColor; 266 | } 267 | 268 | [MenuItem("GameObject/AI/NavMesh Link", false, 2002)] 269 | static public void CreateNavMeshLink(MenuCommand menuCommand) 270 | { 271 | var parent = menuCommand.context as GameObject; 272 | GameObject go = NavMeshComponentsGUIUtility.CreateAndSelectGameObject("NavMesh Link", parent); 273 | go.AddComponent(); 274 | var view = SceneView.lastActiveSceneView; 275 | if (view != null) 276 | view.MoveToView(go.transform); 277 | } 278 | } 279 | } 280 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/NavMeshComponents/Editor/NavMeshLinkEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2736c3ce72815474a841d00c8558a7a3 3 | timeCreated: 1520502094 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/NavMeshComponents/Editor/NavMeshModifierEditor.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine.AI; 2 | 3 | namespace UnityEditor.AI 4 | { 5 | [CanEditMultipleObjects] 6 | [CustomEditor(typeof(NavMeshModifier))] 7 | class NavMeshModifierEditor : Editor 8 | { 9 | SerializedProperty m_AffectedAgents; 10 | SerializedProperty m_Area; 11 | SerializedProperty m_IgnoreFromBuild; 12 | SerializedProperty m_OverrideArea; 13 | 14 | void OnEnable() 15 | { 16 | m_AffectedAgents = serializedObject.FindProperty("m_AffectedAgents"); 17 | m_Area = serializedObject.FindProperty("m_Area"); 18 | m_IgnoreFromBuild = serializedObject.FindProperty("m_IgnoreFromBuild"); 19 | m_OverrideArea = serializedObject.FindProperty("m_OverrideArea"); 20 | 21 | NavMeshVisualizationSettings.showNavigation++; 22 | } 23 | 24 | void OnDisable() 25 | { 26 | NavMeshVisualizationSettings.showNavigation--; 27 | } 28 | 29 | public override void OnInspectorGUI() 30 | { 31 | serializedObject.Update(); 32 | 33 | EditorGUILayout.PropertyField(m_IgnoreFromBuild); 34 | 35 | EditorGUILayout.PropertyField(m_OverrideArea); 36 | if (m_OverrideArea.boolValue) 37 | { 38 | EditorGUI.indentLevel++; 39 | NavMeshComponentsGUIUtility.AreaPopup("Area Type", m_Area); 40 | EditorGUI.indentLevel--; 41 | } 42 | 43 | NavMeshComponentsGUIUtility.AgentMaskPopup("Affected Agents", m_AffectedAgents); 44 | EditorGUILayout.Space(); 45 | 46 | serializedObject.ApplyModifiedProperties(); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/NavMeshComponents/Editor/NavMeshModifierEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a8c4288ef2e341e4bab85c37922622c0 3 | timeCreated: 1520502095 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/NavMeshComponents/Editor/NavMeshModifierVolumeEditor.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor.IMGUI.Controls; 2 | using UnityEditorInternal; 3 | using UnityEngine.AI; 4 | using UnityEngine; 5 | 6 | namespace UnityEditor.AI 7 | { 8 | [CanEditMultipleObjects] 9 | [CustomEditor(typeof(NavMeshModifierVolume))] 10 | class NavMeshModifierVolumeEditor : Editor 11 | { 12 | SerializedProperty m_AffectedAgents; 13 | SerializedProperty m_Area; 14 | SerializedProperty m_Center; 15 | SerializedProperty m_Size; 16 | 17 | static Color s_HandleColor = new Color(187f, 138f, 240f, 210f) / 255; 18 | static Color s_HandleColorDisabled = new Color(187f * 0.75f, 138f * 0.75f, 240f * 0.75f, 100f) / 255; 19 | 20 | BoxBoundsHandle m_BoundsHandle = new BoxBoundsHandle(); 21 | 22 | bool editingCollider 23 | { 24 | get { return EditMode.editMode == EditMode.SceneViewEditMode.Collider && EditMode.IsOwner(this); } 25 | } 26 | 27 | void OnEnable() 28 | { 29 | m_AffectedAgents = serializedObject.FindProperty("m_AffectedAgents"); 30 | m_Area = serializedObject.FindProperty("m_Area"); 31 | m_Center = serializedObject.FindProperty("m_Center"); 32 | m_Size = serializedObject.FindProperty("m_Size"); 33 | 34 | NavMeshVisualizationSettings.showNavigation++; 35 | } 36 | 37 | void OnDisable() 38 | { 39 | NavMeshVisualizationSettings.showNavigation--; 40 | } 41 | 42 | Bounds GetBounds() 43 | { 44 | var navModifier = (NavMeshModifierVolume)target; 45 | return new Bounds(navModifier.transform.position, navModifier.size); 46 | } 47 | 48 | public override void OnInspectorGUI() 49 | { 50 | serializedObject.Update(); 51 | 52 | EditMode.DoEditModeInspectorModeButton(EditMode.SceneViewEditMode.Collider, "Edit Volume", 53 | EditorGUIUtility.IconContent("EditCollider"), GetBounds, this); 54 | 55 | EditorGUILayout.PropertyField(m_Size); 56 | EditorGUILayout.PropertyField(m_Center); 57 | 58 | NavMeshComponentsGUIUtility.AreaPopup("Area Type", m_Area); 59 | NavMeshComponentsGUIUtility.AgentMaskPopup("Affected Agents", m_AffectedAgents); 60 | EditorGUILayout.Space(); 61 | 62 | serializedObject.ApplyModifiedProperties(); 63 | } 64 | 65 | [DrawGizmo(GizmoType.Selected | GizmoType.Active)] 66 | static void RenderBoxGizmo(NavMeshModifierVolume navModifier, GizmoType gizmoType) 67 | { 68 | var color = navModifier.enabled ? s_HandleColor : s_HandleColorDisabled; 69 | var colorTrans = new Color(color.r * 0.75f, color.g * 0.75f, color.b * 0.75f, color.a * 0.15f); 70 | 71 | var oldColor = Gizmos.color; 72 | var oldMatrix = Gizmos.matrix; 73 | 74 | Gizmos.matrix = navModifier.transform.localToWorldMatrix; 75 | 76 | Gizmos.color = colorTrans; 77 | Gizmos.DrawCube(navModifier.center, navModifier.size); 78 | 79 | Gizmos.color = color; 80 | Gizmos.DrawWireCube(navModifier.center, navModifier.size); 81 | 82 | Gizmos.matrix = oldMatrix; 83 | Gizmos.color = oldColor; 84 | 85 | Gizmos.DrawIcon(navModifier.transform.position, "NavMeshModifierVolume Icon", true); 86 | } 87 | 88 | [DrawGizmo(GizmoType.NotInSelectionHierarchy | GizmoType.Pickable)] 89 | static void RenderBoxGizmoNotSelected(NavMeshModifierVolume navModifier, GizmoType gizmoType) 90 | { 91 | if (NavMeshVisualizationSettings.showNavigation > 0) 92 | { 93 | var color = navModifier.enabled ? s_HandleColor : s_HandleColorDisabled; 94 | var oldColor = Gizmos.color; 95 | var oldMatrix = Gizmos.matrix; 96 | 97 | Gizmos.matrix = navModifier.transform.localToWorldMatrix; 98 | 99 | Gizmos.color = color; 100 | Gizmos.DrawWireCube(navModifier.center, navModifier.size); 101 | 102 | Gizmos.matrix = oldMatrix; 103 | Gizmos.color = oldColor; 104 | } 105 | 106 | Gizmos.DrawIcon(navModifier.transform.position, "NavMeshModifierVolume Icon", true); 107 | } 108 | 109 | void OnSceneGUI() 110 | { 111 | if (!editingCollider) 112 | return; 113 | 114 | var vol = (NavMeshModifierVolume)target; 115 | var color = vol.enabled ? s_HandleColor : s_HandleColorDisabled; 116 | using (new Handles.DrawingScope(color, vol.transform.localToWorldMatrix)) 117 | { 118 | m_BoundsHandle.center = vol.center; 119 | m_BoundsHandle.size = vol.size; 120 | 121 | EditorGUI.BeginChangeCheck(); 122 | m_BoundsHandle.DrawHandle(); 123 | if (EditorGUI.EndChangeCheck()) 124 | { 125 | Undo.RecordObject(vol, "Modified NavMesh Modifier Volume"); 126 | Vector3 center = m_BoundsHandle.center; 127 | Vector3 size = m_BoundsHandle.size; 128 | vol.center = center; 129 | vol.size = size; 130 | EditorUtility.SetDirty(target); 131 | } 132 | } 133 | } 134 | 135 | [MenuItem("GameObject/AI/NavMesh Modifier Volume", false, 2001)] 136 | static public void CreateNavMeshModifierVolume(MenuCommand menuCommand) 137 | { 138 | var parent = menuCommand.context as GameObject; 139 | var go = NavMeshComponentsGUIUtility.CreateAndSelectGameObject("NavMesh Modifier Volume", parent); 140 | go.AddComponent(); 141 | var view = SceneView.lastActiveSceneView; 142 | if (view != null) 143 | view.MoveToView(go.transform); 144 | } 145 | } 146 | } 147 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/NavMeshComponents/Editor/NavMeshModifierVolumeEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ce39e93768aa7e4199db30718f1c264 3 | timeCreated: 1520502095 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/NavMeshComponents/Editor/NavMeshSurfaceEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b109366e8e12f3f448cc2f2576df102a 3 | timeCreated: 1520502095 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/NavMeshComponents/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ce138f3bd105d8049b1020fee879265f 3 | folderAsset: yes 4 | timeCreated: 1520502094 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/NavMeshComponents/Scripts/NavMeshLink.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace UnityEngine.AI 4 | { 5 | [ExecuteInEditMode] 6 | [DefaultExecutionOrder(-101)] 7 | [AddComponentMenu("Navigation/NavMeshLink", 33)] 8 | [HelpURL("https://github.com/Unity-Technologies/NavMeshComponents#documentation-draft")] 9 | public class NavMeshLink : MonoBehaviour 10 | { 11 | [SerializeField] 12 | int m_AgentTypeID; 13 | public int agentTypeID { get { return m_AgentTypeID; } set { m_AgentTypeID = value; UpdateLink(); } } 14 | 15 | [SerializeField] 16 | Vector3 m_StartPoint = new Vector3(0.0f, 0.0f, -2.5f); 17 | public Vector3 startPoint { get { return m_StartPoint; } set { m_StartPoint = value; UpdateLink(); } } 18 | 19 | [SerializeField] 20 | Vector3 m_EndPoint = new Vector3(0.0f, 0.0f, 2.5f); 21 | public Vector3 endPoint { get { return m_EndPoint; } set { m_EndPoint = value; UpdateLink(); } } 22 | 23 | [SerializeField] 24 | float m_Width; 25 | public float width { get { return m_Width; } set { m_Width = value; UpdateLink(); } } 26 | 27 | [SerializeField] 28 | int m_CostModifier = -1; 29 | public int costModifier { get { return m_CostModifier; } set { m_CostModifier = value; UpdateLink(); } } 30 | 31 | [SerializeField] 32 | bool m_Bidirectional = true; 33 | public bool bidirectional { get { return m_Bidirectional; } set { m_Bidirectional = value; UpdateLink(); } } 34 | 35 | [SerializeField] 36 | bool m_AutoUpdatePosition; 37 | public bool autoUpdate { get { return m_AutoUpdatePosition; } set { SetAutoUpdate(value); } } 38 | 39 | [SerializeField] 40 | int m_Area; 41 | public int area { get { return m_Area; } set { m_Area = value; UpdateLink(); } } 42 | 43 | NavMeshLinkInstance m_LinkInstance = new NavMeshLinkInstance(); 44 | 45 | Vector3 m_LastPosition = Vector3.zero; 46 | Quaternion m_LastRotation = Quaternion.identity; 47 | 48 | static readonly List s_Tracked = new List(); 49 | 50 | void OnEnable() 51 | { 52 | AddLink(); 53 | if (m_AutoUpdatePosition && m_LinkInstance.valid) 54 | AddTracking(this); 55 | } 56 | 57 | void OnDisable() 58 | { 59 | RemoveTracking(this); 60 | m_LinkInstance.Remove(); 61 | } 62 | 63 | public void UpdateLink() 64 | { 65 | m_LinkInstance.Remove(); 66 | AddLink(); 67 | } 68 | 69 | static void AddTracking(NavMeshLink link) 70 | { 71 | #if UNITY_EDITOR 72 | if (s_Tracked.Contains(link)) 73 | { 74 | Debug.LogError("Link is already tracked: " + link); 75 | return; 76 | } 77 | #endif 78 | 79 | if (s_Tracked.Count == 0) 80 | NavMesh.onPreUpdate += UpdateTrackedInstances; 81 | 82 | s_Tracked.Add(link); 83 | } 84 | 85 | static void RemoveTracking(NavMeshLink link) 86 | { 87 | s_Tracked.Remove(link); 88 | 89 | if (s_Tracked.Count == 0) 90 | NavMesh.onPreUpdate -= UpdateTrackedInstances; 91 | } 92 | 93 | void SetAutoUpdate(bool value) 94 | { 95 | if (m_AutoUpdatePosition == value) 96 | return; 97 | m_AutoUpdatePosition = value; 98 | if (value) 99 | AddTracking(this); 100 | else 101 | RemoveTracking(this); 102 | } 103 | 104 | void AddLink() 105 | { 106 | #if UNITY_EDITOR 107 | if (m_LinkInstance.valid) 108 | { 109 | Debug.LogError("Link is already added: " + this); 110 | return; 111 | } 112 | #endif 113 | 114 | var link = new NavMeshLinkData(); 115 | link.startPosition = m_StartPoint; 116 | link.endPosition = m_EndPoint; 117 | link.width = m_Width; 118 | link.costModifier = m_CostModifier; 119 | link.bidirectional = m_Bidirectional; 120 | link.area = m_Area; 121 | link.agentTypeID = m_AgentTypeID; 122 | m_LinkInstance = NavMesh.AddLink(link, transform.position, transform.rotation); 123 | if (m_LinkInstance.valid) 124 | m_LinkInstance.owner = this; 125 | 126 | m_LastPosition = transform.position; 127 | m_LastRotation = transform.rotation; 128 | } 129 | 130 | bool HasTransformChanged() 131 | { 132 | if (m_LastPosition != transform.position) return true; 133 | if (m_LastRotation != transform.rotation) return true; 134 | return false; 135 | } 136 | 137 | void OnDidApplyAnimationProperties() 138 | { 139 | UpdateLink(); 140 | } 141 | 142 | static void UpdateTrackedInstances() 143 | { 144 | foreach (var instance in s_Tracked) 145 | { 146 | if (instance.HasTransformChanged()) 147 | instance.UpdateLink(); 148 | } 149 | } 150 | 151 | #if UNITY_EDITOR 152 | void OnValidate() 153 | { 154 | m_Width = Mathf.Max(0.0f, m_Width); 155 | 156 | if (!m_LinkInstance.valid) 157 | return; 158 | 159 | UpdateLink(); 160 | 161 | if (!m_AutoUpdatePosition) 162 | { 163 | RemoveTracking(this); 164 | } 165 | else if (!s_Tracked.Contains(this)) 166 | { 167 | AddTracking(this); 168 | } 169 | } 170 | #endif 171 | } 172 | } 173 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/NavMeshComponents/Scripts/NavMeshLink.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fd3f0c8df3e6f2f41a45b75127c00b31 3 | timeCreated: 1520502095 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/NavMeshComponents/Scripts/NavMeshModifier.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace UnityEngine.AI 4 | { 5 | [ExecuteInEditMode] 6 | [AddComponentMenu("Navigation/NavMeshModifier", 32)] 7 | [HelpURL("https://github.com/Unity-Technologies/NavMeshComponents#documentation-draft")] 8 | public class NavMeshModifier : MonoBehaviour 9 | { 10 | [SerializeField] 11 | bool m_OverrideArea; 12 | public bool overrideArea { get { return m_OverrideArea; } set { m_OverrideArea = value; } } 13 | 14 | [SerializeField] 15 | int m_Area; 16 | public int area { get { return m_Area; } set { m_Area = value; } } 17 | 18 | [SerializeField] 19 | bool m_IgnoreFromBuild; 20 | public bool ignoreFromBuild { get { return m_IgnoreFromBuild; } set { m_IgnoreFromBuild = value; } } 21 | 22 | // List of agent types the modifier is applied for. 23 | // Special values: empty == None, m_AffectedAgents[0] =-1 == All. 24 | [SerializeField] 25 | List m_AffectedAgents = new List(new int[] { -1 }); // Default value is All 26 | 27 | static readonly List s_NavMeshModifiers = new List(); 28 | 29 | public static List activeModifiers 30 | { 31 | get { return s_NavMeshModifiers; } 32 | } 33 | 34 | void OnEnable() 35 | { 36 | if (!s_NavMeshModifiers.Contains(this)) 37 | s_NavMeshModifiers.Add(this); 38 | } 39 | 40 | void OnDisable() 41 | { 42 | s_NavMeshModifiers.Remove(this); 43 | } 44 | 45 | public bool AffectsAgentType(int agentTypeID) 46 | { 47 | if (m_AffectedAgents.Count == 0) 48 | return false; 49 | if (m_AffectedAgents[0] == -1) 50 | return true; 51 | return m_AffectedAgents.IndexOf(agentTypeID) != -1; 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/NavMeshComponents/Scripts/NavMeshModifier.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6d07ce676d7afda4dabb3b0f7dd5e654 3 | timeCreated: 1520502095 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/NavMeshComponents/Scripts/NavMeshModifierVolume.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace UnityEngine.AI 4 | { 5 | [ExecuteInEditMode] 6 | [AddComponentMenu("Navigation/NavMeshModifierVolume", 31)] 7 | [HelpURL("https://github.com/Unity-Technologies/NavMeshComponents#documentation-draft")] 8 | public class NavMeshModifierVolume : MonoBehaviour 9 | { 10 | [SerializeField] 11 | Vector3 m_Size = new Vector3(4.0f, 3.0f, 4.0f); 12 | public Vector3 size { get { return m_Size; } set { m_Size = value; } } 13 | 14 | [SerializeField] 15 | Vector3 m_Center = new Vector3(0, 1.0f, 0); 16 | public Vector3 center { get { return m_Center; } set { m_Center = value; } } 17 | 18 | [SerializeField] 19 | int m_Area; 20 | public int area { get { return m_Area; } set { m_Area = value; } } 21 | 22 | // List of agent types the modifier is applied for. 23 | // Special values: empty == None, m_AffectedAgents[0] =-1 == All. 24 | [SerializeField] 25 | List m_AffectedAgents = new List(new int[] { -1 }); // Default value is All 26 | 27 | static readonly List s_NavMeshModifiers = new List(); 28 | 29 | public static List activeModifiers 30 | { 31 | get { return s_NavMeshModifiers; } 32 | } 33 | 34 | void OnEnable() 35 | { 36 | if (!s_NavMeshModifiers.Contains(this)) 37 | s_NavMeshModifiers.Add(this); 38 | } 39 | 40 | void OnDisable() 41 | { 42 | s_NavMeshModifiers.Remove(this); 43 | } 44 | 45 | public bool AffectsAgentType(int agentTypeID) 46 | { 47 | if (m_AffectedAgents.Count == 0) 48 | return false; 49 | if (m_AffectedAgents[0] == -1) 50 | return true; 51 | return m_AffectedAgents.IndexOf(agentTypeID) != -1; 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/NavMeshComponents/Scripts/NavMeshModifierVolume.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2777bba7e4e7c6f4681e3ea77eef5438 3 | timeCreated: 1520502094 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/NavMeshComponents/Scripts/NavMeshSurface.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace UnityEngine.AI 4 | { 5 | public enum CollectObjects 6 | { 7 | All = 0, 8 | Volume = 1, 9 | Children = 2, 10 | } 11 | 12 | [ExecuteInEditMode] 13 | [DefaultExecutionOrder(-102)] 14 | [AddComponentMenu("Navigation/NavMeshSurface", 30)] 15 | [HelpURL("https://github.com/Unity-Technologies/NavMeshComponents#documentation-draft")] 16 | public class NavMeshSurface : MonoBehaviour 17 | { 18 | [SerializeField] 19 | int m_AgentTypeID; 20 | public int agentTypeID { get { return m_AgentTypeID; } set { m_AgentTypeID = value; } } 21 | 22 | [SerializeField] 23 | CollectObjects m_CollectObjects = CollectObjects.All; 24 | public CollectObjects collectObjects { get { return m_CollectObjects; } set { m_CollectObjects = value; } } 25 | 26 | [SerializeField] 27 | Vector3 m_Size = new Vector3(10.0f, 10.0f, 10.0f); 28 | public Vector3 size { get { return m_Size; } set { m_Size = value; } } 29 | 30 | [SerializeField] 31 | Vector3 m_Center = new Vector3(0, 2.0f, 0); 32 | public Vector3 center { get { return m_Center; } set { m_Center = value; } } 33 | 34 | [SerializeField] 35 | LayerMask m_LayerMask = ~0; 36 | public LayerMask layerMask { get { return m_LayerMask; } set { m_LayerMask = value; } } 37 | 38 | [SerializeField] 39 | NavMeshCollectGeometry m_UseGeometry = NavMeshCollectGeometry.RenderMeshes; 40 | public NavMeshCollectGeometry useGeometry { get { return m_UseGeometry; } set { m_UseGeometry = value; } } 41 | 42 | [SerializeField] 43 | int m_DefaultArea; 44 | public int defaultArea { get { return m_DefaultArea; } set { m_DefaultArea = value; } } 45 | 46 | [SerializeField] 47 | bool m_IgnoreNavMeshAgent = true; 48 | public bool ignoreNavMeshAgent { get { return m_IgnoreNavMeshAgent; } set { m_IgnoreNavMeshAgent = value; } } 49 | 50 | [SerializeField] 51 | bool m_IgnoreNavMeshObstacle = true; 52 | public bool ignoreNavMeshObstacle { get { return m_IgnoreNavMeshObstacle; } set { m_IgnoreNavMeshObstacle = value; } } 53 | 54 | [SerializeField] 55 | bool m_OverrideTileSize; 56 | public bool overrideTileSize { get { return m_OverrideTileSize; } set { m_OverrideTileSize = value; } } 57 | [SerializeField] 58 | int m_TileSize = 256; 59 | public int tileSize { get { return m_TileSize; } set { m_TileSize = value; } } 60 | [SerializeField] 61 | bool m_OverrideVoxelSize; 62 | public bool overrideVoxelSize { get { return m_OverrideVoxelSize; } set { m_OverrideVoxelSize = value; } } 63 | [SerializeField] 64 | float m_VoxelSize; 65 | public float voxelSize { get { return m_VoxelSize; } set { m_VoxelSize = value; } } 66 | 67 | // Currently not supported advanced options 68 | [SerializeField] 69 | bool m_BuildHeightMesh; 70 | public bool buildHeightMesh { get { return m_BuildHeightMesh; } set { m_BuildHeightMesh = value; } } 71 | 72 | // Reference to whole scene navmesh data asset. 73 | [UnityEngine.Serialization.FormerlySerializedAs("m_BakedNavMeshData")] 74 | [SerializeField] 75 | NavMeshData m_NavMeshData; 76 | public NavMeshData navMeshData { get { return m_NavMeshData; } set { m_NavMeshData = value; } } 77 | 78 | // Do not serialize - runtime only state. 79 | NavMeshDataInstance m_NavMeshDataInstance; 80 | Vector3 m_LastPosition = Vector3.zero; 81 | Quaternion m_LastRotation = Quaternion.identity; 82 | 83 | static readonly List s_NavMeshSurfaces = new List(); 84 | 85 | public static List activeSurfaces 86 | { 87 | get { return s_NavMeshSurfaces; } 88 | } 89 | 90 | void OnEnable() 91 | { 92 | Register(this); 93 | AddData(); 94 | } 95 | 96 | void OnDisable() 97 | { 98 | RemoveData(); 99 | Unregister(this); 100 | } 101 | 102 | public void AddData() 103 | { 104 | if (m_NavMeshDataInstance.valid) 105 | return; 106 | 107 | if (m_NavMeshData != null) 108 | { 109 | m_NavMeshDataInstance = NavMesh.AddNavMeshData(m_NavMeshData, transform.position, transform.rotation); 110 | m_NavMeshDataInstance.owner = this; 111 | } 112 | 113 | m_LastPosition = transform.position; 114 | m_LastRotation = transform.rotation; 115 | } 116 | 117 | public void RemoveData() 118 | { 119 | m_NavMeshDataInstance.Remove(); 120 | m_NavMeshDataInstance = new NavMeshDataInstance(); 121 | } 122 | 123 | public NavMeshBuildSettings GetBuildSettings() 124 | { 125 | var buildSettings = NavMesh.GetSettingsByID(m_AgentTypeID); 126 | if (buildSettings.agentTypeID == -1) 127 | { 128 | Debug.LogWarning("No build settings for agent type ID " + agentTypeID, this); 129 | buildSettings.agentTypeID = m_AgentTypeID; 130 | } 131 | 132 | if (overrideTileSize) 133 | { 134 | buildSettings.overrideTileSize = true; 135 | buildSettings.tileSize = tileSize; 136 | } 137 | if (overrideVoxelSize) 138 | { 139 | buildSettings.overrideVoxelSize = true; 140 | buildSettings.voxelSize = voxelSize; 141 | } 142 | return buildSettings; 143 | } 144 | 145 | public void BuildNavMesh() 146 | { 147 | var sources = CollectSources(); 148 | 149 | // Use unscaled bounds - this differs in behaviour from e.g. collider components. 150 | // But is similar to reflection probe - and since navmesh data has no scaling support - it is the right choice here. 151 | var sourcesBounds = new Bounds(m_Center, Abs(m_Size)); 152 | if (m_CollectObjects == CollectObjects.All || m_CollectObjects == CollectObjects.Children) 153 | { 154 | sourcesBounds = CalculateWorldBounds(sources); 155 | } 156 | 157 | var data = NavMeshBuilder.BuildNavMeshData(GetBuildSettings(), 158 | sources, sourcesBounds, transform.position, transform.rotation); 159 | 160 | if (data != null) 161 | { 162 | data.name = gameObject.name; 163 | RemoveData(); 164 | m_NavMeshData = data; 165 | if (isActiveAndEnabled) 166 | AddData(); 167 | } 168 | } 169 | 170 | public AsyncOperation UpdateNavMesh(NavMeshData data) 171 | { 172 | var sources = CollectSources(); 173 | 174 | // Use unscaled bounds - this differs in behaviour from e.g. collider components. 175 | // But is similar to reflection probe - and since navmesh data has no scaling support - it is the right choice here. 176 | var sourcesBounds = new Bounds(m_Center, Abs(m_Size)); 177 | if (m_CollectObjects == CollectObjects.All || m_CollectObjects == CollectObjects.Children) 178 | sourcesBounds = CalculateWorldBounds(sources); 179 | 180 | return NavMeshBuilder.UpdateNavMeshDataAsync(data, GetBuildSettings(), sources, sourcesBounds); 181 | } 182 | 183 | static void Register(NavMeshSurface surface) 184 | { 185 | if (s_NavMeshSurfaces.Count == 0) 186 | NavMesh.onPreUpdate += UpdateActive; 187 | 188 | if (!s_NavMeshSurfaces.Contains(surface)) 189 | s_NavMeshSurfaces.Add(surface); 190 | } 191 | 192 | static void Unregister(NavMeshSurface surface) 193 | { 194 | s_NavMeshSurfaces.Remove(surface); 195 | 196 | if (s_NavMeshSurfaces.Count == 0) 197 | NavMesh.onPreUpdate -= UpdateActive; 198 | } 199 | 200 | static void UpdateActive() 201 | { 202 | for (var i = 0; i < s_NavMeshSurfaces.Count; ++i) 203 | s_NavMeshSurfaces[i].UpdateDataIfTransformChanged(); 204 | } 205 | 206 | void AppendModifierVolumes(ref List sources) 207 | { 208 | // Modifiers 209 | List modifiers; 210 | if (m_CollectObjects == CollectObjects.Children) 211 | { 212 | modifiers = new List(GetComponentsInChildren()); 213 | modifiers.RemoveAll(x => !x.isActiveAndEnabled); 214 | } 215 | else 216 | { 217 | modifiers = NavMeshModifierVolume.activeModifiers; 218 | } 219 | 220 | foreach (var m in modifiers) 221 | { 222 | if ((m_LayerMask & (1 << m.gameObject.layer)) == 0) 223 | continue; 224 | if (!m.AffectsAgentType(m_AgentTypeID)) 225 | continue; 226 | var mcenter = m.transform.TransformPoint(m.center); 227 | var scale = m.transform.lossyScale; 228 | var msize = new Vector3(m.size.x * Mathf.Abs(scale.x), m.size.y * Mathf.Abs(scale.y), m.size.z * Mathf.Abs(scale.z)); 229 | 230 | var src = new NavMeshBuildSource(); 231 | src.shape = NavMeshBuildSourceShape.ModifierBox; 232 | src.transform = Matrix4x4.TRS(mcenter, m.transform.rotation, Vector3.one); 233 | src.size = msize; 234 | src.area = m.area; 235 | sources.Add(src); 236 | } 237 | } 238 | 239 | List CollectSources() 240 | { 241 | var sources = new List(); 242 | var markups = new List(); 243 | 244 | List modifiers; 245 | if (m_CollectObjects == CollectObjects.Children) 246 | { 247 | modifiers = new List(GetComponentsInChildren()); 248 | modifiers.RemoveAll(x => !x.isActiveAndEnabled); 249 | } 250 | else 251 | { 252 | modifiers = NavMeshModifier.activeModifiers; 253 | } 254 | 255 | foreach (var m in modifiers) 256 | { 257 | if ((m_LayerMask & (1 << m.gameObject.layer)) == 0) 258 | continue; 259 | if (!m.AffectsAgentType(m_AgentTypeID)) 260 | continue; 261 | var markup = new NavMeshBuildMarkup(); 262 | markup.root = m.transform; 263 | markup.overrideArea = m.overrideArea; 264 | markup.area = m.area; 265 | markup.ignoreFromBuild = m.ignoreFromBuild; 266 | markups.Add(markup); 267 | } 268 | 269 | if (m_CollectObjects == CollectObjects.All) 270 | { 271 | NavMeshBuilder.CollectSources(null, m_LayerMask, m_UseGeometry, m_DefaultArea, markups, sources); 272 | } 273 | else if (m_CollectObjects == CollectObjects.Children) 274 | { 275 | NavMeshBuilder.CollectSources(transform, m_LayerMask, m_UseGeometry, m_DefaultArea, markups, sources); 276 | } 277 | else if (m_CollectObjects == CollectObjects.Volume) 278 | { 279 | Matrix4x4 localToWorld = Matrix4x4.TRS(transform.position, transform.rotation, Vector3.one); 280 | var worldBounds = GetWorldBounds(localToWorld, new Bounds(m_Center, m_Size)); 281 | NavMeshBuilder.CollectSources(worldBounds, m_LayerMask, m_UseGeometry, m_DefaultArea, markups, sources); 282 | } 283 | 284 | if (m_IgnoreNavMeshAgent) 285 | sources.RemoveAll((x) => (x.component != null && x.component.gameObject.GetComponent() != null)); 286 | 287 | if (m_IgnoreNavMeshObstacle) 288 | sources.RemoveAll((x) => (x.component != null && x.component.gameObject.GetComponent() != null)); 289 | 290 | AppendModifierVolumes(ref sources); 291 | 292 | return sources; 293 | } 294 | 295 | static Vector3 Abs(Vector3 v) 296 | { 297 | return new Vector3(Mathf.Abs(v.x), Mathf.Abs(v.y), Mathf.Abs(v.z)); 298 | } 299 | 300 | static Bounds GetWorldBounds(Matrix4x4 mat, Bounds bounds) 301 | { 302 | var absAxisX = Abs(mat.MultiplyVector(Vector3.right)); 303 | var absAxisY = Abs(mat.MultiplyVector(Vector3.up)); 304 | var absAxisZ = Abs(mat.MultiplyVector(Vector3.forward)); 305 | var worldPosition = mat.MultiplyPoint(bounds.center); 306 | var worldSize = absAxisX * bounds.size.x + absAxisY * bounds.size.y + absAxisZ * bounds.size.z; 307 | return new Bounds(worldPosition, worldSize); 308 | } 309 | 310 | Bounds CalculateWorldBounds(List sources) 311 | { 312 | // Use the unscaled matrix for the NavMeshSurface 313 | Matrix4x4 worldToLocal = Matrix4x4.TRS(transform.position, transform.rotation, Vector3.one); 314 | worldToLocal = worldToLocal.inverse; 315 | 316 | var result = new Bounds(); 317 | foreach (var src in sources) 318 | { 319 | switch (src.shape) 320 | { 321 | case NavMeshBuildSourceShape.Mesh: 322 | { 323 | var m = src.sourceObject as Mesh; 324 | result.Encapsulate(GetWorldBounds(worldToLocal * src.transform, m.bounds)); 325 | break; 326 | } 327 | case NavMeshBuildSourceShape.Terrain: 328 | { 329 | // Terrain pivot is lower/left corner - shift bounds accordingly 330 | var t = src.sourceObject as TerrainData; 331 | result.Encapsulate(GetWorldBounds(worldToLocal * src.transform, new Bounds(0.5f * t.size, t.size))); 332 | break; 333 | } 334 | case NavMeshBuildSourceShape.Box: 335 | case NavMeshBuildSourceShape.Sphere: 336 | case NavMeshBuildSourceShape.Capsule: 337 | case NavMeshBuildSourceShape.ModifierBox: 338 | result.Encapsulate(GetWorldBounds(worldToLocal * src.transform, new Bounds(Vector3.zero, src.size))); 339 | break; 340 | } 341 | } 342 | // Inflate the bounds a bit to avoid clipping co-planar sources 343 | result.Expand(0.1f); 344 | return result; 345 | } 346 | 347 | bool HasTransformChanged() 348 | { 349 | if (m_LastPosition != transform.position) return true; 350 | if (m_LastRotation != transform.rotation) return true; 351 | return false; 352 | } 353 | 354 | void UpdateDataIfTransformChanged() 355 | { 356 | if (HasTransformChanged()) 357 | { 358 | RemoveData(); 359 | AddData(); 360 | } 361 | } 362 | 363 | #if UNITY_EDITOR 364 | bool UnshareNavMeshAsset() 365 | { 366 | // Nothing to unshare 367 | if (m_NavMeshData == null) 368 | return false; 369 | 370 | // Prefab parent owns the asset reference 371 | var prefabType = UnityEditor.PrefabUtility.GetPrefabType(this); 372 | if (prefabType == UnityEditor.PrefabType.Prefab) 373 | return false; 374 | 375 | // An instance can share asset reference only with its prefab parent 376 | var prefab = UnityEditor.PrefabUtility.GetPrefabParent(this) as NavMeshSurface; 377 | if (prefab != null && prefab.navMeshData == navMeshData) 378 | return false; 379 | 380 | // Don't allow referencing an asset that's assigned to another surface 381 | for (var i = 0; i < s_NavMeshSurfaces.Count; ++i) 382 | { 383 | var surface = s_NavMeshSurfaces[i]; 384 | if (surface != this && surface.m_NavMeshData == m_NavMeshData) 385 | return true; 386 | } 387 | 388 | // Asset is not referenced by known surfaces 389 | return false; 390 | } 391 | 392 | void OnValidate() 393 | { 394 | if (UnshareNavMeshAsset()) 395 | { 396 | Debug.LogWarning("Duplicating NavMeshSurface does not duplicate the referenced navmesh data", this); 397 | m_NavMeshData = null; 398 | } 399 | 400 | var settings = NavMesh.GetSettingsByID(m_AgentTypeID); 401 | if (settings.agentTypeID != -1) 402 | { 403 | // When unchecking the override control, revert to automatic value. 404 | const float kMinVoxelSize = 0.01f; 405 | if (!m_OverrideVoxelSize) 406 | m_VoxelSize = settings.agentRadius / 3.0f; 407 | if (m_VoxelSize < kMinVoxelSize) 408 | m_VoxelSize = kMinVoxelSize; 409 | 410 | // When unchecking the override control, revert to default value. 411 | const int kMinTileSize = 16; 412 | const int kMaxTileSize = 1024; 413 | const int kDefaultTileSize = 256; 414 | 415 | if (!m_OverrideTileSize) 416 | m_TileSize = kDefaultTileSize; 417 | // Make sure tilesize is in sane range. 418 | if (m_TileSize < kMinTileSize) 419 | m_TileSize = kMinTileSize; 420 | if (m_TileSize > kMaxTileSize) 421 | m_TileSize = kMaxTileSize; 422 | } 423 | } 424 | #endif 425 | } 426 | } 427 | -------------------------------------------------------------------------------- /NavMesh Example Project/Assets/NavMeshComponents/Scripts/NavMeshSurface.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3df27b9289d1e8c4fb82e0df4f4673ba 3 | timeCreated: 1520502095 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /NavMesh Example Project/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: 0 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_DisableAudio: 0 16 | m_VirtualizeEffects: 1 17 | -------------------------------------------------------------------------------- /NavMesh Example Project/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 | -------------------------------------------------------------------------------- /NavMesh Example Project/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: 3 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_EnablePCM: 1 18 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 19 | -------------------------------------------------------------------------------- /NavMesh Example Project/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 | -------------------------------------------------------------------------------- /NavMesh Example Project/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: 1 10 | m_DefaultBehaviorMode: 0 11 | m_SpritePackerMode: 2 12 | m_SpritePackerPaddingPower: 1 13 | m_EtcTextureCompressorBehavior: 0 14 | m_EtcTextureFastCompressor: 2 15 | m_EtcTextureNormalCompressor: 2 16 | m_EtcTextureBestCompressor: 5 17 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd 18 | m_ProjectGenerationRootNamespace: 19 | m_UserGeneratedProjectSuffix: 20 | m_CollabEditorSettings: 21 | inProgressEnabled: 1 22 | -------------------------------------------------------------------------------- /NavMesh Example Project/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: 9 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 10782, guid: 0000000000000000f000000000000000, type: 0} 39 | m_PreloadedShaders: [] 40 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 41 | type: 0} 42 | m_TierSettings_Tier1: 43 | renderingPath: 1 44 | useCascadedShadowMaps: 1 45 | m_TierSettings_Tier2: 46 | renderingPath: 1 47 | useCascadedShadowMaps: 1 48 | m_TierSettings_Tier3: 49 | renderingPath: 1 50 | useCascadedShadowMaps: 1 51 | m_DefaultRenderingPath: 1 52 | m_DefaultMobileRenderingPath: 1 53 | m_TierSettings: [] 54 | m_LightmapStripping: 0 55 | m_FogStripping: 0 56 | m_LightmapKeepPlain: 1 57 | m_LightmapKeepDirCombined: 1 58 | m_LightmapKeepDirSeparate: 1 59 | m_LightmapKeepDynamicPlain: 1 60 | m_LightmapKeepDynamicDirCombined: 1 61 | m_LightmapKeepDynamicDirSeparate: 1 62 | m_FogKeepLinear: 1 63 | m_FogKeepExp: 1 64 | m_FogKeepExp2: 1 65 | -------------------------------------------------------------------------------- /NavMesh Example Project/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 | -------------------------------------------------------------------------------- /NavMesh Example Project/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: -334000983 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 1.5 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 | - serializedVersion: 2 91 | agentTypeID: -334000983 92 | agentRadius: 1 93 | agentHeight: 3 94 | agentSlope: 30 95 | agentClimb: 0.42 96 | ledgeDropHeight: 0 97 | maxJumpAcrossDistance: 0 98 | minRegionArea: 2 99 | manualCellSize: 0 100 | cellSize: 0.16666667 101 | manualTileSize: 0 102 | tileSize: 256 103 | accuratePlacement: 0 104 | debug: 105 | m_Flags: 0 106 | m_SettingNames: 107 | - Humanoid 108 | - Orgre 109 | -------------------------------------------------------------------------------- /NavMesh Example Project/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 | -------------------------------------------------------------------------------- /NavMesh Example Project/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: 2 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_MinPenetrationForPenalty: 0.01 17 | m_BaumgarteScale: 0.2 18 | m_BaumgarteTimeOfImpactScale: 0.75 19 | m_TimeToSleep: 0.5 20 | m_LinearSleepTolerance: 0.01 21 | m_AngularSleepTolerance: 2 22 | m_QueriesHitTriggers: 1 23 | m_QueriesStartInColliders: 1 24 | m_ChangeStopsCallbacks: 0 25 | m_AlwaysShowColliders: 0 26 | m_ShowColliderSleep: 1 27 | m_ShowColliderContacts: 0 28 | m_ShowColliderAABB: 0 29 | m_ContactArrowScale: 0.2 30 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 31 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 32 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 33 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 34 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 35 | -------------------------------------------------------------------------------- /NavMesh Example Project/ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2017.3.0f3 2 | -------------------------------------------------------------------------------- /NavMesh Example Project/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: 5 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Fastest 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 | blendWeights: 1 21 | textureQuality: 1 22 | anisotropicTextures: 0 23 | antiAliasing: 0 24 | softParticles: 0 25 | softVegetation: 0 26 | realtimeReflectionProbes: 0 27 | billboardsFaceCameraPosition: 0 28 | vSyncCount: 0 29 | lodBias: 0.3 30 | maximumLODLevel: 0 31 | particleRaycastBudget: 4 32 | asyncUploadTimeSlice: 2 33 | asyncUploadBufferSize: 4 34 | excludedTargetPlatforms: [] 35 | - serializedVersion: 2 36 | name: Fast 37 | pixelLightCount: 0 38 | shadows: 0 39 | shadowResolution: 0 40 | shadowProjection: 1 41 | shadowCascades: 1 42 | shadowDistance: 20 43 | shadowNearPlaneOffset: 3 44 | shadowCascade2Split: 0.33333334 45 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 46 | blendWeights: 2 47 | textureQuality: 0 48 | anisotropicTextures: 0 49 | antiAliasing: 0 50 | softParticles: 0 51 | softVegetation: 0 52 | realtimeReflectionProbes: 0 53 | billboardsFaceCameraPosition: 0 54 | vSyncCount: 0 55 | lodBias: 0.4 56 | maximumLODLevel: 0 57 | particleRaycastBudget: 16 58 | asyncUploadTimeSlice: 2 59 | asyncUploadBufferSize: 4 60 | excludedTargetPlatforms: [] 61 | - serializedVersion: 2 62 | name: Simple 63 | pixelLightCount: 1 64 | shadows: 1 65 | shadowResolution: 0 66 | shadowProjection: 1 67 | shadowCascades: 1 68 | shadowDistance: 20 69 | shadowNearPlaneOffset: 3 70 | shadowCascade2Split: 0.33333334 71 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 72 | blendWeights: 2 73 | textureQuality: 0 74 | anisotropicTextures: 1 75 | antiAliasing: 0 76 | softParticles: 0 77 | softVegetation: 0 78 | realtimeReflectionProbes: 0 79 | billboardsFaceCameraPosition: 0 80 | vSyncCount: 1 81 | lodBias: 0.7 82 | maximumLODLevel: 0 83 | particleRaycastBudget: 64 84 | asyncUploadTimeSlice: 2 85 | asyncUploadBufferSize: 4 86 | excludedTargetPlatforms: [] 87 | - serializedVersion: 2 88 | name: Good 89 | pixelLightCount: 2 90 | shadows: 2 91 | shadowResolution: 1 92 | shadowProjection: 1 93 | shadowCascades: 2 94 | shadowDistance: 40 95 | shadowNearPlaneOffset: 3 96 | shadowCascade2Split: 0.33333334 97 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 98 | blendWeights: 2 99 | textureQuality: 0 100 | anisotropicTextures: 1 101 | antiAliasing: 0 102 | softParticles: 0 103 | softVegetation: 1 104 | realtimeReflectionProbes: 1 105 | billboardsFaceCameraPosition: 1 106 | vSyncCount: 1 107 | lodBias: 1 108 | maximumLODLevel: 0 109 | particleRaycastBudget: 256 110 | asyncUploadTimeSlice: 2 111 | asyncUploadBufferSize: 4 112 | excludedTargetPlatforms: [] 113 | - serializedVersion: 2 114 | name: Beautiful 115 | pixelLightCount: 3 116 | shadows: 2 117 | shadowResolution: 2 118 | shadowProjection: 1 119 | shadowCascades: 2 120 | shadowDistance: 70 121 | shadowNearPlaneOffset: 3 122 | shadowCascade2Split: 0.33333334 123 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 124 | blendWeights: 4 125 | textureQuality: 0 126 | anisotropicTextures: 2 127 | antiAliasing: 2 128 | softParticles: 1 129 | softVegetation: 1 130 | realtimeReflectionProbes: 1 131 | billboardsFaceCameraPosition: 1 132 | vSyncCount: 1 133 | lodBias: 1.5 134 | maximumLODLevel: 0 135 | particleRaycastBudget: 1024 136 | asyncUploadTimeSlice: 2 137 | asyncUploadBufferSize: 4 138 | excludedTargetPlatforms: [] 139 | - serializedVersion: 2 140 | name: Fantastic 141 | pixelLightCount: 10 142 | shadows: 2 143 | shadowResolution: 3 144 | shadowProjection: 1 145 | shadowCascades: 4 146 | shadowDistance: 150 147 | shadowNearPlaneOffset: 3 148 | shadowCascade2Split: 0.33333334 149 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 150 | blendWeights: 4 151 | textureQuality: 0 152 | anisotropicTextures: 2 153 | antiAliasing: 4 154 | softParticles: 1 155 | softVegetation: 1 156 | realtimeReflectionProbes: 1 157 | billboardsFaceCameraPosition: 1 158 | vSyncCount: 1 159 | lodBias: 2 160 | maximumLODLevel: 0 161 | particleRaycastBudget: 4096 162 | asyncUploadTimeSlice: 2 163 | asyncUploadBufferSize: 4 164 | excludedTargetPlatforms: [] 165 | m_PerPlatformDefaultQuality: 166 | Android: 2 167 | Nintendo 3DS: 5 168 | PS4: 5 169 | PSM: 5 170 | PSP2: 2 171 | Samsung TV: 2 172 | Standalone: 5 173 | Tizen: 2 174 | Web: 5 175 | WebGL: 3 176 | WiiU: 5 177 | Windows Store Apps: 5 178 | XboxOne: 5 179 | iPhone: 2 180 | tvOS: 5 181 | -------------------------------------------------------------------------------- /NavMesh Example Project/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 | -------------------------------------------------------------------------------- /NavMesh Example Project/ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /NavMesh Example Project/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 | m_Enabled: 0 7 | m_TestMode: 0 8 | m_TestEventUrl: 9 | m_TestConfigUrl: 10 | CrashReportingSettings: 11 | m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes 12 | m_Enabled: 0 13 | m_CaptureEditorExceptions: 1 14 | UnityPurchasingSettings: 15 | m_Enabled: 0 16 | m_TestMode: 0 17 | UnityAnalyticsSettings: 18 | m_Enabled: 0 19 | m_InitializeOnStartup: 1 20 | m_TestMode: 0 21 | m_TestEventUrl: 22 | m_TestConfigUrl: 23 | UnityAdsSettings: 24 | m_Enabled: 0 25 | m_InitializeOnStartup: 1 26 | m_TestMode: 0 27 | m_EnabledPlatforms: 4294967295 28 | m_IosGameId: 29 | m_AndroidGameId: 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NavMesh in Unity 2 | Project files for my tutorial on pathfinding using Unity's NavMesh Tools. 3 | 4 | Check out my [YouTube Channel](http://youtube.com/brackeys) for more tutorials. 5 | 6 | Everything is free to use, also commercially (public domain). --------------------------------------------------------------------------------