internal void OnLoadAsset(ActionGraph treeAsset) { if (Asset == treeAsset) { return; } if (Asset) { OnLostAsset(); } if (treeAsset == null) { Asset = null; AssetPath = string.Empty; } else { Asset = treeAsset; AssetPath = AssetDatabase.GetAssetPath(Asset); Asset.Notifiers.Add(this); } PathBuilder <ActionGraph> builder = new PathBuilder <ActionGraph>(); ParameterPath = builder .ByListOf <Framework.Parameter>(a => nameof(a.Parameters)) .Path(); RecreateNodes(); }
public ActionGraphEditorEntryBase(ActionGraph graph, ActionGraphNodeBase node, ActionGraphPresenter presenter) : base(graph, node, presenter) { var builder = new PathBuilder <AnyEntry>(); ConditionPropertyPath = builder .ByListOf <AnyEntry.EntryInfo>(t => nameof(t.Entries)) .Path(); if (ActionNode) { ActionNode.Notifiers.Add(this); } }
public ActionGraphEditorState(ActionGraph graph, ActionGraphNodeBase node, ActionGraphPresenter presenter) : base(graph, node, presenter) { var connection_builder = new PathBuilder <ActionState>(); connection_builder.ByListOf <ActionState.ConnectionInfo>(l => nameof(State.ConnectionInfos)); ToConnectionInfos = connection_builder.Path(); var child_builder = new PathBuilder <ActionState>(); child_builder.ByListOf <ActionGraphNode>(l => nameof(State.Connections)); ToChildren = child_builder.Path(); if (ActionNode) { ActionNode.Notifiers.Add(this); } }