Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Automate Sprite Editor: Custom Outline, through Script?

Discussion in '2D' started by Greganator1, Feb 12, 2020.

  1. Greganator1

    Greganator1

    Joined:
    Aug 6, 2019
    Posts:
    9
    Hi there, I have been working On a mobile game for a while now, and it has alot of sprite assets in it, and I have been looking for various ways to reduce the size of the packed sprite atlas's, And noticed that the custom outline feature of the sprite editor and sprite atlas Tight packing, would allow these sprites to be packed closer together. How ever non of the sprites in this project have any custom Outlines and it would take far to long to add outlines to all of them, so my question is, Is it at all possible to Automate? And if so would anyone have any ideas where to start?
     
    mspink likes this.
  2. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    1,503
    CustomOutline has a Generate button. This is an imperfect tool, but it can help. For some artwork, it may create overly complex shapes. I'm not aware of a way to automate the pressing of that button from script, but you might not want that anyway because you need to quality-check its output most of the time in my experience.
     
  3. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    What we need is "generate for all button" to initially kick it off and then manually tweak as we need.
     
  4. theforgot3n1

    theforgot3n1

    Joined:
    Sep 26, 2018
    Posts:
    205
    I've also stumbled upon this just now and am a big fan of this! We really should have access to this button through script.
     
  5. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,321
    It's pretty clear you want to discuss the custom outline stuff but also, please try to kurb the cross-posting and necroing of older threads. You are best to stick to your own new thread to start a discussion where possible rather than any post that refers to outlines.

    Thanks.