Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
0
Question by roshan1109 · Jun 23, 2016 at 03:29 PM · c#animationunity5

Screens overlap

When I try to navigate from one one screen to another in my Unity3D sample project, the previous screen remains in the background.alt text

problem.jpg (33.9 kB)
Comment
Add comment · Show 3
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
avatar image roshan1109 · Jun 23, 2016 at 03:31 PM 0
Share

$$anonymous$$y Code is :

void OnGUI() { if (Current$$anonymous$$enu == "Login") { LoginGUI(); } else if (Current$$anonymous$$enu == "ResetPassword" && ExitCurrentFunction == false) { ResetPasswordGUI(); } else if (Current$$anonymous$$enu == "NeedSomeHelp") { NeedSomeHelp(); } else if (Current$$anonymous$$enu == "LoginCheck") { LoginCheck(); } }

 void LoginGUI() {

     GUI.Box(new Rect(210, 10, (Screen.width / 4)+90, (Screen.height / 4)+180), "Login");
     //Create 2 buttons on Home Page
     if (GUI.Button(new Rect(310,180,120,25), "Submit"))
     {
         Current$$anonymous$$enu = "LoginCheck";
     }
     if (GUI.Button(new Rect(310, 210, 120, 25), "Reset Password"))
     {
         Current$$anonymous$$enu = "ResetPassword";
     }
     if (GUI.Button(new Rect(310, 240, 120, 25), "Need Some Help?"))
     {
         Current$$anonymous$$enu = "NeedSomeHelp";
     }
     //End

     GUI.Label(new Rect(240, 50, 100, 25), "User Name");
     Email = GUI.TextField(new Rect(240, 80, 250, 25), Email);
     //Create Password Label and TextFields
     GUI.Label(new Rect(240, 110, 100, 25), "Password");
     Password = GUI.PasswordField(new Rect(240, 140, 250, 25), Password,'*');
 }

void ResetPasswordGUI() { ExitCurrentFunction = true; GUI.Box(new Rect(210, 10, (Screen.width / 4) + 90, (Screen.height / 4) + 180), "Forgot Password");

     if (GUI.Button(new Rect(230, 200, 100, 25), "Send $$anonymous$$ail"))
     {
         Current$$anonymous$$enu = "SendPasswordResetEmail";
     }
     if (GUI.Button(new Rect(420, 200, 75, 25), "Back"))
     {
         Current$$anonymous$$enu = "Login";
     }

     GUI.Label(new Rect(230, 110, 100, 25), "Email");
     Email = GUI.TextField(new Rect(300, 110, 210, 25), Email);

     //Add Help $$anonymous$$essage below
     var centeredStyle = GUI.skin.GetStyle("Label");
     centeredStyle.alignment = TextAnchor.UpperLeft;
     GUI.Label(new Rect(230, 50, (Screen.width / 4) + 50, (Screen.height / 4) + 50), "In Order to receive your access code by email, please enter the address you entered during registration process.", centeredStyle);

 }
avatar image Jessespike roshan1109 · Jun 24, 2016 at 08:22 PM 0
Share

Unformatted code is hard to read. From what I can see, there's nothing wrong with the script. $$anonymous$$aybe the script is in the scene twice?

avatar image GerPronouncedGrr · Jun 25, 2016 at 02:48 PM 0
Share

Is this all occurring in one scene, or are you transitioning between scenes? If it's one scene, you probably just need to manually hide or destroy the elements you no longer want to show. You can do this in several ways, from Canvas Groups to Camera Layers to simply disabling the component or destroying the object. If, however, you're transitioning between scenes, any GUI elements should be destroyed automatically, and I can't say for sure why that might not be happening, except that you probably told them not to be, somewhere along the line.

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

203 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Anim object with Relative Position 1 Answer

Help with a door slam trap 0 Answers

what's the best way to change animators on a player, in script? 1 Answer

Hey people i want to know is there a way to play animation for the first time player plays 1 Answer

Unity 2d Animation 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