csharp
public sealed class SetPortTextCommandSetting the inline text on one of a node's inputs.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
SetPortValueCommand's twin, for the ports made of names rather than of lanes — see Texts for why those exist. Everything about it is the same argument: whether there was a text is recorded as well as what it was, and a merge keeps the earlier one's, so typing a resource name is one undo entry rather than one a keystroke.
Fields and properties (1)
public override string NameWhat this is called in the undo history, as a person would say it.
Methods (4)
public SetPortTextCommand(NodeGraphModel graph, NodeId node, string port, string value, EditorDocument? document = null)Describes setting an inline text.
protected override void Apply()Makes the change. Called once on execute and again on every redo.
protected override void Revert()Puts back exactly what Apply changed.
public override bool TryMergeWith(IEditorCommand previous, out IEditorCommand? merged)
Used by (3)
- CompositorViewVixen.Editor.AssetEditors
- ShaderGraphTestsVixen.Editor.AssetEditors.Tests
- ShaderGraphViewVixen.Editor.AssetEditors