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
4
Question by QJaxun · Dec 14, 2016 at 03:21 PM · editor

Look rotation viewing vector is zero spam in editor

After upgrading my project to 5.5 I started getting this error spamming the console. It only seem to happen when I have a gui element selected and am in scale mode in the editor. When selecting the object i get the message a few times then if my mouse cursor is over the scene view the console is filled with the same message, slowing the editor down and making it nearly unusable.

I recreated a small part of my gui and it is not happening with the remade parts.

Here is the full message:

"Look rotation viewing vector is zero UnityEngine.Quaternion:LookRotation(Vector3, Vector3) UnityEditorInternal.Slider2D:CalcDeltaAlongDirections(Int32, Vector3, Vector3, Vector3, Vector3, Vector3, Single, CapFunction, Vector2, Boolean) (at C:/buildslave/unity/build/Editor/Mono/EditorHandles/Slider2D.cs:279) UnityEditorInternal.Slider2D:Do(Int32, Vector3, Vector3, Vector3, Vector3, Vector3, Single, CapFunction, Vector2, Boolean) (at C:/buildslave/unity/build/Editor/Mono/EditorHandles/Slider2D.cs:114) UnityEditor.DockArea:OnGUI()"

Comment
Add comment · Show 4
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 Glurth · Dec 14, 2016 at 04:06 PM 1
Share

is that line referenced by the error, your code? C:/buildslave/unity/build/Editor/$$anonymous$$ono/EditorHandles/Slider2D.cs:279 If so, please post that code section to.

The LookRoatation is choking on the input it has been provided because in order to specify a direction with a vector, one must use a vector with a non-zero magnitude: in other words- ANY vector EXCEPT (0,0,0) will do. Since 0,0,0, does NOT indicate any particular direction to "look at": the error function throws the error message.

avatar image QJaxun · Dec 14, 2016 at 08:32 PM 0
Share

This is happening in editor not play mode. The message isnt even an error, just a debug.log from unity code.

avatar image YujenDev · Jan 15, 2017 at 09:57 AM 0
Share

Same issue here.

It seems like editing image in 2D mode, and the image is under the normal Transform (not RectTransform) hierarchy.

I move image under RectTransform hierarchy, and it works fine.

avatar image janivarattensi · Feb 02, 2017 at 11:19 AM 0
Share

https://issuetracker.unity3d.com/issues/look-rotation-viewing-vector-is-zero-is-shown-up-when-the-gameobject-has-an-ui-component-and-2d-view-is-turned-on

2 Replies

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

Answer by cfloutier · Dec 15, 2016 at 10:53 AM

It wasn't in play mode for me too, just in editor.

And the trouble occurred because the size of My canvas was Zero......

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 QJaxun · Dec 15, 2016 at 05:33 PM 0
Share

Thanks, it wasnt my canvas that was size zero but a panel that had all the guis children attatched to it that was the problem.

avatar image CG522 · Jan 11, 2017 at 09:25 AM 0
Share

Thanks. This was so annoying for me! In my case, a Rect Transform was locked to 0 height and width because of a Horizontal Layout Group... I just made the $$anonymous$$ height and width of my Layout Element 0.1. $$anonymous$$aybe that can help someone out.

avatar image Zythus · Feb 10, 2017 at 07:31 AM 1
Share

Thanks guys, just got that error too. Turned out child gameobject of my UI (customization panel) had height 0, turned it to 0.01 - error is gone!

avatar image fishbrainz · Mar 30, 2017 at 02:38 PM 0
Share

Thx for the tip! It also happens in Play mode, for instantiated prefab objects. Check your prefabs if they have width and height set to 0 by setting Anchor preset to middle-center. The width and height values are hidden if the Anchor preset is set to stretch-stretch

avatar image
0

Answer by IgorAherne · Jun 09, 2017 at 03:57 AM

For me, the issue happening when I would select a LayoutElement

Turned-out that the parent Vertical Layout Group had anchors collapsed and the height of the blue rectangle (press T to view rec transform tool) was 0

So I added the content size fitter to that layout group (and set it to follow the preffered height), which fixed the issue

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

13 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

Related Questions

What is the proper way to link a loot table and an enemy ? 2 Answers

Editor rectanglecap or button with fill color? 0 Answers

Pink screen in editor and some games, why? 2 Answers

React on button down in Editor GUI 2 Answers

runInBackground in Edit Mode 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