Search Unity

Unity 5.5 UI Bug - Look rotation viewing vector is zero

Discussion in 'Unity UI (uGUI) & TextMesh Pro' started by sushanta1991, Dec 7, 2016.

  1. sushanta1991

    sushanta1991

    Joined:
    Apr 3, 2011
    Posts:
    285
    This is what i got from console,

    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 /Users/builduser/buildslave/unity/build/Editor/Mono/EditorHandles/Slider2D.cs:279)
    UnityEditorInternal.Slider2D:Do(Int32, Vector3, Vector3, Vector3, Vector3, Vector3, Single, CapFunction, Vector2, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorHandles/Slider2D.cs:114)
    UnityEditor.DockArea:OnGUI()



    Its just a simple debug.log, not even warning. But my image was invisible. I was trying to drag a text field inside an image and than suddenly this log came in my console and my image disappeared, I pressed ctrl+z still nothing happen, than i deleted my image and press ctrl+z again, this time my Image appeared. I don't know what actually happened there :D but i thought i should report this issue.
     
  2. QJaxun

    QJaxun

    Joined:
    Sep 30, 2016
    Posts:
    5
    Ive been getting this alot since upgrading to 5.5. Hitting play when images dissapear seems to fix it, some kind of display bug in the editor.
     
  3. JorgenEngenNapstad

    JorgenEngenNapstad

    Joined:
    Jun 10, 2015
    Posts:
    1
    After upgrading to 5.5 I'm getting this too, for no apparent reason. I tried using both 5.5.0f3 and 5.5.0p2. I can get up several hundred of them (Debug.Logs), and it slows Unity down until it's unusable. Turning the UI elements off or hitting play fixes it. Incredibly annoying bug.
     
  4. ArtyBrest

    ArtyBrest

    Joined:
    Feb 20, 2014
    Posts:
    10
    Unity v5.6.0b2 - annoying bug is still here.
     
  5. forcepusher

    forcepusher

    Joined:
    Jun 25, 2012
    Posts:
    197
    Easy way to avoid it is to assign non-zero sizes to all your parent UI elements. (Including Canvas)
     
    toplayer, noanoa and AdamLiu like this.
  6. AdamLiu

    AdamLiu

    Joined:
    Mar 19, 2014
    Posts:
    50
    Yeah this is a valid workaround. Thanks for it.
     
  7. AdamLiu

    AdamLiu

    Joined:
    Mar 19, 2014
    Posts:
    50
    Getting the same exact bug, using Unity 5.5.0 p1.
     
  8. jmasinteATI

    jmasinteATI

    Joined:
    Jul 14, 2015
    Posts:
    7
    When I disable Aspect Ratio Fitter the bug goes away, but then I can't use the Aspect Ratio Fitter. Aspect Mode is "Fit in Parent." If I select other aspect modes, the bug goes away as well. Not sure what to do.
     
  9. _eternal

    _eternal

    Joined:
    Nov 25, 2014
    Posts:
    111
    Still no bugfix for this? I'm having the same problem as jmasinteATI where I only get the error when Aspect Ratio Fitter is set to Fit in Parent.
     
  10. Pozonu

    Pozonu

    Joined:
    Jul 27, 2014
    Posts:
    5
    Still an issue in 5.6

    I get this error all the time when I move gameobjects around inside a panel on the canvas (not in code). It always causes my panel image to disappear although it's still there and active. I end up having to create a new panel every time which is very annoying.

    I'm surprised Unity has not fixed this yet considering what an obvious bug it is...
     
  11. PocketJoyApps

    PocketJoyApps

    Joined:
    Jun 3, 2015
    Posts:
    5
    I was getting it because an empty UI object containing a Text object had a width and height of 0 (scale was default, [1,1,1]).
    It didn't even have anything to do with a slider object.
    Try disabling UI objects one-by-one until you find the one actually causing the problem.
     
  12. raimis001

    raimis001

    Joined:
    Jan 20, 2015
    Posts:
    3
    In Unity 2017.1.0b3 (beta) bug still here, after bug all canvas is broken
     
  13. Ghosthowl

    Ghosthowl

    Joined:
    Feb 2, 2014
    Posts:
    178
    Yep, still facing this bug in 5.6.1. Incredibly annoying.
     
  14. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,106
    this can be easily reproduced:

    * start a new scene
    * add a canvas
    * create an empty GO in the canvas
    * place the anchor for the empty GO in the bottom right hand corner of the canvas
    * set the bottom right corner of the rect transform of the empty GO to the bottom right of the canvas
    * set the top left corner of the rect transform of the empty GO to create a 'rectangle'
    * add the grid layout group to the empty GO, set it to:
    - start corner: lower right
    - child alignment: lower right
    * add a few buttons as child objects to the empty GO
    * with one of the buttons selected, in the scene window, begin scaling the rect transform of the empty GO (it goes into preview mode)
    * when you release, you get a lovely spam of the following error and the rect transform disappears, but you are not able to change any of it's values in the inspector:

    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:290)
    UnityEditorInternal.Slider2D:Do(Int32, Vector3, Vector3, Vector3, Vector3, Vector3, Single, CapFunction, Vector2, Boolean) (at C:/buildslave/unity/build/Editor/Mono/EditorHandles/Slider2D.cs:124)
    UnityEditor.DockArea:OnGUI()



    * select the empty GO object, and in the Inspector choose to modify the anchor presets using the custom popup and switch it to a different setting, and back again.

    ! the rect transform gets reset...
    OR, you can just "undo" a few times.. but that is really annoying.
     
  15. twda

    twda

    Joined:
    Oct 25, 2012
    Posts:
    111
    I got this error when I accidentally used the same game object for transformation as the caller.
     
  16. rootPL

    rootPL

    Joined:
    Sep 5, 2015
    Posts:
    14
    I got this error when I focus in edit window any UI element during play mode
     
    leni8ec likes this.