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.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Hi I just wanted to ask about menus in starter packs

Discussion in 'General Discussion' started by andrewmillspaughjr, Sep 26, 2015.

  1. andrewmillspaughjr

    andrewmillspaughjr

    Joined:
    Sep 11, 2015
    Posts:
    7
    Hello Unity, I wanted to ask something about assets. I'm not new to unity been using for a long time just never posted before, but I wanted to know how these starter kits or packs have there own menu, how dose that work and If I wanted to setup my own menu how can I do it, and can you edit a menu in a starter kit or packs that you have bought from the assets store to see how its made. I've never done this before and I'm looking for information on it :)

    Thanks you :)
     
  2. djweinbaum

    djweinbaum

    Joined:
    Nov 3, 2013
    Posts:
    533
    I can't tell which menu you're referring to. Are you asking how to make UI in a game? Or are you asking how to make a custom inspector/window in the editor?
     
  3. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,141
    Unity has a series of tutorials covering the new UI system that was introduced with Unity 4.6. You may want to start there.
     
  4. andrewmillspaughjr

    andrewmillspaughjr

    Joined:
    Sep 11, 2015
    Posts:
    7
    I'm trying to say on the top where file,edit menus like that here is a picture of what I mean, the image is Oculus menu how do they make that and can it be edit? Thanks I just don't know what its called sorry for not giving more info. I hop that makes more sent :)
     

    Attached Files:

  5. djweinbaum

    djweinbaum

    Joined:
    Nov 3, 2013
    Posts:
    533
    This code makes a menu called "Special" that has listed in it "Some Command" and it will execute SomeCommand() when clicked.

    Code (CSharp):
    1. using UnityEngine;
    2. using UnityEditor;
    3. using System.Collections;
    4.  
    5. public class VariousMenuItems : ScriptableObject {
    6.  
    7.     [MenuItem ("Special/Some Command")]
    8.     static void SomeCommand() {
    9.         // do something
    10.     }
    11. }
     
    Ryiah likes this.
  6. andrewmillspaughjr

    andrewmillspaughjr

    Joined:
    Sep 11, 2015
    Posts:
    7
    ok thanks that's what I've been looking for thanks aging :)