Skip to content

Commit

Permalink
Update and Fix
Browse files Browse the repository at this point in the history
1.Add AssemblyInfo
2.GOAPWorldState now refresh states automatically
3.Fix some interface field name by Roslyn Analyzer
4. Update Example.unity Scene
5. Fix wrong tooltip for IsActivate field in PlannerPro
  • Loading branch information
AkiKurisu committed Sep 5, 2023
1 parent 9501152 commit 023884e
Show file tree
Hide file tree
Showing 40 changed files with 1,477 additions and 748 deletions.
10 changes: 5 additions & 5 deletions Editor/Core/GOAPActionSetEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ namespace Kurisu.GOAP.Editor
[CustomEditor(typeof(GOAPActionSet))]
public class GOAPActionSetEditor : UnityEditor.Editor
{
private const string LabelText="AkiGOAP <size=12>V1.0</size> ActionSet";
private const string ButtonText="Open GOAP Editor";
private const string LabelText = "AkiGOAP <size=12>V1.1</size> ActionSet";
private const string ButtonText = "Open GOAP Editor";
public override VisualElement CreateInspectorGUI()
{
var myInspector = new VisualElement();
myInspector.styleSheets.Add(UIUtility.GetInspectorStyleSheet());
myInspector.Add(UIUtility.GetLabel(LabelText,20));
var description=new PropertyField(serializedObject.FindProperty("Description"),string.Empty);
myInspector.Add(UIUtility.GetLabel(LabelText, 20));
var description = new PropertyField(serializedObject.FindProperty("Description"), string.Empty);
myInspector.Add(description);
//Draw Button
myInspector.Add(UIUtility.GetButton(ButtonText,UIUtility.AkiBlue,Open,100));
myInspector.Add(UIUtility.GetButton(ButtonText, UIUtility.AkiBlue, Open, 100));
return myInspector;
}
private void Open()
Expand Down
10 changes: 5 additions & 5 deletions Editor/Core/GOAPGoalSetEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ namespace Kurisu.GOAP.Editor
[CustomEditor(typeof(GOAPGoalSet))]
public class GOAPGoalSetEditor : UnityEditor.Editor
{
private const string LabelText="AkiGOAP <size=12>V1.0</size> GoalSet";
private const string ButtonText="Open GOAP Editor";
private const string LabelText = "AkiGOAP <size=12>V1.1</size> GoalSet";
private const string ButtonText = "Open GOAP Editor";
public override VisualElement CreateInspectorGUI()
{
var myInspector = new VisualElement();
myInspector.styleSheets.Add(UIUtility.GetInspectorStyleSheet());
myInspector.Add(UIUtility.GetLabel(LabelText,20));
var description=new PropertyField(serializedObject.FindProperty("Description"),string.Empty);
myInspector.Add(UIUtility.GetLabel(LabelText, 20));
var description = new PropertyField(serializedObject.FindProperty("Description"), string.Empty);
myInspector.Add(description);
//Draw Button
myInspector.Add(UIUtility.GetButton(ButtonText,UIUtility.AkiBlue,Open,100));
myInspector.Add(UIUtility.GetButton(ButtonText, UIUtility.AkiBlue, Open, 100));
return myInspector;
}
private void Open()
Expand Down
2 changes: 1 addition & 1 deletion Editor/Core/GOAPPlannerEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Kurisu.GOAP.Editor
[CustomEditor(typeof(GOAPPlanner), true)]
public class GOAPPlannerEditor : UnityEditor.Editor
{
private const string LabelText = "AkiGOAP <size=12>V1.0</size> Planner";
private const string LabelText = "AkiGOAP <size=12>V1.1</size> Planner";
private const string ButtonText = "Open Planner Snapshot";
private const string GraphButtonText = "Open GOAP Editor";
public override VisualElement CreateInspectorGUI()
Expand Down
8 changes: 5 additions & 3 deletions Editor/Core/GOAPPlannerProEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ namespace Kurisu.GOAP.Editor
[CustomEditor(typeof(GOAPPlannerPro), true)]
public class GOAPPlannerProEditor : UnityEditor.Editor
{
private const string LabelText = "AkiGOAP <size=12>V1.0</size> Planner Pro";
private const string LabelText = "AkiGOAP <size=12>V1.1</size> Planner Pro";
private const string ButtonText = "Open Planner Snapshot";
private const string GraphButtonText = "Open GOAP Editor";
private const string SkilSearchTooltip = "Enabled to skip search plan when already have an action, toggle this will need you to set correct precondition" +
private const string IsActiveTooltip = "Whether current planner is active, will be disbled automatically" +
" when skipSearchWhenActionRunning is on";
private const string SkilSearchTooltip = "Enabled to skip search plan when already have an action, enable this will need you to set correct precondition" +
"for each action to let it quit by itself";
public override VisualElement CreateInspectorGUI()
{
Expand All @@ -28,7 +30,7 @@ public override VisualElement CreateInspectorGUI()
myInspector.Q<PropertyField>("PropertyField:tickType").MoveToEnd(myInspector);
var isActive = new Toggle("Is Active")
{
tooltip = SkilSearchTooltip
tooltip = IsActiveTooltip
};
isActive.BindProperty(serializedObject.FindProperty("isActive"));
isActive.AddTo(myInspector);
Expand Down
Loading

0 comments on commit 023884e

Please sign in to comment.