public DataNode(Context context) { this.Children = new List<DataNode>(); this.TypeInfo = new NodeTypeInfo { Type = context.GetType() }; this.Value = context; }
private void DrawContextData(Context context, int level) { var prevIndentLevel = EditorGUI.indentLevel; EditorGUI.indentLevel = level; var contextMemberInfos = ContextTypeCache.GetMemberInfos(context.GetType()); foreach (var contextMemberInfo in contextMemberInfos) { if (contextMemberInfo.Property != null) { var memberValue = contextMemberInfo.Property.GetValue(context, null); this.DrawContextData(contextMemberInfo.Name, memberValue, level); } } EditorGUI.indentLevel = prevIndentLevel; }