Search Unity

  1. How can our website serve you better? Give us your feedback. Take our survey and let us know.
    Dismiss Notice

Unity Streamlined 2D menus and improved built-in 2D assets in 2020.2

Discussion in '2D' started by rustum, Sep 2, 2020.

  1. rustum

    rustum

    Unity Technologies

    Joined:
    Feb 14, 2015
    Posts:
    143
    Streamlined 2D Menus
    Consolidated 2D Menus.png
    In 2020.2 we’ve streamlined our 2D menu items so they are now displayed in neat top-level menus for object and asset creation. We’ve also added menus for some of the features added more recently.

    Important Note:
    These new menus originate from the 2D Sprite, Tilemap and other 2D packages. If these packages are not installed, the menu items will not be displayed.

    As part of this change, the deprecated Sprite Packer Window menu item has been removed. If you still require the window, you will need to add your own menu item with the following sample code:

    Code (CSharp):
    1. using UnityEditor;
    2. using UnityEditor;
    3. public class SpritePackerMenu
    4. {
    5.     [MenuItem("Window/2D/Sprite Packer")]
    6.     static void LaunchSpritePackerWindow()
    7.     {
    8.         UnityEditor.U2D.Sprites.Obsolete.ObsoleteSupport.ShowSpritePacker();
    9.     }
    10. }
    11.  

    Improved Built-in 2D Assets
    Default 2D Assets.png
    We have also upgraded our built-in 2D assets to 256x256 white textures with light grey outlines. These should be better for white boxing and prototyping levels as well as gameplay. These replace the previous 2D white 4x4 texture.

    We want your feedback!
    Let us know how the new 2D menus and assets work for you. Tell us what works and what doesn’t and what we might have missed.
     
    Last edited: Sep 14, 2020
  2. DoctorShinobi

    DoctorShinobi

    Joined:
    Oct 5, 2012
    Posts:
    169
    Hey, just wondering. Why must the 2D packages be installed in order for the menus to appear this way? The new menus display seems a lot more intuitive and it would make sense for it to be that way in the base installation.
     
  3. dannyalgorithmic

    dannyalgorithmic

    Joined:
    Jul 22, 2018
    Posts:
    84
    We can actually create UI mock-ups quickly with these ... unlike the 4x4 versions lol both have there place though, as those versions are appropriately tiny for build size.
     
  4. xiangtingsu

    xiangtingsu

    Unity Technologies

    Joined:
    Sep 22, 2020
    Posts:
    83
    Hey DoctorShinobi!, thank you for pointing out that they are more intuitive! :)

    The new menus in the base installation from 2020.2 should appear this way if we create a new 2D project. Does yours look like this?

    Figure 1.png

    Something worth noting is that if we install additional preview packages such as 2D Tilemap Extras from the Package Manager, we will also see additional menu items such as Tiles and Brushes from this newly installed package i.e. The menus get expanded with the newly installed package items.

    Figure 2.png

    They are not available by default because they are technically still preview packages. In other words, they are still in the early stage of development and not yet ready for production. These are great for testing purposes though and for us to gather feedback for better improvements. Hope this clarifies.
     
    DoctorShinobi likes this.
  5. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    353
    Since the menu items are mainly targeting for 2D usage, we would like to not clutter the menus for users who might not be using them.
     
  6. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    818
    Problem
    Isometric game here. These 2D changes are not very useful for this kind of project. From my vantage point, this adds one extra menu to navigate before I still need to replace the sprite with a decent prototype sprite.

    Suggestion
    What might be universally useful - for top-down / platformers / isometrics - would be allow us to change the default sprite for the Editor under Edit > Preferences > 2D. For me, that would mean an isometric box of the correct size/proportions for my game. This might also have an additional advantage where secondary textures are concerned: if I have the choice of sprite, then it will fit into the scene a bit better (e.g. NormalMap) before the final sprite is resolved.

    Specifics
    If set, "Custom Sprite" would show up at the top of the list. If not (or if assigned asset deleted), it wouldn't show up in the list.
     
  7. xiangtingsu

    xiangtingsu

    Unity Technologies

    Joined:
    Sep 22, 2020
    Posts:
    83
    Hey Lo-renzo! You made some good points there. :) I did a quick mock-up based on your suggestions. Just to check, is this what you meant? (See attached image.)

    I'm also curious about the point regarding the added advantage when secondary textures and NormalMap are used. Could you elaborate a little on that? Thank you!

    Custom Sprite.png
     
    Last edited: Oct 23, 2020
    dannyalgorithmic and Lo-renzo like this.
  8. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    818
    Yes, that's exactly what I was thinking.
    If I supply a custom sprite, then the SpriteRenderer would be populated with that sprite, so I'm assuming that the custom sprite would pull the Secondary Texture info as typical sprites do. That would mean that if there's a NormalMap / Emission / whatever associated with that Sprite then the SpriteRenderer would correctly display it.

    As a result, if someone is mocking out a scene where lights affect NormalMaps then that custom sprite would be way better to prototype with because it will respond to the scene's lighting as intended. For my isometric box sprite, that means that I can put a few boxes down, adjust the SpriteRenderer's color, and it'll fit into the scene until the time where it's appropriate to replace it with the final, non-prototype sprite.
     
    xiangtingsu likes this.
  9. xiangtingsu

    xiangtingsu

    Unity Technologies

    Joined:
    Sep 22, 2020
    Posts:
    83
    Yes, that does make sense.

    This definitely sounds like a much smoother/ pleasant workflow and seems like an interesting proposal to the team too.

    I'm curious as to what are your current workarounds to these limitations of using preset diamond sprites of standard size/proportions? It would be lovely if you have a quick screenshot too.
     
  10. xiangtingsu

    xiangtingsu

    Unity Technologies

    Joined:
    Sep 22, 2020
    Posts:
    83
    On a related note, we would love to hear where do you prefer your Sprite Shaders (Sprite Lit/ Unlit Graphs) to be parked at so that it's most intuitive for you or best speed up your shader creation process.

    Would it be:

    Option 1: Within the Shader Menu together with the other Shader Graphs shaders
    Option 2: Relocated into the 2D Menu

    Thank you!

    Sprite Shaders.png
     
  11. Ofx360

    Ofx360

    Joined:
    Apr 30, 2013
    Posts:
    138
    I think it makes more sense for it to be Option1. If the rest of Unity was reorganizing their categories, i’d probably go for Option2, but since i’d always look for shaders in the shader section with the way everything is laid out currently, it should be there.
     
    JoNax97 and xiangtingsu like this.
  12. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    818
    The diamond sprite is the wrong isometric projection so it's entirely useless. If it were the correct projection, it would only be useful for marking floor spaces b/c it has no volume (i.e. not an isometric box).

    The workaround is to copy/paste a prefab. That's not terrible.

    Now that I'm thinking about it more, here's an alternative suggestion to take into consideration. Prefab Wheel. The goal here would be maximize usefulness to prototyping, since that sounds like it's the rationale for the new square/capsule/diamond/etc sprites.
    prefab wheel - Copy.png
    Above is pictured weapon wheel UI found in many FPS games. Instead of weapons, however, the user supplies prefabs to the wheel. 1+ prefabs = maximum flexibility. The "Quick Prototype" shortcut (Ctrl+Shift+D for example) opens the wheel. Once a prefab is clicked, it's placed under the mouse's position at the time of triggering the shortcut, and the new instance is selected in the inspector for quick adjustment. The workflow: user points mouse where they want the new prototype to appear, uses shortcut, selects which prefab from wheel, and ta da it's there. This basically allows the user to have several prefabs on hand for rapid deployment into the scene: there's no need to sift through the Project folders.

    By having custom prefabs for prototyping, it's more flexible for whatever game type and may be useful further into development beyond just boxing out a level. So, I would solve my isometric problems by having two prefabs: isometric box and isometric floor. Just simple gameobjects with SpriteRenderers. But because user can supply full prefab, it's more flexible than either Custom Sprite (earlier suggestion) or the current solution (square/capsule/diamond/etc sprites). Like TilePalette, the Prefab Wheel itself is an asset, allowing for switching between different Prefab Wheels for different scenes / contexts.

    Option 1 is better.
     
    Last edited: Oct 23, 2020
    xiangtingsu likes this.
  13. xiangtingsu

    xiangtingsu

    Unity Technologies

    Joined:
    Sep 22, 2020
    Posts:
    83
    Hi Ofx360! That makes sense. Thanks for sharing your thoughts! :)
     
  14. xiangtingsu

    xiangtingsu

    Unity Technologies

    Joined:
    Sep 22, 2020
    Posts:
    83
    Yes, I see what you mean now.

    Oh! This definitely seems like an interesting train of thought! I really like this idea of having a customisable wheel/ radial menu that houses multiple prefabs. Well, this seems like a good robust solution that extends the functionalities beyond that one Custom Sprite suggestion.

    I also like the idea where we can update the Prefab Wheel with different sets of prefabs for different scenes.

    Thank you Lo-renzo! Let me bounce this off with the Editor team. :)

    Thank you and I believe it's for the same reason as Ofx360?
     
  15. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    818
    I prefer Option 1 because I hate 3-deep menus for any menu I use regularly. If it had like 8 items in it then it would be acceptable because it de-clutters the 2-deep level, but here that's not the case. Also my thought process is usually, "I want a shader... let me find the kind" rather than "I want to do some kind of 2D thing."
     
    dannyalgorithmic likes this.
  16. xiangtingsu

    xiangtingsu

    Unity Technologies

    Joined:
    Sep 22, 2020
    Posts:
    83
    I see, and that makes a lot of sense!

    So I'm just curious and I'm gonna sneak in another Menu Polling here. This time for the Lights Menu (in the Hierarchy Menu). :D

    Can I presume that your preferred choice to place the 2D Lights (for both of you) that seems most intuitive or best speed up your lighting process would be Option 1 too?

    Option 1: Within the Lights Menu together with the other non-2D lights.
    Option 2: Relocated into the 2D Menu.

    2D Lights.png

    I would also be curious to hear otherwise from anybody too.
     
  17. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    818
    Yes, Option 1 for the same reasons.
     
    xiangtingsu likes this.
  18. Ofx360

    Ofx360

    Joined:
    Apr 30, 2013
    Posts:
    138
    Yup, Option 1 would be what i would intuitively expect and want. And also yeah, i think it would be a lot faster to access the lights in Option 1 than Option 2
     
    xiangtingsu likes this.
  19. xiangtingsu

    xiangtingsu

    Unity Technologies

    Joined:
    Sep 22, 2020
    Posts:
    83
    Thank you Lo-renzo and Ofx360! Appreciate all of your feedback. They really help. :)
     
  20. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    5,493
    I keep opening 2D to look for them there, before I realize that I'm in the wrong place and have to go to lights, so I'd like to have them there.

    Ideally, we would be able to just remove all of the 3D stuff from the menu altogether when working in a 2D game. So no 3D objects, no 3D lights, etc. In that case I'd want to have the lights in their own category (ie as now, but without the 2D-> foldout)


    Ideally we'd be able to fully customize the create-> menu, but toggles for "show 2D objects" and "show 3D objects" would go a long way.
     
    xiangtingsu and JoNax97 like this.
  21. xiangtingsu

    xiangtingsu

    Unity Technologies

    Joined:
    Sep 22, 2020
    Posts:
    83
    Heya Baste! :) That's understandable too. I would imagine quite a few of us would naturally look into the 2D menu for 2D GameObjects.

    Yeah, I see what you mean! I'm also curious as to what you think if we could remove all the 3D stuff from the Editor window and display only 2D related options and tools? How would that impact your workflows now?

    Sounds like a good idea too! Let me feedback that to the Editor team if they haven't yet considered that.
     
  22. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    818
  23. xiangtingsu

    xiangtingsu

    Unity Technologies

    Joined:
    Sep 22, 2020
    Posts:
    83
    Heya Lo-renzo! Yes! Scene/ Contextual Overlays containers could just be our extension to our menu to house those custom prefabs for different contexts.
     
  24. SilverFoot78

    SilverFoot78

    Joined:
    Feb 8, 2021
    Posts:
    1
    This thread is super helpful, I spent 2 hours clicking through all the old posts about sprites that supersede this. Unity really needs to archive pre 2018. It's painful looking up any of this info.
     
    dannyalgorithmic likes this.
  25. uwsublime

    uwsublime

    Joined:
    Apr 14, 2020
    Posts:
    3
    I agree. Also, the 2020.2 documentation here: https://docs.unity3d.com/2020.2/Documentation/Manual/SpriteCreator.html still shows the old menu setup, which caused me to spend a few hours searching before I was directed to this thread.
     
unityunity