Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

2d project from texture to sprites

Discussion in 'Editor & General Support' started by fredstales, Nov 12, 2013.

  1. fredstales

    fredstales

    Joined:
    Jun 4, 2013
    Posts:
    36
    Hi,

    I have already done a lot of work in our current project and everything is just listed as textures in the project. I have no atlases or such in it at the moment. As I understand it with the new 2d support in Unity 3d, you are able to set the import settings to Sprite instead of texture now.

    When I do this, don't I need Mesh Filter (I use a quad as it is now) and a Mesh renderer anymore? Do I just change the images from texture to sprite and drop it on to the object and remove the Mesh Filter and Mesh renderer and all will be good?

    How do I use Sprite "Multiple"? Is that how you create an Atlas? How do I do that and how do I change my current project to work well with changing it?

    As it is now we have the alpha channel in a separate file and combine the two files in a custom shader in order to support ETC. Is this still needed when doing sprites?
     
    Last edited: Nov 12, 2013
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Sprites use a SpriteRenderer component, rather than MeshRenderer and MeshFilter. You create an atlas by setting a packing tag for the sprites you want to be part of an atlas (different tags make different atlases) and click Pack in the Sprite Packer window. Note that sprites in the Resources folder can't be part of an atlas, so if you're in the Sprite Packer window and the Pack button is greyed out, move your sprites out of Resources.

    --Eric
     
  3. fredstales

    fredstales

    Joined:
    Jun 4, 2013
    Posts:
    36
    What is the Sprite Packer? Do you mean the Sprite Editor?
     
  4. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
  5. CoalCzar

    CoalCzar

    Joined:
    Nov 25, 2012
    Posts:
    22
    What does it mean that my Sprite Packer is greyed out and says "Developer Preview"?
     
  6. AndyLL

    AndyLL

    Joined:
    Aug 25, 2013
    Posts:
    75
    Look like that function is Pro only.

    However if you pack your sprites yourself into one texture ( in photoshop ) the sprite editor will 'slice' them into individual sprites.

    Sprite Editor should really be called sprite Atlas editor
     
  7. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Packing is automatic anyway, unless you have it disabled in project settings/editor.

    --Eric
     
  8. qwiboo

    qwiboo

    Joined:
    Nov 20, 2013
    Posts:
    9
    Any idea why the sprites in the Resources folder can't be part of texture atlas?