We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
e.g.
using System.Collections.Generic; using System.Reflection; using GraphProcessor; public abstract class EventNode<T> : BaseNode { [Output("Event values", allowMultiple = true)] public IEnumerable<object> outputs = null; static PortData[] _outputPortDatas; public override void InitializePorts() { if (_outputPortDatas == null) { var fields = typeof(T).GetFields(BindingFlags.Public | BindingFlags.Instance); _outputPortDatas = new PortData[fields.Length]; for (var i = 0; i < fields.Length; i++) { var field = fields[i]; _outputPortDatas[i] = new PortData { displayName = field.Name, displayType = field.FieldType, identifier = field.Name }; } } base.InitializePorts(); } [CustomPortBehavior(nameof(outputs))] protected IEnumerable<PortData> GetOutputPorts(List<SerializableEdge> _) { foreach (var p in _outputPortDatas) { yield return p; } } // ... }
using GraphProcessor; [System.Serializable, NodeMenuItem("EffortStar/Events/Reload")] class ReloadEventNode : EventNode<Reload> { }
This just shows a single output called "Event values".
Problem is here:
NodeGraphProcessor/Assets/com.alelievr.NodeGraphProcessor/Runtime/Elements/BaseNode.cs
Line 535 in 644efea
Requires a BindingFlags.FlattenHierarchy to work.
BindingFlags.FlattenHierarchy
The text was updated successfully, but these errors were encountered:
Flatten hierarchy when searching for attributes (alelievr#216)
9e784b6
Fixes alelievr#216
e279f67
Successfully merging a pull request may close this issue.
e.g.
This just shows a single output called "Event values".
Problem is here:
NodeGraphProcessor/Assets/com.alelievr.NodeGraphProcessor/Runtime/Elements/BaseNode.cs
Line 535 in 644efea
Requires a
BindingFlags.FlattenHierarchy
to work.The text was updated successfully, but these errors were encountered: