• 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 /
This question was closed May 11, 2015 at 02:01 PM by Bunny83 for the following reason:

Problem is not reproducible or outdated

avatar image
0
Question by suchoparek · May 11, 2015 at 12:17 PM · colliderparent-child

Unity adds unwanted BoxCollider to the parent

Hi, I have a function that adds a BoxCollider to a new GameObject, then it calls SetParent() to make this new GameObject child of another GameObject. Every time that function is called, Unity automatically adds an unwanted BoxCollider to the parent too.

Now, as this function is not called on Update(), it isn't such a big issue, I can destroy the collider by just adding a single line of code, though I'd like to know if it is a regular behaviour or just an annoying bug.

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 Owen-Reynolds · May 11, 2015 at 01:08 PM 2
Share

Are you sure? I don't think this is really happening (unless your code is adding it by mistake.) Did you Pause, select the parent, and see the unwanted BoxCollider as a component in the Inspector? Are you sure it's not just the child collider being shown?

avatar image suchoparek · May 11, 2015 at 01:40 PM 0
Share

You're right Owen, the problem was in a different script, but that behaviour was absolutely realistic, it really seemed Unity was self conscious... :) Your answer persuaded me that further investigation wasn't a waste of time, thank you.

avatar image Bunny83 · May 11, 2015 at 02:01 PM 1
Share

So the question is solved? I'll close it with outdated / not reproducible ^^

0 Replies

  • Sort: 

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Have child ignore parent's tag? 1 Answer

Add toque/force around Y axis using multiple children colliders 0 Answers

Moving Collider without moving the child 1 Answer

Collider/Rigidbody not working as expected 1 Answer

Internal collisions 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