Search Unity

Question How to insert UI button into game view tab in the editor itself?

Discussion in 'Editor & General Support' started by MirzaBeig, May 30, 2022.

  1. MirzaBeig

    MirzaBeig

    Joined:
    Dec 27, 2014
    Posts:
    602
    upload_2022-5-30_6-25-56.png

    I mean literally across that thing somewhere^

    Can I modify it to add a button similar to "Mute Audio" and "Stats" on the right? I have an extension/tool that takes a capture of the gameview and I want to add the snapshot button right into the game view tab/bar like After Effects.

    upload_2022-5-30_6-28-48.png
     
  2. jeinselenVF

    jeinselenVF

    Joined:
    Nov 21, 2018
    Posts:
    1
    I'd love to do this too, for exactly the same functionality! Based on another thread, it doesn't sound easy, if possible. https://forum.unity.com/threads/how-to-add-a-toggle-button-to-the-game-view-tab.1129010/

    Adding buttons to the Scene view is at least possible, if not particularly seamless (it's within the view area instead of the bar across the top). It doesn't sound like there's an equivalent for the Game view. https://forum.unity.com/threads/creating-a-button-in-the-scene-view.261513/#post-1729853
     
    Last edited: May 16, 2023
    MirzaBeig likes this.
  3. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    7,935
    There is an API for adding buttons and more to the scene view toolbar: https://docs.unity3d.com/ScriptReference/EditorTools.EditorTool.html

    Not sure about the game view.