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 Lortimus14 · Oct 14, 2016 at 05:12 PM · editorcolliderboxcolliderlogwarning

How to suppress BoxCollider warning

Hi, I'm getting the warning we've seen reported in other threads:

BoxColliders does not support negative scale or size. The effective box size has been forced positive and is likely to give unexpected collision geometry. If you absolutely need to use negative scaling you can use the convex MeshCollider. Scene hierarchy path "TileMap Render Data/Main/Chunk 2 11/MyPrefab 1"

I've researched this and understand why this happens. However, we are using a 3rd party tool which negates the scale of the parent object (BoxCollider is child), and we have no control over this from our side. We are completely comfortable and know the risks, and simply want to suppress the above warning, as it spams our logs even though everything is working fine. Is there any way to suppress this warning? Thanks!

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
1

Answer by omarmoh-om · Aug 15, 2017 at 09:13 PM

Check my answer on the same subject of matter on

http://answers.unity3d.com/questions/1228083/box-colliders-and-negative-scales.html?childToView=1394197#answer-1394197

Best of luck

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 andzq · Oct 14, 2016 at 10:57 PM

Warnings in Unity usually come with an ID.

For example:

Declaring the variable - float foo - but never using it results in the following warning:

Assets/myScript.cs(8,16): warning CS0168: The variable 'foo' is declared but never used

You can suppress this warning by adding this line of code at the top of your script:

 using UnityEngine;
 using System.Collections;
 
 #pragma warning disable 0168 // <<<< that one

 public class MyScript : MonoBehaviour {
     void Start()
     {
         float foo;
     }
 }

Maybe this helps. Good luck (:

Comment
Add comment · Show 5 · 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 andzq · Oct 14, 2016 at 10:59 PM 0
Share

thought it should be obvious, I got to mention that you need to change the number after disable to the number of your warning

avatar image Lortimus14 · Oct 14, 2016 at 11:05 PM 0
Share

Thanks! I actually went down this path, but couldn't find a warning ID for this one :-/ The entire message is pasted above and I don't see any associated ID. $$anonymous$$aybe at least an ID can be added to this in a future version?

avatar image andzq · Oct 15, 2016 at 03:52 AM 0
Share

That´s unfortunate. Having your console flooded with warnings that you can´t disable is really annoying. $$anonymous$$now that feel :/

avatar image Lortimus14 andzq · Oct 15, 2016 at 03:45 PM 0
Share

Yes, but I'm more concerned about the output log generated from the built game

avatar image Orion · Mar 02, 2017 at 07:52 PM 0
Share

It's actually the C# compiler that has IDs with warnings. All Unity warnings don't have IDs and can't be disabled this way.

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

6 People are following this question.

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

Related Questions

Warning: BoxColliders does not support negative scale or size 4 Answers

Unity's Bounding Box 0 Answers

How do I change the default application used to open logs from the Unity editor? (on Mac) 1 Answer

see colliders in editor 1 Answer

Mesh.CombineMeshes - what happens to colliders? 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