• 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
5
Question by Captain Johnny · Mar 02, 2015 at 03:08 AM · uinot workingbuttonsscene change

UI Buttons Stop Working After I Load Another Scene And Then Come Back.

Hi,

so i have a game over scene and i have 2 buttons (which i created using the new UI menu, i did't create them using script), a restart button and an end game button.

When i create the buttons and i add the OnClick function they work fine, but if i load a different scene and then come back to the game over scene they stop working, they don't even change colors when i hover over them or i press them.

Comment
Add comment · Show 9
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 Ron_MB · Mar 17, 2015 at 12:56 PM 0
Share

I am having the same problem, both on Unity 4 and 5.

I set my UI to DontDestroy on load in my initial scene, and then I load the next scene. The UI buttons are there, but they stop working. They no longer highlight when moused over, and they do nothing when clicked.

Enabling the buttons before/after loading has no effect either.

avatar image DiegoSLTS · Mar 17, 2015 at 01:44 PM 2
Share

The UI needs an EventSystem object to react to events, make sure you have one in your new scene.

If you're doing LoadLevelAdditive or marking things to not me destroyed you might be missing the EventSystem.

avatar image Captain Johnny · Mar 17, 2015 at 03:49 PM 0
Share

You are right, i had deleted the Event System. Ty.

avatar image roshan67890 · Oct 12, 2015 at 12:58 PM 0
Share

event system is present but also no reaction!!!

avatar image dotWasim · Aug 02, 2016 at 04:48 PM 0
Share

I have same problem but this solution doesn't work with me.. any help ? I'm stuck here for 6 hours

Show more comments

4 Replies

· Add your reply
  • Sort: 
avatar image
13

Answer by Fdudka · Mar 23, 2016 at 11:38 AM

I might know what is wrong. add at Start() { Time.timeScale = 1; }

your game might have been paused to zero, and I don't know why Unity keeps the timescales... sometimes...

Comment
Add comment · Show 1 · Share
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 R3fr4ct0r · Mar 07, 2020 at 03:50 PM 0
Share

I specifically logged in just to thank you man. Thank you for this I've tried everything but this? I wouldn't have ever even considered it. Thanks for sharing this info.

avatar image
10

Answer by Seven_P · Nov 25, 2015 at 09:21 AM

I had same problem just solved it by setting "Force module Active" @Event System

Comment
Add comment · Show 4 · Share
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 crodriguez · Mar 15, 2016 at 11:04 PM 0
Share

Yup, worked for me. Thanks! :) Still wondering why it's happening though.

avatar image dotWasim · Aug 02, 2016 at 04:48 PM 1
Share

I have same problem but this solution doesn't work with me.. any help ? I'm stuck here for 6 hours

avatar image fregas · Mar 11, 2017 at 01:46 AM 1
Share

I had to do this, but also the event system game object was not in a persistent game object in the hiearchy, so it didn't have DontDestroyOnLoad. I just made it part of another GameObject that had DontDestoryOnLoad AND followed Ironcross's advice for "Force $$anonymous$$odule Active" and all was well again. :)

avatar image levi9687 · Dec 03, 2017 at 04:16 AM 0
Share

legend i hate when simple things set me back a whole days work.

avatar image
2

Answer by bdilloughery_mvla · Apr 29, 2019 at 01:59 PM

Tried all of these and didn't fix it. Finally found my problem:

I'm using the standard 1st person controller asset, and it locks the cursor. Need to unlock the cursor when going back to the main menu.

In the past I have had: 1. UI textbox/image is on top of button so it isn't clickable 2. DontDestroyOnLoad doing wonky things 3. Accidentally deleting the "Event System" GameObject in your scene (maybe mispelled it) that handles things like buttons being clicked.

Cheers

Comment
Add comment · Show 4 · Share
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 pbence1233 · Feb 25, 2020 at 08:40 PM 0
Share

Sorry can you tell me how did you do that beacause I have the same problem, I have the same standard asset 1st person controller and I have no idea how to do that?

avatar image bdilloughery_mvla · Feb 26, 2020 at 04:55 AM 0
Share

I haven't used that standard asset in awhile, but here is a quick answer I found Googling it. I think you can find the the cursor lock state in the Standard Asset script and just change its true/false value. https://answers.unity.com/questions/1179026/standard-assets-first-person-controller-hiding-cur.html

avatar image cmesias · Jun 04, 2020 at 06:45 AM 0
Share

Just wanted to login and say thank you so much, such a simple thing and I didn't realize it, thank you.

avatar image nokkun0319 · Sep 28, 2020 at 10:48 AM 0
Share

I'm making FPS and when I go back to the title screen the button didn't respond. As you commented, it was because the cursor on the FPS Controller was locked.

It was good to be fixed. Thank you!!!

「I'm using the standard 1st person controller asset, and it locks the cursor. Need to unlock the cursor when going back to the main menu.」

avatar image
1

Answer by koirat · Feb 19, 2016 at 02:50 PM

Check if your canvas has got proper camera selected.

Comment
Add comment · Show 1 · Share
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

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

31 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

Related Questions

I can only interact with a portion of my GUI elements.. What am i doing wrong? 1 Answer

How to make UI buttons so my player can move along certain lines 0 Answers

How to disable button animation fade? 1 Answer

Unity 2019 Everything in Canvas goes Invinsible, wont come back. 0 Answers

Help with instantiated buttons? 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges