示例#1
0
 // returns updated container if it was changed, null otherwise
 public static BinaryContainer Draw(this ContainerEditorView view, Rect position)
 {
     if (view == null)
     {
         var boxRect = position.SliceTop(EditorHelpers.GetLinesHeight(2));
         EditorGUI.HelpBox(boxRect, "Select a container asset", MessageType.Info);
         return(null);
     }
     if (!view.Info.IsValid)
     {
         var boxRect = position.SliceTop(EditorHelpers.GetLinesHeight(2));
         EditorGUI.HelpBox(boxRect, "This is not a valid container", MessageType.Error);
         return(null);
     }
     return(view.DrawContainerContent(position));
 }