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 /
This question was closed Mar 21, 2016 at 08:24 AM by Jason_ioosh for the following reason:

The question is answered, right answer was accepted, I was the one who asked and solved it on my own, but I can't seem to find where to answer my own questions ><

avatar image
0
Question by Jason_ioosh · Mar 23, 2016 at 10:37 AM · unity 5uibutton

UI Button Link breaking after scene load

Hello everyone,

I'm currently facing a problem where my buttons are not working when I load the scene a second time, the first picture shows what happens after the scene is loaded for the second time while the second picture shows the button in my scene at Editor.

alt textalt text

I've trawled through google, and the closest I could find similar to my question is this: http://answers.unity3d.com/questions/913093/ui-buttons-stop-working-after-i-load-another-scene.html

But I've tried the answers provided there and still the problem exists. Does anyone know of a solution to this? I'm using Unity 5.3.1f.

Thanks and kind regards, Jason

1.png (14.1 kB)
2.png (15.8 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 Jason_ioosh · Mar 21, 2016 at 07:56 AM 0
Share

Update: Still no luck left, but what I'm trying to do now is to manually add in the onClick function of the button script! I added a test script to try and check this out, but for some reason, it's still giving me the missing object as in the the first picture aboce.

 [SerializeField]
     private Button $$anonymous$$yButton = null; // assign in the editor
     scene$$anonymous$$anager scene;
 
     // Use this for initialization
     void Start () {
         scene = GameObject.Find ("Game$$anonymous$$anager").GetComponent<scene$$anonymous$$anager>();
 
         if ($$anonymous$$yButton.onClick == null) {
             $$anonymous$$yButton.onClick.AddListener(() =>
                 {
                     scene.GoToScene("Settings");
                     //$$anonymous$$yOtherFunction(); 
                 });
         }
     }

avatar image Jason_ioosh · Mar 21, 2016 at 08:20 AM 1
Share

UPDATE 2: SOLVED!

Okay, I've solved the issue, seems like it was just a silly mistake on my part!

I solved the issue by removing the link and then re-linking the onClick function to the Game$$anonymous$$anager prefab that is saved in my project. I think I previously had this issue due to the fact that I linked it to the Game$$anonymous$$anager object that was in the scene(which got destroyed on load), therefore it was '$$anonymous$$issing'.

avatar image SteveMoreno Jason_ioosh · Dec 02, 2018 at 02:47 PM 0
Share

$$anonymous$$ade the same mistake... Thank you for this!

0 Replies

  • Sort: 

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

How to know if Unity UI button is being held down? 0 Answers

Having a hard time getting my GUI button which is generated at runtime to work. 0 Answers

Change mouse button click in existing code to ui button click.,Change the existing code from mouse click to ui buttons. 1 Answer

Unity - keep created buttons after quit 1 Answer

Moving between UI Buttons Using Keyboard Arrows 0 Answers


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