mirror of
https://github.com/Siccity/xNode.git
synced 2025-12-20 01:06:01 +08:00
Fixed #100
This commit is contained in:
parent
c9a4a81c31
commit
4c9264fed5
@ -35,7 +35,7 @@ namespace XNodeEditor {
|
||||
}
|
||||
|
||||
public static bool GetAttrib<T>(Type classType, string fieldName, out T attribOut) where T : Attribute {
|
||||
object[] attribs = classType.GetField(fieldName).GetCustomAttributes(typeof(T), false);
|
||||
object[] attribs = classType.GetField(fieldName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance).GetCustomAttributes(typeof(T), false);
|
||||
return GetAttrib(attribs, out attribOut);
|
||||
}
|
||||
|
||||
|
||||
@ -69,7 +69,7 @@ namespace XNode {
|
||||
}
|
||||
|
||||
private static void CachePorts(System.Type nodeType) {
|
||||
System.Reflection.FieldInfo[] fieldInfo = nodeType.GetFields();
|
||||
System.Reflection.FieldInfo[] fieldInfo = nodeType.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
for (int i = 0; i < fieldInfo.Length; i++) {
|
||||
|
||||
//Get InputAttribute and OutputAttribute
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user