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 stephen_george98 · Jun 16, 2016 at 12:24 AM · c#collisionloadleveldisablegameover

Game Over Scene Efficient?

Is it more efficient to have a whole scene dedicated to the "Game Over" whenever two colliders hit each other? Or is it better to have a transparent UI Image become visible after they collide and everything else is disabled?

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
Best Answer

Answer by TBruce · Jun 16, 2016 at 01:36 AM

Personally I prefer not to use a separate scene. I create a prefab of my GameOver scene and instantiate it when needed.

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 stephen_george98 · Jun 16, 2016 at 10:41 PM 0
Share

That is a smart idea! So I would actually make the "Game Over" in another scene, but I would not use Application.LoadLevel to load the scene. Ins$$anonymous$$d I would just Instantiate and Destroy when needed? Or Enable and Disable? Am I correct? :) @$$anonymous$$avina

avatar image TBruce stephen_george98 · Jun 16, 2016 at 11:01 PM 0
Share

You would create your "Game Over" panel which would be attached to a canvas. Create a script file to handle everything including any/all button functions (e.g. CancelButton(), LoadNextLevelButton()...).

I attach the script to the canvas. I set up the button events. Then save the canvas as a prefab (Note: If this is the only canvas in the scene then you will want to make the EventSystem GameObject a child of the "Game Over" canvas).

When needed I instantiate the prefab.

Another thing I do some of the times (usually for customization) is I bring the prefab into each scene and I set it as inactive and the activate it when needed.

I also use both methods for end of level screens.

avatar image stephen_george98 TBruce · Jun 16, 2016 at 11:06 PM 0
Share

Okay! So actually what you said is very similar to the "Game Over" in the Survival Shooter tutorial provided by the Unity Team. In this method, my "GameOver" would be in the same scene as the "$$anonymous$$ain Gameplay" scene, but you would not see anything regarding the "Game Over" and "Retry", "Go Back To $$anonymous$$enu", etc. buttons until you die?

Show more comments
avatar image
0

Answer by JatsArts · Jun 16, 2016 at 12:41 PM

I would keep it in another scene. But pre-load it beforehand so I can show it quickly. Having to toggle the visiblity every time you edit is too much hassle and too expensive to maintain.

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 stephen_george98 · Jun 16, 2016 at 10:38 PM 0
Share

Okay cool. Any tutorials you know of that can guide me towards this "pre-loading" term you used? @JatsArts

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

176 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

Related Questions

Pickup number of objects and have another object appear? 2 Answers

how to use onCollision with Application.LoadLevel 1 Answer

Unity3d OnCollisionEnter not firing 1 Answer

Advance Colision Detection 1 Answer

How can i restart a script on collision ? 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