예제 #1
0
        public static GUIStyle Background(this GUIStyle current, string value, bool asCopy = true)
        {
            if (value.IsEmpty())
            {
                return(current.Background(new Texture2D(0, 0), asCopy));
            }
            Texture2D texture = FileManager.GetAsset <Texture2D>(value);

            if (texture != null)
            {
                return(current.Background(texture, asCopy));
            }
            return(current);
        }
예제 #2
0
 public override void OnPreviewGUI(Rect area, GUIStyle background)
 {
     this.target.name = this.title;
     base.OnPreviewGUI(area, background.Background(this.header));
 }