Skip to content

Commit 81d97c4

Browse files
committed
Merge new-prefab-workflow -> 2018.3
2 parents 98d1250 + bc10283 commit 81d97c4

35 files changed

Lines changed: 1957 additions & 127 deletions

Assets/Examples/Editor/NavMeshPrefabInstanceEditor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void OnInspectorGUIPrefab(GameObject go)
4545
{
4646
if (GUILayout.Button("Select the Prefab asset to bake or clear the navmesh", EditorStyles.helpBox))
4747
{
48-
Selection.activeObject = PrefabUtility.GetPrefabParent(go);
48+
Selection.activeObject = PrefabUtility.GetCorrespondingObjectFromSource(go);
4949
EditorGUIUtility.PingObject(Selection.activeObject);
5050
}
5151
}
@@ -71,7 +71,7 @@ NavMeshData Build(NavMeshPrefabInstance instance)
7171
var sources = new List<NavMeshBuildSource>();
7272
var markups = new List<NavMeshBuildMarkup>();
7373

74-
NavMeshBuilder.CollectSources(root, ~0, NavMeshCollectGeometry.RenderMeshes, 0, markups, sources);
74+
NavMeshBuilder.CollectSources(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);
316 Bytes
Binary file not shown.
-1.59 KB
Binary file not shown.
-2.43 KB
Binary file not shown.
-3.22 KB
Binary file not shown.
-2.41 KB
Binary file not shown.
-3.2 KB
Binary file not shown.
-3.2 KB
Binary file not shown.
-3.98 KB
Binary file not shown.
-1.62 KB
Binary file not shown.

0 commit comments

Comments
 (0)