public MiniInputCompile(ControlContext context) { mContext = context; NavmeshBuild build = context.Build; if (!build) { FinalizeOnFail("The control context's build does not exist.", true); return; } InputBuildOption options = InputBuildOption.ThreadSafeOnly; options |= (build.AutoCleanGeometry ? InputBuildOption.AutoCleanGeometry : 0); mBuilder = InputBuilder.Create(build.SceneQuery , build.GetInputProcessors() , options); if (mBuilder == null) { FinalizeOnFail("Could not create input builder.", true); return; } mState = State.Builder; }
public static bool OnGUIStandardButtons(ControlContext context , DebugViewContext debugContext , bool resetAllowed) { NavmeshBuild build = context.Build; if (!build) return false; TileBuildData tdata = build.BuildData; GUILayout.FlexibleSpace(); // Note: It is assumed that you should't get any debug display options unless // you can reset the build. So they are inside this condition. if (resetAllowed) { if (build.BuildState == NavmeshBuildState.Buildable || build.HasInputData) // One or more debug display options are allowed. GUILayout.Label("Show"); // Always call these. debugContext.OnGUIMeshDisplayOptions(); debugContext.OnGUIDebugExtras(); GUILayout.Space(MarginSize); GUIStyle style = (tdata != null && tdata.NeedsBakingCount() == 0) ? ControlUtil.HighlightedButton : GUI.skin.button; return OnGUIResetButton(context, debugContext, style); } return false; }
public override bool Enter(ControlContext context, DebugViewContext debug) { if (base.Enter(context, debug)) { DebugContext.DisableAllViews(); return(true); } return(false); }
public override bool Enter(ControlContext context, DebugViewContext debug) { if (base.Enter(context, debug)) { DebugContext.DisableAllViews(); return true; } return false; }
public BuildController(NavmeshBuild build, BuildTaskProcessor manager) { if (!build || manager == null) throw new System.ArgumentNullException(); mContext = new ControlContext(build, manager); mDebugContext = new DebugViewContext(build, mContext.Selection); mInputCon = new InputCompileControl(); mConfigCon = new NMGenConfigControl(); }
public override bool Enter(ControlContext context, DebugViewContext debug) { if (base.Enter(context, debug)) { // Unforgiving. Context.Build.ResetBuild(); return true; } return false; }
public override bool Enter(ControlContext context, DebugViewContext debug) { if (base.Enter(context, debug)) { // Unforgiving. Context.Build.ResetBuild(); return(true); } return(false); }
public static bool OnGUIResetButton(ControlContext context, DebugViewContext debug, GUIStyle style) { if (GUILayout.Button("Exit Build", style)) { context.AbortAllReqests("User requested build reset."); context.Build.ResetBuild(); // Abort requests first! debug.NeedsRepaint = true; return(true); } GUILayout.Space(MarginSize); return(false); }
public BuildController(NavmeshBuild build, BuildTaskProcessor manager) { if (!build || manager == null) { throw new System.ArgumentNullException(); } mContext = new ControlContext(build, manager); mDebugContext = new DebugViewContext(build, mContext.Selection); mInputCon = new InputCompileControl(); mConfigCon = new NMGenConfigControl(); }
public override bool Enter(ControlContext context, DebugViewContext debug) { if (base.Enter(context, debug)) { NavmeshBuild build = context.Build; if (build.TileSetDefinition != null || build.Config.TileSize > 0) { Debug.LogError(typeof(SingleTileBuildControl) + ": The build is tiled.", build); return(false); } return(true); } return(false); }
public override bool Enter(ControlContext context, DebugViewContext debug) { if (base.Enter(context, debug)) { NavmeshBuild build = context.Build; if (build.TileSetDefinition != null || build.Config.TileSize > 0) { Debug.LogError(typeof(SingleTileBuildControl) + ": The build is tiled.", build); return false; } return true; } return false; }
public override bool Enter(ControlContext context, DebugViewContext debug) { if (base.Enter(context, debug)) { NavmeshBuild build = context.Build; if (build.TileSetDefinition == null) { Debug.LogError(typeof(MultiTileBuildControl) + ": Build data has not been initialized, or not a tiled build."); return(false); } return(true); } return(false); }
public override bool Enter(ControlContext context, DebugViewContext debug) { if (base.Enter(context, debug)) { NavmeshBuild build = context.Build; if (build.TileSetDefinition == null) { Debug.LogError(typeof(MultiTileBuildControl) + ": Build data has not been initialized, or not a tiled build."); return false; } return true; } return false; }
public static bool OnGUIStandardButtons(ControlContext context , DebugViewContext debugContext , bool resetAllowed) { NavmeshBuild build = context.Build; if (!build) { return(false); } TileBuildData tdata = build.BuildData; GUILayout.FlexibleSpace(); // Note: It is assumed that you should't get any debug display options unless // you can reset the build. So they are inside this condition. if (resetAllowed) { if (build.BuildState == NavmeshBuildState.Buildable || build.HasInputData) { // One or more debug display options are allowed. GUILayout.Label("Show"); } // Always call these. debugContext.OnGUIMeshDisplayOptions(); debugContext.OnGUIDebugExtras(); GUILayout.Space(MarginSize); GUIStyle style = (tdata != null && tdata.NeedsBakingCount() == 0) ? ControlUtil.HighlightedButton : GUI.skin.button; return(OnGUIResetButton(context, debugContext, style)); } return(false); }
public static bool OnGUIResetButton(ControlContext context, DebugViewContext debug, GUIStyle style) { if (GUILayout.Button("Exit Build", style)) { context.AbortAllReqests("User requested build reset."); context.Build.ResetBuild(); // Abort requests first! debug.NeedsRepaint = true; return true; } GUILayout.Space(MarginSize); return false; }