init
This commit is contained in:
commit
341a877b4a
2338 changed files with 1346408 additions and 0 deletions
18
Assets/NavMesh/Tests/Editor/PrefabSavingUtil.cs
Normal file
18
Assets/NavMesh/Tests/Editor/PrefabSavingUtil.cs
Normal file
|
@ -0,0 +1,18 @@
|
|||
using System;
|
||||
using System.Reflection;
|
||||
using UnityEditor.Experimental.SceneManagement;
|
||||
|
||||
public class PrefabSavingUtil {
|
||||
|
||||
public static void SavePrefab(PrefabStage prefabStage)
|
||||
{
|
||||
if (prefabStage == null)
|
||||
throw new ArgumentNullException();
|
||||
|
||||
var savePrefabMethod = prefabStage.GetType().GetMethod("SavePrefab", BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
if (savePrefabMethod == null)
|
||||
throw new InvalidOperationException();
|
||||
|
||||
savePrefabMethod.Invoke(prefabStage, null);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue