Search Unity

Is there no way to create sprite atlas with an editor script and add sprites to said atlas?

Discussion in '2D' started by JustAKgiDev, Jul 20, 2020.

Thread Status:
Not open for further replies.
  1. JustAKgiDev

    JustAKgiDev

    Joined:
    Jul 6, 2013
    Posts:
    13
    Basically what the thread name says. Does this really need to be done manually?
     
  2. raarc

    raarc

    Joined:
    Jun 15, 2020
    Posts:
    535
    you must be doing something wrong, it takes 3 clicks to make a sprite atlas
     
  3. JustAKgiDev

    JustAKgiDev

    Joined:
    Jul 6, 2013
    Posts:
    13
    I need over 1000 atlases for > 100k sprites. Nice condescending tone though. You're welcome to do it all manually for me if you'd like.
     
    robochase likes this.
  4. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    1,513
    I'm not aware of such a process. SpriteAtlas would be much better if they opened it up so that they could be created at both editor-time and runtime via script. Also if you have 100k sprites unless they are all very small or you load carefully that sounds like it could be a problem. I don't know your situation but it might be wise to look into whether you could use shaders to reduce your texture requirements? For example if there are a bunch of color variants perhaps a shader could be used to produce those variants rather than separate textures.
     
  5. raarc

    raarc

    Joined:
    Jun 15, 2020
    Posts:
    535
    like i said you are unaware of the basic features of sprite atlas, lucky for you there is something called pagination which already does that automatically
     
  6. JustAKgiDev

    JustAKgiDev

    Joined:
    Jul 6, 2013
    Posts:
    13
    Does not solve my problem, but thankfully I was able to find a solution on my own. Go step off, you're not impressing anyone. Put on ignore btw.
     
  7. raarc

    raarc

    Joined:
    Jun 15, 2020
    Posts:
    535
    sensitive guy, hit a sore spot eh? fair enough
     
  8. JustAKgiDev

    JustAKgiDev

    Joined:
    Jul 6, 2013
    Posts:
    13
    Nah, I just think it's sad seeing people with unwarranted egos (But it was funny watching it blow up in your face) Gotta make sure you know your place little man. Good day ;)
     
  9. raarc

    raarc

    Joined:
    Jun 15, 2020
    Posts:
    535
    didn't you have me on ignore xd? its fine, you will learn about these simple things in time, no need to throw a fit just because you don't know something. stay salty my friend
     
  10. robochase

    robochase

    Joined:
    Mar 1, 2014
    Posts:
    244
    vitriol aside, do you remember how you solved this?
     
  11. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,742
    Necroposting aside, here is how to...

    How to report your problem productively in the Unity3D forums:

    http://plbm.com/?p=220

    This is the bare minimum of information to report:

    - what you want
    - what you tried
    - what you expected to happen
    - what actually happened, log output, variable values, and especially any errors you see
    - links to actual Unity3D documentation you used to cross-check your work (CRITICAL!!!)

    It would be useful if you said "I looked at this Editor classes related to Sprite Atlases and tried these things but I am getting this error."

    The purpose of YOU providing links is to make our job easier, while simultaneously showing us that you actually put effort into the process. If you haven't put effort into finding the documentation, why should we bother putting effort into replying?



    If you post a code snippet, ALWAYS USE CODE TAGS:

    How to use code tags: https://forum.unity.com/threads/using-code-tags-properly.143875/

    - Do not TALK about code without posting it.
    - Do NOT post unformatted code.
    - Do NOT retype code. Use copy/paste properly using code tags.
    - Do NOT post screenshots of code.
    - Do NOT post photographs of code.
    - Do NOT attach entire scripts to your post.
    - ONLY post the relevant code, and then refer to it in your discussion.



    Please don't necro-post. If you have a new question, make a new post. It's FREE!!
     
Thread Status:
Not open for further replies.