Home Game Development unity – Create context menu in Scene view

unity – Create context menu in Scene view

0
unity – Create context menu in Scene view

[ad_1]

I created some MenuMerchandisecapabilities for navigating, that are presently displayed on the menu toolbar. The C# code:

utilizing UnityEditor;
utilizing UnityEngine;

public class Menu : MonoBehaviour {

static void rotateView(Quaternion rotation) {
    SceneView.lastActiveSceneView.LookAt(SceneView.lastActiveSceneView.pivot, rotation);

    SceneView.lastActiveSceneView.Repaint();
}

[MenuItem("View/Front _1")] // FRONT
static void FrontView() {
    rotateView(Quaternion.Euler(0, 180, 0));
}

[MenuItem("View/Back &1")] // BACK
static void BackView() {
    rotateView(Quaternion.Euler(0, 0, 0));
}

// Few extra comparable capabilities

}

I got here from Blender, the place there are shortcuts opening a context menu on the cursor place like this one, opened after urgent U:

Blender context menu

What I need to do is displaying a context menu after urgent P which might show a listing of applied MenuObjects.
Is one thing like this doable in Unity?

[ad_2]

LEAVE A REPLY

Please enter your comment!
Please enter your name here