public void DrawGraph(InternalGraphGroupAsset groupAsset, InternalBaseGraphAsset graphAsset) { GUILayoutExtension.HorizontalGroup(() => { EditorGUILayout.LabelField(graphAsset.name, GUILayout.Width(150)); if (GUILayout.Button("打开", GUILayout.Width(50))) { BaseGraphWindow.Open(graphAsset); } if (GUILayout.Button("删除", GUILayout.Width(50))) { groupAsset.RemoveGraph(graphAsset); } if (GUILayout.Button("重命名", GUILayout.Width(50))) { MiscHelper.Input($"输入{groupAsset.DisplayName}名:", (string name) => { graphAsset.name = name; EditorUtility.SetDirty(graphAsset); EditorUtility.SetDirty(target); AssetDatabase.SaveAssets(); AssetDatabase.Refresh(); }); } }); }
public GOAPGraphView(GOAPGraph _graph, CommandDispatcher _commandDispatcher, BaseGraphWindow _window) : base(_graph, _commandDispatcher, _window) { label = new Label(); label.style.fontSize = 30; label.style.color = new StyleColor(new Color(0.18f, 1f, 0.63f)); label.style.alignSelf = Align.FlexEnd; Add(label); }
private void OnClickOpenBuff() { Bullet_HitAddBulletNode node = Model as Bullet_HitAddBulletNode; GraphGroupPath path = GraphSetting.Setting.GetSearchPath <BulletGraphGroupAsset>(); BulletGraphAsset asset = GraphSetting.Setting.GetAsset <BulletGraphAsset>(path.searchPath, "bullet_" + node.addBullet.id); if (asset != null) { BaseGraphWindow.JumpTo(asset); } }
private void OnClickOpenBuff() { Skill_LearnBuffNode node = Model as Skill_LearnBuffNode; GraphGroupPath path = GraphSetting.Setting.GetSearchPath <BuffGraphGroupAsset>(); BuffGraphAsset asset = GraphSetting.Setting.GetAsset <BuffGraphAsset>(path.searchPath, "buff_" + node.id); if (asset != null) { BaseGraphWindow.JumpTo(asset); } }
private void OnClickOpenBuff() { Aoe_ActorLeaveAddAoeNode node = Model as Aoe_ActorLeaveAddAoeNode; GraphGroupPath path = GraphSetting.Setting.GetSearchPath <AoeGraphGroupAsset>(); AoeGraphAsset asset = GraphSetting.Setting.GetAsset <AoeGraphAsset>(path.searchPath, "aoe_" + node.addAoe.id); if (asset != null) { BaseGraphWindow.JumpTo(asset); } }
public override void OnInspectorGUI() { base.OnInspectorGUI(); Skill_Tl_CreateBulletClip clip = Target as Skill_Tl_CreateBulletClip; if (GUILayout.Button("Open", GUILayout.Height(30))) { GraphGroupPath path = GraphSetting.Setting.GetSearchPath <BulletGraphGroupAsset>(); BulletGraphAsset asset = GraphSetting.Setting.GetAsset <BulletGraphAsset>(path.searchPath, "bullet_" + clip.addBullet.id); BaseGraphWindow.JumpTo(asset); } }
public static bool OnBaseGraphOpened(int instanceID, int line) { var obj = EditorUtility.InstanceIDToObject(instanceID); if (!(obj is BaseGraph)) { return(false); } var win = BaseGraphWindow.GetWindow <BaseGraphWindow>(); win.Show(); win.InitializeGraph(obj as BaseGraph); return(false); }
public override void OnInspectorGUI() { base.OnInspectorGUI(); if (!ContextDataCache.TryGetContextData <GUIStyle>("BigLabel", out var bigLabel)) { bigLabel.value = new GUIStyle(GUI.skin.label); bigLabel.value.fontSize = 18; bigLabel.value.fontStyle = FontStyle.Bold; bigLabel.value.alignment = TextAnchor.MiddleLeft; bigLabel.value.stretchWidth = true; } IGraphAsset graphAsset = target as IGraphAsset; if (GUILayout.Button("Open", GUILayout.Height(30))) { BaseGraphWindow.Open(target as InternalBaseGraphAsset); } }
public MathGraphView(BaseGraph _graph, CommandDispatcher _commandDispatcher, BaseGraphWindow _window) : base(_graph, _commandDispatcher, _window) { }