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; }
public DataNode(Context context) { this.Children = new List<DataNode>(); this.TypeInfo = new NodeTypeInfo { Type = context.GetType() }; this.Value = context; }
/// <summary> /// Selects the specified item. /// </summary> /// <param name="item">Item to select.</param> public void OnItemSelected(Context item) { Debug.Log("Item selected: " + item); this.SelectedItem = (ContextPropertyItemContext)item; }