1
0
mirror of https://github.com/Siccity/xNode.git synced 2025-12-20 09:16:01 +08:00
This commit is contained in:
Thor Brigsted 2019-01-20 22:01:26 +01:00
parent c9a4a81c31
commit 4c9264fed5
2 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ namespace XNodeEditor {
} }
public static bool GetAttrib<T>(Type classType, string fieldName, out T attribOut) where T : Attribute { 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); return GetAttrib(attribs, out attribOut);
} }

View File

@ -69,7 +69,7 @@ namespace XNode {
} }
private static void CachePorts(System.Type nodeType) { 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++) { for (int i = 0; i < fieldInfo.Length; i++) {
//Get InputAttribute and OutputAttribute //Get InputAttribute and OutputAttribute