Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by COLLAnitySV · Oct 27, 2011 at 03:21 PM · 3ditweensettingsmain menu

3D Main Menu Problem

Hey, everybody i've got a problem about the 3D Main Menu from burgzerg arcade this is the script

 var menuItems:Menutem[]; 
 var menuItemz:Menutemz[]; 
 var currentMenuItemz:int = 0;
 var beep : AudioClip;
 var beepExit : AudioClip;
 var beepChoose : AudioClip;
 var camera1 : Camera;
 var camera2 : Camera;
 var currentMenuItem:int = 0;
 var textD3:TextMesh;
 var keyDelay:float = 0.25;
 
 function Start(){
     Screen.showCursor = false;
     Menu();
 }
 
 function Menu()
 {
     settingsCript = GetComponent(SettingsManager);
     menuItems[currentMenuItem].OnSelected(true);
     var lastMenuItem:int = currentMenuItem;
     while(true)
     {
         if(Input.GetAxisRaw("Vertical") > 0.9)
         {
         lastMenuItem = currentMenuItem;
                 
         currentMenuItem--;
         audio.PlayOneShot(beepChoose);
         if(currentMenuItem < 0) currentMenuItem = 0;
                 
         if(lastMenuItem != currentMenuItem)
         {
                         menuItems[lastMenuItem].OnSelected(false);
                         
                         menuItems[currentMenuItem].OnSelected(true);
                 }
                 
                 yield new WaitForSeconds(keyDelay);
             }
             else if(Input.GetAxisRaw("Vertical") < -0.9)
             {
             lastMenuItem = currentMenuItem;
             currentMenuItem++;
             audio.PlayOneShot(beepChoose);
             if(currentMenuItem >= menuItems.length) currentMenuItem = menuItems.length - 1;
             if(lastMenuItem != currentMenuItem)
             {
                         menuItems[lastMenuItem].OnSelected(false);
                                     menuItems[currentMenuItem].OnSelected(true);
             }
                 
             yield new WaitForSeconds(keyDelay);
 
             }
             yield;
             
             if(Input.GetButtonDown("Jump"))
             {
                     
             if(currentMenuItem == 0)
                 {
             audio.PlayOneShot (beep);                
         yield new WaitForSeconds(1.0);
 
             LevelLoadFade.FadeAndLoadLevel("tessst", Color.white, 0.5);
             AudioListener.volume = 0.3;
             }    
             if(currentMenuItem == 1)
             {
             camera1.enabled = false;
             camera2.enabled = true;            
             SettingsArea();            
             }
             if(currentMenuItem == 2)
             {
             audio.PlayOneShot (beepExit);
             yield new WaitForSeconds(0.8);
             Application.Quit();
             }
         }
     }
 }
 
 function SettingsArea (){
     menuItemz[currentMenuItemz].OnSelected(true);
 
     var lastMenuItem:int = currentMenuItemz;
         while(true)
         {
         if(Input.GetAxisRaw("Vertical") > 0.9)
     {
     lastMenuItem = currentMenuItemz;
                 
     currentMenuItemz--;
     audio.PlayOneShot(beepChoose);
     if(currentMenuItemz < 0) currentMenuItemz = 0;
                 
     if(lastMenuItem != currentMenuItemz)
     {
                         menuItemz[lastMenuItem].OnSelected(false);
                         
                         menuItemz[currentMenuItemz].OnSelected(true);
         }
                 
         yield new WaitForSeconds(keyDelay);
         }
         else if(Input.GetAxisRaw("Vertical") < -0.9)
         {
         lastMenuItem = currentMenuItemz;
             
         currentMenuItemz++;
         audio.PlayOneShot(beepChoose);
         if(currentMenuItemz >= menuItemz.length) currentMenuItemz = menuItemz.length - 1;
                 
         if(lastMenuItem != currentMenuItemz)
         {
                         menuItemz[lastMenuItem].OnSelected(false);
                         
                         menuItemz[currentMenuItemz].OnSelected(true);
                 }
                 
         yield new WaitForSeconds(keyDelay);
 
         }
         yield;
             
         if(Input.GetButtonDown("Jump"))
     {
                     
         if(currentMenuItemz == 0)
         {
         audio.PlayOneShot (beep);
            
         }        
         if(currentMenuItemz == 1)
         {
         ShowDevice();
         }
         if(currentMenuItemz == 2)
         {        
         }
         if(currentMenuItemz == 3)
         {
         camera1.enabled = true;
         camera2.enabled = false;        
         }
     }
     }
 }
 
 function ShowDevice() {
     textD3.text = ("System Info"+"\n"+"\n"+"Unity player version : "+Application.unityVersion+
     "\n"+"Operating System :"+SystemInfo.operatingSystem+"\n "+
     "Processor :" + SystemInfo.processorType+"\n"+
     "Graphic Card:"+SystemInfo.graphicsDeviceName+"\n"+
     "Shader Model:"+SystemInfo.graphicsShaderLevel );
 }
 
 @script RequireComponent (AudioSource)

Sorry it's 189 lines :) My Problem on this script is

  1. On Main Menu, i've pressed Settings, the Main Menu Function did not turn off itself (I mean the main menu function still working, here's for the video http://youtu.be/2MqQOhmns-Y)

  2. how to make when you press the game settings button it appear a game settings, if you press the systems button the game settings will be disapear and appear the systems option

I really need to fix this script. please anyone please help me...

Thank You very Much for the reply and read... :D

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

How do i add an extra menu to my main menu (I'm a Beginner programmer!) 1 Answer

Options Menu doesnt work after scene change 2 Answers

How to eliminate sharp edges on meshes? 1 Answer

Game inherits main menu settings 2 Answers

My Mouse Cursor is locked in certain scenes 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges