Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question Shortcuts by code to Unity functions

Discussion in 'Editor & General Support' started by Vifi, Mar 1, 2021.

  1. Vifi


    Aug 5, 2013
    do any of you know about making shortcuts from entire Unity functions by code?
    I mean, especialy i want to make buttons (or other controls like dropdown menu) in onscreen tool that will provide function from Window > Render Pipeline > Render Pipeline Debug Window > Material > Common Material Properties (dropdown menu). I want to bring that dropdown menu to my own editor window. Is there a way to do it?

    Thanks in advance ;)
  2. fffMalzbier


    Jun 14, 2011
    For normal context menu items you can use
    if you want to access a Dropdown from inside of anohter editor you need to look at the reference code unity has up of its editor / the code for the renderpipline if that is specific to that.

    Reflection can help to access stuff that is not normally accessible , but keep in mind that this can break from version to version.