AddShelf() 공개 정적인 메소드

public static AddShelf ( string shelfName, string shelfPath ) : HEU_Shelf
shelfName string
shelfPath string
리턴 HEU_Shelf
		public void OnGUI()
		{
			using (new GUILayout.VerticalScope())
			{
				_shelfName = EditorGUILayout.TextField("New Shelf Name", _shelfName);

				using (new EditorGUI.DisabledScope(string.IsNullOrEmpty(_shelfName)))
				{
					if (GUILayout.Button("Create"))
					{
						//Debug.Log("Shelf name: " + _shelfName);
						HEU_ShelfTools.AddShelf(_shelfName, _shelfPath);
						HEU_ShelfTools.SaveShelf();
						HEU_ShelfTools.SetReloadShelves();

						this.Close();
					}
				}

				if (GUILayout.Button("Cancel"))
				{
					this.Close();
				}
			}
		}
예제 #2
0
	public void OnGUI()
	{
	    using (new GUILayout.VerticalScope())
	    {
		_shelfName = EditorGUILayout.TextField("New Shelf Name", _shelfName);
		using (new EditorGUI.DisabledScope(string.IsNullOrEmpty(_shelfName) || _shelfName.Trim().Length == 0))
		{
		    if (GUILayout.Button("Create"))
		    {
			//HEU_Logger.Log("Shelf name: " + _shelfName);
			HEU_Shelf newShelf = HEU_ShelfTools.AddShelf(_shelfName, _shelfPath);
			if (newShelf != null)
			{
			    HEU_ShelfTools.SaveShelf();
			    HEU_ShelfTools.SetReloadShelves();
			    this.Close();
			}
			else
			{
			    HEU_Logger.LogError("Invalid Shelf! Please check if the name or path is valid.");
			}
		    }
		}

		if (GUILayout.Button("Cancel"))
		{
		    this.Close();
		}
	    }
	}