Customize your own plugin

DevManager document :


[Optional] for programmer who need to create thier own GUI window by DevManager.

  1. Create your own script, and register GUI window simply just extends a class “MonoBehaviourDev.cs”.
    for example we create a script call “HelloWorld.cs”
    and add “HelloWorld.cs” to any gameobject on scene.
    DevManager_info001
  2. When this script running on scene, it created a empty GUIWindow. (push the button on Dock bar)
    DevManager_info002
  3. Now back to the code.
    override a class call “HandleDebugGUI()” and run the game.
    public override void HandleDebugGUI ()
    {
    	GUILayout.Label("Hello World.");
    }
  4. Now you got the result like this.
    DevManager_info003
  5. about GUI & GUILayout, you may find in here.
    https://docs.unity3d.com/Documentation/ScriptReference/GUILayout.html
  6. One more thing, you may needed to know.
    when using “MonoBehaviourDev” following method will need extends the parent method.
    • OnEnable()
    • OnDisable()
    • OnGUI()
    • OnFocus()
    • OnBlur()

    something like this.

    public override void OnEnable ()
    {
    	base.OnEnable (); // don't remove this line.
    	//
    	// you can write you code here.
    }

 

[The end of DevManager framework description.]

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *

*