Search Unity

Can't apply "Pivot Unit Mode" change in the Sprite Editor

Discussion in '2D' started by tessiof, Sep 12, 2019.

  1. tessiof

    tessiof

    Joined:
    Dec 6, 2017
    Posts:
    25
    I'm porting a LOVE 2D game from the CS50 Games course to Unity 2018.4.
    I found this documentation about making the pixel art look nicer in Unity, but I can't follow it.
    In the Sprite Editor, when I set Pivot Unit Mode to Pixels from Normalized, the Apply button
    stay grayed out and I can't click it.
    This issue says this is "by design", but how can this be if it contradicts the documentation?
     
    Hommet_ and Christof_Stanits like this.
  2. ChuanXin

    ChuanXin

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    1,068
    "Under the 'Sprite' settings, select Custom from the Pivot drop-down menu. Then select Pixels from the Pivot Unit Mode drop-down menu. This mode allows you to input pivot positions in pixels."

    I guess what this means is that you can set the "Pivot Unit Mode" from "Normalized" to "Pixel", and this will change the Unit Type of "Custom Pivot" value to pixel units instead of from 0..1 units. You will still need to update the "Custom Pivot" value for any changes to be applied as changing the Unit Type does not actually change anything (the 0..1 unit value is stored under the hood).
     
  3. tessiof

    tessiof

    Joined:
    Dec 6, 2017
    Posts:
    25
    So, the value is always normalized. The "pixel" option is only for letting Unity calculate a value in the range 0..1 for you based on the pixel you want to place the pivot point on.
    Thanks, I understand now!
     
    TEMO-TakahiroYamada likes this.
  4. rubendariohh

    rubendariohh

    Joined:
    Oct 14, 2017
    Posts:
    32
    Hi. No matter if I change the Pivot to Custom, then the Unit Pivot Mode to Pixels and then adjust the X and Y values as desired, when applyng the changes and going back to the Sprite Editor all the Sprites are set in Pivot Custom, but the Unit Pivot Mode are set as Normalized not pixels.
     
  5. ChuanXin

    ChuanXin

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    1,068
    The Unit Pivot Mode is a helper mode that modifies the way you set the pivot values in the Sprite Editor. Unfortunately, the mode is not saved and persisted in the Project Settings, so you will need to toggle this each time you need to change the pivot values. Internally, the pivot values are saved as normalized values regardless of what mode is set.

    Do you prefer to use the Pixel values only for this when editing?
     
  6. nemo10

    nemo10

    Joined:
    Jul 25, 2017
    Posts:
    6
    I think the issue is that this page:
    https://blogs.unity3d.com/2019/03/1...up-your-unity-project-for-retro-8-bits-games/

    ...explains in the following way:

    "Finally, when preparing your sprite or sprite sheet, make sure you set the pivot unit mode to ‘Pixels’ instead of ‘Normalized’.

    This is so the sprite’s pivot point will be based upon pixels rather than a smooth range from 0 to 1 across each axis of the image. If the sprite were to not pivot from a pixel exactly, we would lose pixel-perfectness. Pivots can be set for sprites in the Sprite Editor, which can be opened from the Inspector when you have a sprite asset selected."

    This implies that pivot mode is something that always needs to be set for sprite sheets, rather than what it appears it is intended to mean (which is that this setting should be toggled when editing the numbers).

    Unfortunately, because of where the setting is located (inside the box that shows info about the pivot for a specific sprite), it is implied that the setting is part of the sprite settings. This is very confusing.

    A more intuitive option would be to move that to the top of the sprite editor menu bar and make it a multi-option toolbar-style toggle.
     
    Hommet_ and Dave-Carlile like this.