Skip to content

Commit d29a5f3

Browse files
committed
Merge 2018.3 -> master
2 parents af0ed70 + 78b16b4 commit d29a5f3

File tree

68 files changed

+2149
-305
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+2149
-305
lines changed

.gitattributes

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
* text=auto
2+
# Text files
3+
*.cs diff=csharp text
4+
*.txt text
5+
*.mat text
6+
*.shader text
7+
*.meta text
8+
*.md5 text
9+
*.compute text
10+
*.md text
11+
*.prefab text
12+
*/ProjectSettings/*.asset text
13+

.gitignore

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,26 @@
1-
Library/*
2-
Temp/*
3-
Assembly-CSharp-Editor.csproj
4-
Assembly-CSharp.csproj
5-
NavMeshComponents.sln
6-
NavMeshComponents.userprefs
1+
**/Library/
2+
**/Temp/
3+
**/obj/
4+
5+
**/.vscode/
6+
**/.vs
7+
8+
**/Assets/Plugins/*
9+
**/Assets/Plugins.meta
10+
11+
*.idea
12+
*.csproj
13+
*.sln
14+
*.suo
15+
*.userprefs
16+
*.app
17+
*.VC.*
18+
.DS_Store
19+
*~
20+
*.swp
21+
22+
.vs/
23+
build/*
24+
*.rsp
25+
*.pyc
26+
/Logs

Assets/Examples/Editor/NavMeshPrefabInstanceEditor.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using UnityEditor;
33
using UnityEngine;
44
using UnityEngine.AI;
5-
using NavMeshBuilder = UnityEngine.AI.NavMeshBuilder;
65

76
[CanEditMultipleObjects]
87
[CustomEditor(typeof(NavMeshPrefabInstance))]
@@ -38,7 +37,7 @@ public override void OnInspectorGUI()
3837

3938
void OnInspectorGUIPrefab(GameObject go)
4039
{
41-
var prefab = PrefabUtility.GetPrefabObject(go);
40+
var prefab = PrefabUtility.GetPrefabInstanceHandle(go);
4241
var path = AssetDatabase.GetAssetPath(prefab);
4342

4443
if (prefab && string.IsNullOrEmpty(path))
@@ -71,7 +70,8 @@ NavMeshData Build(NavMeshPrefabInstance instance)
7170
var sources = new List<NavMeshBuildSource>();
7271
var markups = new List<NavMeshBuildMarkup>();
7372

74-
NavMeshBuilder.CollectSources(root, ~0, NavMeshCollectGeometry.RenderMeshes, 0, markups, sources);
73+
UnityEditor.AI.NavMeshBuilder.CollectSourcesInStage(
74+
root, ~0, NavMeshCollectGeometry.RenderMeshes, 0, markups, instance.gameObject.scene, sources);
7575
var settings = NavMesh.GetSettingsByID(0);
7676
var bounds = new Bounds(Vector3.zero, 1000.0f * Vector3.one);
7777
var navmesh = NavMeshBuilder.BuildNavMeshData(settings, sources, bounds, root.position, root.rotation);
@@ -85,7 +85,7 @@ void OnClear()
8585
{
8686
var instance = (NavMeshPrefabInstance)tgt;
8787
var go = instance.gameObject;
88-
var prefab = PrefabUtility.GetPrefabObject(go);
88+
var prefab = PrefabUtility.GetPrefabInstanceHandle(go);
8989
var path = AssetDatabase.GetAssetPath(prefab);
9090

9191
if (string.IsNullOrEmpty(path))
@@ -105,7 +105,7 @@ void OnBake()
105105
{
106106
var instance = (NavMeshPrefabInstance)tgt;
107107
var go = instance.gameObject;
108-
var prefab = PrefabUtility.GetPrefabObject(go);
108+
var prefab = PrefabUtility.GetPrefabInstanceHandle(go);
109109
var path = AssetDatabase.GetAssetPath(prefab);
110110

111111
if (string.IsNullOrEmpty(path))
316 Bytes
Binary file not shown.

Assets/Examples/Prefabs/DungeonTiles/Tile0.prefab.meta

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
-1.59 KB
Binary file not shown.

Assets/Examples/Prefabs/DungeonTiles/Tile1.prefab.meta

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.

Assets/Examples/Prefabs/DungeonTiles/Tile10.prefab.meta

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.

0 commit comments

Comments
 (0)