protected static ObjectNode AddObjectNode( TreeNode parentNode, UObject unrealObject, string imageName = "" ) { if( unrealObject == null ) return null; var objN = new ObjectNode( unrealObject ){Text = unrealObject.Name}; unrealObject.InitializeNodes( objN ); if( imageName != string.Empty ) { objN.ImageKey = imageName; objN.SelectedImageKey = imageName; } if( unrealObject.DeserializationState.HasFlag( ObjectState.Errorlized ) ) { objN.ForeColor = System.Drawing.Color.Red; } parentNode.Nodes.Add( objN ); return objN; }
protected static ObjectNode AddSimpleObjectNode( TreeNode parentNode, UObject unrealObject, string text, string imageName = "" ) { if( unrealObject == null ) return null; var objN = new ObjectNode( unrealObject ){Text = text + ":" + unrealObject.Name}; if( imageName != string.Empty ) { objN.ImageKey = imageName; objN.SelectedImageKey = imageName; } parentNode.Nodes.Add( objN ); return objN; }