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 vchevalier · Jun 17, 2018 at 05:20 PM · collision detectionruntime-generation

Problem appeared in Unity 2018.1.5f: activate/deactivate colliders at runtime results in being ignored

Hi everyone,

I discovered an issue with Unity 2018.1.5f that was there before (at least, it wasn't here in Unity 2018.1.1f).

Context:
I have a system to render levels at runtime. Basically, I instantiate/destroy and active/deactivate parts of a level at runtime. My scene has terrain and obstacles using mesh colliders, box colliders, etc. Before Unity 2018.1.5f, that worked perfectly fine.

Issue:
Now, with Unity 2018.1.5f, when I instantiate and activate parts of the level, the character controller 3d sometimes recognizes the colliders sometimes ignores them and ends up falling through the ground.

Tests and observations:
I made a lot of tests and ended up completely deactivating the rendering system. Which means the whole level is always rendered and activated in the scene before the game launches. Issues are gone. The character controller never falls through the ground anymore.
In both cases, it's the same character controller, the same level content. The only difference is the level is already there at launch or the level shows up after the game is launched.

Code:
The code to instantiate and activate isn't weird at all, here is what the code looks like:

 public void RenderInstantiate() {
   if (!Instantiated) {
     GameObject roomPrefab = Instantiate (generationConfig.prefab);
     roomPrefab.transform.SetParent(PrefabHolderGameObject.transform, false);
     Instantiated = true;
   }
 }

This code is called by a co-routine. And I know the code runs because the level does appear. I honestly don't see how this could be simpler... Has anyone else encountered this issue?

Thanks in advance!

Comment
Add comment · Show 2
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 vchevalier · Jun 19, 2018 at 12:33 AM 0
Share

Hey, I made a little test project that shows the issue.
Here is the link: https://1drv.ms/u/s!AuZP0yp$$anonymous$$LfiVhDQm24TkVl8ekqAL
Everything is in the sample scene.
Test with runtime generation: Stop the game (if running), click on the Game$$anonymous$$anager in the scene and check the "Generate At Runtime" option. Press play and walk around with the character: falls through the ground...
Test without runtime generation: Stop the game (if running), click on the Game$$anonymous$$anager in the scene and uncheck the "Generate At Runtime" option. Press play and walk around with the character: everything is okay!
I tested this project with Unity 2018.1.5f and Unity 2018.1.1f. The issue only shows up in Unity 2018.1.5f, so something changed since 2018.1.1f.
Anyone has an idea for a fix?

avatar image vchevalier · Jun 19, 2018 at 02:17 PM 0
Share

Well, I submitted a bug report to Unity and they recognized that is is an issue on their side. Here is the link: https://fogbugz.unity3d.com/default.asp?1050751_it6v6njpvqdrr5mj I hope they fix this soon!

1 Reply

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

Answer by vchevalier · Jun 20, 2018 at 12:22 PM

Unity reported back that they couldn't reproduce the bug in their internal version, so they somehow resolved the issue. Paulius from Unity QA team informed me that the devs are looking for the actual fix and backport it. So I guess the problem will be fixed soon in a new Unity release. Case closed for me. :)

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

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

142 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

Related Questions

Projectile colliding with player at origin,Excluding a specific game object 0 Answers

How to get the position of the border of a collision (MeshCollider) 1 Answer

Enemies spawning on top of each other,Enemies spawn on top of each other 0 Answers

How do you a attach script + event function to another script during runtime in unity? 0 Answers

cube stacking while parented 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