FreshRSS

Normální zobrazení

Jsou dostupné nové články, klikněte pro obnovení stránky.
PředevčíremHlavní kanál
  • ✇Recent Questions - Game Development Stack Exchange
  • Create context menu in Scene viewElgirhath
    I created some MenuItemfunctions for navigating, which are currently displayed on the menu toolbar. The C# code: using UnityEditor; using 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
     

Create context menu in Scene view

I created some MenuItemfunctions for navigating, which are currently displayed on the menu toolbar. The C# code:

using UnityEditor;
using 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 more similar functions

}

I came from Blender, where there are shortcuts opening a context menu on the cursor position like this one, opened after pressing U:

Blender context menu

What I want to do is displaying a context menu after pressing P which would display a list of implemented MenuItems. Is something like this possible in Unity?

Spider-Man 2 Update Adds Debug Menu Letting Players Beat Game In Seconds

7. Březen 2024 v 21:05

Uh-oh. The latest patch for Marvel’s Spider-Man 2—Insomniac’s PS5-exclusive open-world superhero blockbuster—added more than just a new game+ option. According to a tweet from the developer and also noticed by fans online, you can now easily access a debug menu and beat the entire game in a few quick button presses.

Read more...

❌
❌