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 /
avatar image
1
Question by warpmanih · Dec 27, 2016 at 04:29 PM · collidersceneload

No collision detection after reloading the scene

So when the player dies in my game i want to load the current level to start over but what happens is the scene loads and non of the collides work and the player keeps falling through the plane

so when my player dies i call death() witch adds one to the death count and loads the current scene again.

 public static void death()
 {
     Death++;
     i = SceneManager.GetActiveScene().buildIndex;
     SceneManager.LoadScene(i);
 }

the other version looks like this

 public static void death()
 {
     Death++;
     i = SceneManager.GetActiveScene().buildIndex;
     PlayerPrefs.SetString("lastlevel", SceneManager.GetActiveScene().name);
     SceneManager.LoadScene(3);
 }

and then when that scene loads

 void Start () {
     le = PlayerPrefs.GetString("lastlevel");
     
 }
 
 void Update () {
     s.value += 20;
     s.value += 20;
     s.value += 20;
     s.value += 15;
     s.value += 25;
     System.Threading.Thread.Sleep(500);
     SceneManager.LoadScene(le);
 }


the weirdest thing is it always works the original start up but when i go to reload the scene it dosn't work.

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 Hellium · Dec 27, 2016 at 04:30 PM 1
Share

Please, provide the code responsible for reloading the scene, and the components related to the collision detection (colliders & rigidbodies)

avatar image warpmanih · Dec 27, 2016 at 04:35 PM 0
Share

i have just put some of the code there i have also tried adding a loading scene in between so it loads the loading scene and then the level again but i have the same results.

avatar image PraveenAV · Apr 22, 2017 at 11:28 AM 0
Share

Did you find any solution to this problem? I too have the same issue with my board game. There is a game board with static non-convex mesh collier. And pawns have dynamic colliers. When the game scene loads first and second time, pawns move on the game board with out any issue. When the game scene is reloaded the third time, pawns just fall through the game board!

Note: I am Instantiating Pawns in Awake function.

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by warpmanih · Apr 24, 2017 at 02:51 PM

I found an answer to my problem. So what i did was I selected the game-objects that were not colliding and added them to the player layer because the player was not colliding with the floor of my game. this fixed the problem. all credit for this answer goes to Daniel he helped me find this solution at a programing event. he also said, "that there was probably something wrong with my code" - but we could not find any thing so this is the solution he came up with.

alt text


player-layer.png (38.1 kB)
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
-1

Answer by runner409 · Jan 27, 2017 at 10:11 AM

I am having the exact same issue. I even tried recreating the scene from scratch, but to the same effect.
The only thing that I have found that works....is to recreate the entire project.
I know, it isn't a solution, and it's incredibly frustrating, but I've been looking for two days and this is the only mention I have even seen of someone having this issue.

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 warpmanih · Jan 27, 2017 at 01:03 PM -1
Share

yea i have tried recreating the whole scene too but i have the same result. the weird thing is that non of my other unity projects do this.

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

7 People are following this question.

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

Related Questions

Tree colliders not working?!? 1 Answer

Loading Scene on a series of events 2 Answers

Load scene on button press 4 Answers

obb apk scene load fail 1 Answer

My life counter is not updating 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