public NavMeshInspector(PathFindingMachine machine) : base(machine) { string scenePath = GetCurrentScenePath(); string sceneName = GetCurrentSceneName(); saveFilePath = scenePath.Substring(0, scenePath.IndexOf(".unity")) + "/" + sceneName + "_nav.asset"; // load previous settings var existingAsset = AssetDatabase.LoadAssetAtPath <NavMeshData>(saveFilePath); if (existingAsset != null) { } }
public Grid2DInspector(PathFindingMachine machine) : base(machine) { string scenePath = GetCurrentScenePath(); string sceneName = GetCurrentSceneName(); saveFilePath = scenePath.Substring(0, scenePath.IndexOf(".unity")) + "/" + sceneName + "_nav.asset"; // load previous settings var existingAsset = AssetDatabase.LoadAssetAtPath <Grid2DNavData>(saveFilePath); if (existingAsset != null) { GridSize = existingAsset.GridSize * 0.001f; RoleRadius = existingAsset.AgentRadius * 0.001f; MaxSlope = existingAsset.MaxSlope; } if (builder.worldBoxObj == null) { builder.worldBoxObj = GameObject.Find("worldbox"); } }
void OnEnable() { machine = target as PathFindingMachine; EnaureInspector(); }
public EditorInspector(PathFindingMachine machine) { this.machine = machine; }
void Awake() { Instance = this; }