• 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 Y2Z · Jan 19, 2017 at 10:01 AM · c#unity 52dgui

Unity jump from one canvas scene to another scene with canvas

I want to jump from one canvas scene to another scene with canvas in unity but i keep getting this warning

Multiple EventSystems in scene... this is not supported UnityEngine.EventSystems.EventSystem:OnEnable()

how do i solve this ??

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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by gcoope · Jan 19, 2017 at 10:25 AM

Delete the EventSystem object in your second scene. As the error suggests you're only supposed to have one EventSystem active at a time

Comment
Add comment · 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
0

Answer by ScaniX · Jan 19, 2017 at 01:16 PM

You should normally be fine with one EventSystem in each scene, but it will fail if:

  • The GameObject with the EventSystem is DontDestroyOnLoad

  • You are loading the second scene additive (SceneManager.LoadScene("Scene", LoadSceneMode.Additive);)

Either change the above or remove the EventSystem from the scene that gets loaded.

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 ScaniX · Jan 19, 2017 at 04:40 PM 0
Share

$$anonymous$$mh... I saw an email with a comment, but cannot see it here or in the moderation queue, so...

DontDestroyOnLoad means that you call this method in any script on the root GameObject of the hierarchy where the EventSystem is a part of. This causes the EventSystem to stay alive even when loading a new scene nonadditive, meaning the current scene gets replaced by the new one.

Loading a scene additive means that you add all the objects of the new scene to the current one, so if both have an EventSystem, then you will end up having two of them.

If you need to load it additive AND must keep the event system in the second scene, then you should apply a singleton pattern to it. Please just look it up, there are plenty of examples here.

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

9 People are following this question.

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

Related Questions

Storing playerprefs as string in inputfield.text 1 Answer

I'm working with the corgi-engine/inventory engine and need help with a script. 1 Answer

Trouble with controlling the direction of projectiles with C# code 1 Answer

Can anyone tell me how to fix this problem???? 1 Answer

Creating dynamically moving buttons/GUI objects. 1 Answer

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