Search Unity

Translation gizmo and several sprites are "invisible" in 2D editor

Discussion in '2D' started by jgodfrey, Dec 27, 2013.

  1. jgodfrey

    jgodfrey

    Joined:
    Nov 14, 2009
    Posts:
    564
    I have some strange things happening in the Unity 2D editor. First, the translation gizmo is not visible on some (most) of the sprites in Scene view. I just read this related post:

    http://forum.unity3d.com/threads/214887-Translation-widget-locked-hidden-in-2D-orthographic-view

    While similar, that does not seem to be my problem as I don't have the sprite's renderer collapsed (as shown in the following screen shot):

    $UnityMissingTranslateGizmo.png

    The gizmo was visible earlier in the project's development, but has since disappeared. Also, it's just the translation gizmo that's missing - both the rotation and scaling gizmo's appear as expected. If I change the editor to 3D mode, the translation gizmo is visible once again. Maybe I've inadvertently changed something in the editor, but I'm not sure what it could be. A restart of the Unity editor doesn't change anything.

    Next, I have 2 sprites that have decided to not render in the scene view at all. Similar to the above issue, these sprites used to render correctly in scene view, but now I just see their bounding box. Again, I think everything looks OK in the sprite's inspector panel, as shown below:

    $UnityInvisibleSprite.png

    There is nothing else in the scene the ball can be "behind". The gray background shown in the screenshot is simply the editor background. Both of the invisible sprites show up fine in the Game view, but are missing in the scene view.

    One other thing I'll mention in case it's helpful. As of Unity 4.3, I have been forced to run the Editor in OpenGL mode (using -force-opengl) as it crashes on startup otherwise. I'd much prefer to run in DirectX mode (as I always have), but can't get it to work. See this thread for details:

    http://forum.unity3d.com/threads/219048-Just-upgraded-to-4-3-1f1-Editor-crashing-on-startup

    Any assistance with that issue is also appreciated.

    Thanks,

    Jeff
     
  2. unitylover

    unitylover

    Joined:
    Jul 6, 2013
    Posts:
    346
    You might check your Project settings to see that you are in 2D mode under Edit > Project > Editor. The other issues you're having sound like bugs but I couldn't duplicate them for the life of me. Sounds like a use-case bug as you mentioned having to use the editor in OpenGL mode. Hopefully somebody at Unity will chime in.

    *edit* I just noticed my Move tool does not display the gizmo either. I am not sure if this is by design or because we can move sprites using the renderers gizmo.
     
    Last edited: Dec 27, 2013
  3. jgodfrey

    jgodfrey

    Joined:
    Nov 14, 2009
    Posts:
    564
    Thanks for the input and the suggestion unitylover. I just took a look and I am indeed running in 2D mode....
     
  4. jgodfrey

    jgodfrey

    Joined:
    Nov 14, 2009
    Posts:
    564
    Ummm, yeah. Just figured this out. The layer containing the "invisible" sprites was turned off in the Scene view - so it wasn't being rendered. I didn't even know that was possible until a few minutes ago and I don't know how I inadvertently turned it off. Anyway, I just had to turn the layer back on to reveal the missing sprites - though the translation gizmo is still MIA most of the time...

    Jeff
     
  5. dasbin

    dasbin

    Joined:
    Jan 14, 2012
    Posts:
    261
    I haven't once seen the translation gizmo on sprites. I assumed it was a (bad) design decision. They can be moved by dragging anywhere inside the sprite bounds, but of course it's impossible to limit the movement to a single axis that way which is unfortunate.
     
  6. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    I simply hold the Shift key down to easily translate the sprite in the X or Y axis with the mouse...
    6R
     
  7. Prog_Meisters

    Prog_Meisters

    Joined:
    Mar 25, 2013
    Posts:
    8
    I am having the exact same problem with my translation gizmo. It's gone in 2D mode, but returns upon switching the 3D, then gone again when I go back to 2D. I can't translate in the scene view by dragging anymore. If I try to do that, it just creates a selection box. I can still manually edit the transform values, but it's very annoying. It used to be there.
     
  8. jgodfrey

    jgodfrey

    Joined:
    Nov 14, 2009
    Posts:
    564
    I've decided that I must have *never* had a translation gizmo in 2D, though I really thought I had seen one. However, I am still able to move objects in 2D mode. To do that...

    With a sprite selected...

    - Select the "Translate" icon in the editor

    That should give you a bounding box with a small "circle" at the sprite's pivot point

    - Now, click/hold anywhere within the bounding box and drag to move the sprite.

    I have noticed though, that with unusually small sprites, more often than not, I end up *rotating* the sprite instead of moving it. I have to be zoomed in *really* close to move small sprites using the above.

    Does that work for you? Regardless, I think we need a standard translation gizmo in 2D.

    Jeff
     
  9. Prog_Meisters

    Prog_Meisters

    Joined:
    Mar 25, 2013
    Posts:
    8
    The blue circles used to be there, but there are gone now. I don't know if I mistakenly pressed the wrong hotkey and it hid them, but there's no way for me to alter the translate of objects in the 2D sceneview mode.
     
  10. jgodfrey

    jgodfrey

    Joined:
    Nov 14, 2009
    Posts:
    564
    I think you've collapsed the "Sprite Renderer" component on the offending sprite(s). To fix it:

    - Select the sprite in question
    - In the inspector, find the "Sprite Renderer" component
    - Now, click the arrow at the left edge of the "Sprite Renderer" title. It should be pointing "down" to expand the component. If it's pointing to the right, the component is collapsed and you lose the ability to move the sprite.

    Currenty, that's working as designed, but I think the Unity devs are considering making a change as it's confusing.

    Jeff
     
  11. Nichiyoobiko

    Nichiyoobiko

    Joined:
    Dec 26, 2012
    Posts:
    1
    I also think that not having the translation gizmo is a bad thing.
    Interestingly if you have an empty game object as a parent to your "sprite-game-objects" the gizmo will show.

    What I do to move objects along the axis without having to zoom in on them is to click and drag the "X" or "Y" letters of the Position attribute in Inspector view.
     
  12. quarx

    quarx

    Joined:
    Jun 23, 2014
    Posts:
    1
    Sorry for bumping this thread but I have the same problem - a missing translation gizmo in the 2D mode for sprites (it works fine for empty GameObjects, Camera, GameObjects attached to another GameObject etc) - and no solution. It's driving me crazy!

    Here is what I tried:
    - I have made sure the "Sprite Renderer" component is "pointing down" in the inspector
    - I am in the translation mode for sure (accessable with the "W" hotkey)
    - I am in the 2D mode ( Edit > Project > Editor)
    - I have deleted Unity files from ProgramData as well as all registry entries and re-installed Unity
    - I have been working on an empty project without any plugins, just one sprite on the scene and one camera (orthographic)
    - I'm NOT using any special options such as "-force-opengl"
    - Layers in the Scene view are set to show "everything"
    - Gizmo settings in the Scene view are all checked and I tried "3D gizmos" both checked and unchecked.
    - All used to work just fine.
    - I'm on Windows 8.1 and the latest version of Unity 4.5

    Interestingly I can't see "Sprite Renderer" on the list of available Gizmos in the Gizmo settings / Scene view. I have no idea why or how to change it.

    I'd very much appriciate any suggestions.
     
    Last edited: Jun 23, 2014
  13. randrews33

    randrews33

    Joined:
    Nov 4, 2013
    Posts:
    2
    In case anyone is still having this problem: I haven't tested this myself, but piecing together some of the above comments, and from what I've seen in one of the Unity 2D demos, it seems that the gizmo doesn't appear on sprite objects. What you should try is creating a game object that has any sprites as child objects
     
  14. Tortuap

    Tortuap

    Joined:
    Dec 4, 2013
    Posts:
    137
    Solution to get 3D gizmos on your sprites :
    First switch to 3D camera : click the 2D switch button that is at left in the toolbar of the Scene view
    Then switch to orthographic camera : click the square at center of the axis gizmo, that is in the upper right corner of the Scene view.

    You are now using the very same camera than in 2D mode, but in 3D mode, thus having the 3D gizmos for sprites.

    Note : in this 3D mode, drag n dropping images into the Scene view does not automatically creates a Sprite. You have to switch back to 2D mode for that.
     
  15. rcpickett22

    rcpickett22

    Joined:
    Dec 2, 2014
    Posts:
    1
    I had the same problem with 3d gizmos showing but gone in 2d. I realized that at the top left of the editor, under the edit menu there are 5 buttons. Pan, Move, Rotate, Scale, and...freeform? Not sure about last one. Anyhow, the last button was selected, so all I was seeing was the handles. Clicking on the move icon brought back the translate gizmos just fine.

    Simple fix....I felt dumb. Hope it helps!
     
  16. SDougieC

    SDougieC

    Joined:
    Apr 16, 2014
    Posts:
    2
    I figured it out as I was having the same problem. While in 2D mode go to the menu in the very top left of the Unity Interface. There are 5 toggle buttons, Make sure to have the second one selected!