Example #1
0
        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)
            {
            }
        }
Example #2
0
        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();
 }
Example #4
0
 public EditorInspector(PathFindingMachine machine)
 {
     this.machine = machine;
 }
Example #5
0
 void Awake()
 {
     Instance = this;
 }