Search Unity

ex2D - the best 2D sprite solution for Unity [RELEASED]

Discussion in 'Assets and Asset Store' started by johnny_karas, Aug 24, 2011.

  1. Lymn

    Lymn

    Joined:
    Jan 3, 2013
    Posts:
    3
    Hi,
    I try to use
    Code (csharp):
    1. exSpriteAnimation.Play  ( string    _name,int   _index )    
    But instead of playing from the index I mention, it starts from an amount of time even if I do like this to be sure to have an int in the function:

    Code (csharp):
    1.     var frameInd:int=2;
    2.     GetComponent(exSpriteAnimation).Play("RunJump_Animation",frameInd);
    Do you have any idea about this issue?

    Thanks
     
  2. DramaDesu

    DramaDesu

    Joined:
    Jan 6, 2013
    Posts:
    14
    Hello!

    How can I split my sprite atlas ( for example: png picture (just png picture) with animations) to ex2D Atlas. Or I should split pic by hands to different files and so after I can use it in ex2d Atlas?

    Thank you!
     

    Attached Files:

    Last edited: Jan 6, 2013
  3. AntFitch

    AntFitch

    Joined:
    Jan 31, 2012
    Posts:
    243
    Got a quick question. Is there a way to stop ex2D from cropping transparency when I put something in an atlas?

    For example I want all of my animation frames to be 64x64.
     
    Last edited: Jan 8, 2013
  4. GrimReio

    GrimReio

    Joined:
    Jan 18, 2011
    Posts:
    32
    Hi,
    It seems that ex2d 1.2.7 SpriteBlendClipping.shader doesn't compile on my android devices (Adreno, Tegra 2/3).
    So clipping doesn't work. But everything is ok in editor mode.

     
  5. GrimReio

    GrimReio

    Joined:
    Jan 18, 2011
    Posts:
    32
    It seems that problem was with the '_in' parameter name:
    v2f vert ( appdata_t _in ) { ... }
    fixed4 frag ( v2f _in ) { ... }
     
  6. FatWednesday

    FatWednesday

    Joined:
    Jul 4, 2012
    Posts:
    50
    EDIT: Seems the cause was for some reason on the Mac the animation objects had lost almost all links to the various atlas files and the auto generated mesh, had to go through each atlas individually on windows and re-build then rebuild all the animations clips again. seems to have fixed the linking issue, and will likely fix the crashing as well, will know in a bit when i can test it.

    Hey folks, got a slight issue that i'm hoping somebody can shed some light on.

    recently changed a project to make use of svn:externals for some re-used assets, which include the atlas textures and database files created by ex2D. the svn link seems to have worked fine, but when we fire up the scene on device (deploying to iOS) it crashes when one of the exSprite objects tries to load.

    at first I had unknowingly changed the location of the database files for the atlas and spriteanimations. but have since changed their location to match that in the ex2D preferences, however the issue persists. From the look of things in xCode its crashing from a EXC_BAD_ACCESS during exSpriteAnimState__ctor_exSpriteAnimClip.

    I'll continue to try and work out what's gone wrong and fix it, but perhaps someone will recognise this as a problem they've had at one point and might offer a suggestion or solution.

    cheers.
     
    Last edited: Jan 8, 2013
  7. CodeFighter

    CodeFighter

    Joined:
    Dec 15, 2012
    Posts:
    63
    Hello. I just bought 1.2.7 indie ver but when I import it in to empty project it crashes with error:
    NullReferenceException: Object reference not set to an instance of an object
    UnityEditor.AssemblyHelper.IsTypeMonoBehaviourOrScriptableObject (Mono.Cecil.AssemblyDefinition assembly, Mono.Cecil.TypeReference type) (at C:/BuildAgent/work/d9c061b1c154f5ae/Editor/Mono/AssemblyHelper.cs:141)
    UnityEditor.AssemblyHelper.ExtractAllClassesThatInheritMonoBehaviourAndScriptableObject (System.String path, System.String[] classNamesArray, System.String[] classNameSpacesArray) (at C:/BuildAgent/work/d9c061b1c154f5ae/Editor/Mono/AssemblyHelper.cs:171)

    and project does not work. Unity 3.5.7. What can I do? Thank you.
     
  8. NateJC

    NateJC

    Joined:
    Apr 10, 2012
    Posts:
    58
    My apologies if someone already shared this info, but is their a tutorial (video or written) on how to use the Layer Manager system? I tried adding the Layer component to multiple objects, and nested them in a parent Game Object that had the Layer Mng on it, but they still don't appear in the Layer Manager window.

    Also, does ex2d work with a perspective camera or only an orthogonal one?

    Any advice would be greatly appreciated. Thanks!
     
    Last edited: Jan 11, 2013
  9. NateJC

    NateJC

    Joined:
    Apr 10, 2012
    Posts:
    58
  10. PsychoG

    PsychoG

    Joined:
    Jan 11, 2013
    Posts:
    42
    What is the best way to approach doing collision while using ex2d? I want to make pixel perfect collision (or as perfect as I can) with a sprite. My reason for this is because I want to use a plug-in for lighting but the light created detects collision so a regular box collider does not look how I want it to.

    By the way, THANK YOU, ex2d so far has the the best solution for my 2D game. I'm glad I chose this over everything else.
     
  11. Yongsoon Kim

    Yongsoon Kim

    Joined:
    Oct 10, 2012
    Posts:
    3
    Hi Wu. I have a simple question about animation.
    I ran an animation in preview with different sample rate but it shows always same result in Unity. I don't know how different if it is changed. Is it critical for mobile device? how much rate is recommended?
     
    Last edited: Jan 16, 2013
  12. Tricko

    Tricko

    Joined:
    Jul 11, 2012
    Posts:
    14
    Hi,

    Whats the story on ex2D and Unity 3.5.x now then? Will it ever be fixed to work or is it 4.0 only from now on from v1.2.7?

    After accidentally updating to it as I didn't see the 4.0 required note on the full asset store page I'm now resorting to pulling files from other projects if I want to use it in a new project :-(
     
  13. alexandros356

    alexandros356

    Joined:
    Dec 3, 2012
    Posts:
    105
    Hi, This is great... Do it works with unity 3.5?
     
  14. unormal

    unormal

    Joined:
    Jan 10, 2012
    Posts:
    65
    What's the news on ex2D 2.0?
     
  15. CapnCromulent

    CapnCromulent

    Joined:
    Sep 7, 2010
    Posts:
    45
    Has anyone tried to do palette swapped sprites using ex2D (or even another sprite library) to achieve an effect like:


    The built in color-tinting isn't what I want, since it applies the tint to everything. Likewise, the color replacement shader from the Unity wiki would require each sprite to use its own shader instance, which would defeat the purpose of using a sprite sheet.
     
  16. AntLewis

    AntLewis

    Joined:
    Feb 2, 2010
    Posts:
    254
    Hey Wu, so it seems that ex2D only now works with Unity 4.0 - is there a location where we can grab the last working version of ex2d? I'm using Unity 3.5.6f4?

    cheers
     
  17. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    If avoiding shader, there's 2 ways:

    1. draw 2 quads, 1 for player, 1 for different coloured parts (white default, but tinted vert cols)

    2. process your sprite sheet when game runs.

    Currently there's no 2D systems that support this at the atlasing stage if that's what you're asking for.
     
  18. nuclei

    nuclei

    Joined:
    Apr 12, 2012
    Posts:
    1
    Hi guys, we're facing the exact same problem right now; build fails with "Out of memory" and it is because there're tons of original textures. If we remove them before build, build will succeed but we face other memory related issues in runtime on Androids.

    Is there any thing we can do except moving to TexturePacker? If you found any hint please share it with us!
     
  19. harlock1975

    harlock1975

    Joined:
    Feb 27, 2012
    Posts:
    46
    I hate quoting myself, but Wu is not answering anymore...
    Did any of you fellow ex2d users have a similar issue?
    Or any idea of how to sync two sprites in any other way?
    Thanks!

     
  20. coldsteel

    coldsteel

    Joined:
    Jul 2, 2012
    Posts:
    4
    Hello, I'm here with a new question.

    I'd like to make an editor that takes existing sprite animations, and displays/generates/edits 2D colliders tied to them on a per-frame basis.

    Since I need to have specific information determined/defined per collider, I know this would either require extending the ex2D editor or making my own.

    But I have no experience with either area when it comes to Unity, so does anyone have some suggestions which way I should go(extending ex2D or making custom solution that uses ex2D SpriteAnimations), or where would be some good resources to get started?

    I have built a rudimentary XML schema that the editor would presumably write back in the format of, and then my game would populate collider data containers using those XML files at load.

    If I understand this correctly, you'd need two sets of sprites for this(one default, one with false color map)? I'm not very familiar with the terminology(slowly learning), so if you can elaborate more I'd appreciate it.
     
  21. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,422
    Will there be any future support for Unity 3.5.X ? Or do we have to upgrade to Unity 4 in order to work properly with future updates of ex2D ?
     
  22. GrandMasterHsu

    GrandMasterHsu

    Joined:
    Jul 5, 2012
    Posts:
    50
    Hi Wu, I've recently updated my Unity from 3.2 to 4 pro and when i did i've had a ton of problems with ex2d.
    most of the animations became blurry but still fully functions. so after i remade the atlases they're no longer blurry. but the one thing i cant fix is the fact that one of the animations just crashes Unity if it plays. if i disable the animation everything will run.
    is there anything i can do to fix this?
     
  23. Wild-Factor

    Wild-Factor

    Joined:
    Oct 11, 2010
    Posts:
    607
    I only know shader (but I've never use them in Unity)

    You can probably create one shader with a parameter to swap plalette color.
    All swaping color data will be in a texture.

    Texture[PalettSwapingIndex][sourcecolor] = destinationColor.

    You just need to change PalettSwapingIndex for each of your sprite, and create a texture containing every palette you need.
     
  24. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    863
    How to add font to Atlas? I didnt find info anywhere.

    I added font texture to atlas and checked the checkbox In Atlas but it still uses the source texture.
     
    Last edited: Jan 29, 2013
  25. AntLewis

    AntLewis

    Joined:
    Feb 2, 2010
    Posts:
    254
    - Did you ever receive a response Tricko?
     
  26. Tricko

    Tricko

    Joined:
    Jul 11, 2012
    Posts:
    14
    Not yet no...
     
  27. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    863
    No response for two weeks?
     
  28. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,422
    You mean a month.
     
  29. moopi

    moopi

    Joined:
    Apr 24, 2012
    Posts:
    39
    Well, is this the end of this nice asset? I'm having less than a month for my game release date and still having some severe issues with ex2d solution. I hope Wu is going to give at least some information about his/her or his/her company plans regarding ex2d.

    At the moment, for me, the most disturbing feature is when you update your sprite atlas (update sprite in photoshop, push apply and build in the atlas editor). Big part of the textures in my other scenes (having around of 70 unity scenes) are messed up, meaning that I have to manually select each (70) scenes (with save etc.) and select edit-> ex2D->Rebuild Scene Sprites. The other main issue is related on tiling of several (bilineary) tiled textures, the existing steam between those is giving you gray hairs when you try to utilize same (or similar) textures to create your background texture (by rotating and flipping them).

    It seems like I have put my bucks to the wrong horse when selecting the best 2D solution for Unity, which at worst case, means that I have to switch to the other solution (which in practice means a conversion of all 2D game data from the ex2D to the 2D toolkit format...). If possible, I wan't to stay with 3.5 and ex2D, at least until I get my current title ready.

    - Moopi
     
  30. ouerfelli

    ouerfelli

    Joined:
    Jan 17, 2013
    Posts:
    7
    I tried to import IGUI on unity 4.0 but a have this eror !!!

    ArgumentException: set_left can only be called from the main thread.
    Constructors and field initializers will be executed from the loading thread when loading a scene.
    Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.
    UnityEngine.RectOffset..ctor (Int32 left, Int32 right, Int32 top, Int32 bottom)
    exGUIBorder..ctor ()

    plzzzzzzzzzz help
     
  31. dark_tonic

    dark_tonic

    Joined:
    Mar 23, 2011
    Posts:
    138
    We're having a crashing issue on Android of a similar nature (ex2D v1.2.5 running in Unity 3.5.7f6). If we remove the exSpriteAnimation, we no longer crash.

    I hate to think I have to recreate all my sprite anims in NGUI, that's a huge job.
     
  32. Rhodan

    Rhodan

    Joined:
    Feb 14, 2013
    Posts:
    7
    A stab in the dark since the developer doesn't seem to be paying attention any more but maybe someone can help me out;

    We're using an alpha channel mask along with a shader that converts the white in our alpha channel to a specific colour (which varies based on the team that unit is on). This works fine in the Unity editor, however when we add our textures to the exAtlasEditor or put them into a exSpriteAnimation, it only shows the alpha channel, not the actual texture.

    Heres what I mean, the texture on the left is the .tga file in photoshop and the right is what exAtlasEditor shows (which again, is the alpha channel);



    And this is what it looks like just on the prefab with the shader applied (sorry for crappy quality, all I have on me atm);



    So it works fine in engine, it's just for whatever reason EX elements are only reading the alpha channel.

    Anyone out there able to help?
     
    Last edited: Feb 15, 2013
  33. nilton_felicio

    nilton_felicio

    Joined:
    May 17, 2012
    Posts:
    66
    ex2D need Unity3d 4.
    I have free Unity3d 3.5 and Android Basics. I will not update for a while.
    A new version of ex2D could not be available for Unity3d 3xx and 4xx?
    I would love to buy ex2D.
    2D Toolkit is available for both versions of Unity.
     
  34. nia1701

    nia1701

    Joined:
    Jun 8, 2012
    Posts:
    74
    Hey guys I was recently able to get through on email to Wu and his partner and they had this to say regarding ex2d:
    We are still making the new ex2D 2.0 version. It's just we are all extremely busy with life at the moment :(

    Supports will continue and we will release update as soon as it's up.

    Thanks a lot!
     
  35. soulburner

    soulburner

    Joined:
    Mar 25, 2012
    Posts:
    169
    Just wanted to share with community our game "Fable Kingdom HD" made with ex2D.





    The game is free and available for android / iOS:
    www.fablekingdom.com
     
  36. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    Absolutely wonderful !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    6R
     
  37. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    O. M. G.
    THAT LOOKS AMAZING!! :D
    Visually, I think its stunning. Really nice and cute style.
    So, don't mind me asking but how long did it take you to do it? And what other extensions are you guys using? And how many people in your team???
     
  38. soulburner

    soulburner

    Joined:
    Mar 25, 2012
    Posts:
    169
    No other extensions were used (except different plugins for billing, facebook, etc.)

    Excuse me, but I have no permission for replying non-technical questions ;)
     
  39. reissgrant

    reissgrant

    Joined:
    Aug 20, 2009
    Posts:
    726
    @soulburner

    That looks great!! Really looks polished.
     
  40. steinbitglis

    steinbitglis

    Joined:
    Sep 22, 2011
    Posts:
    254
    It seems I''m the only one using ex2D 1.2.7 and Unity 3 at the moment, but I'm afraid that I can't help a lot, because I'm using ex2d with source code, and I had to fix some of the issues myself.

    I guess your best bet is to wait for version 2.0, unless you can get hold of ex2d pro.
     
  41. figbash

    figbash

    Joined:
    May 13, 2008
    Posts:
    60
    Mesh.colors is out of bounds. The supplied array needs to be the same size as the Mesh.vertices array.
    UnityEngine.Mesh:set_colors(Color[])
    exSpriteFont:UpdateMesh(Mesh)
    exSpriteFont:Commit()
    exSpriteMng:OnPreRender()


    Failed setting triangles. Some indices are referencing out of bounds vertices.
    UnityEngine.Mesh:set_triangles(Int32[])
    exSpriteFont:UpdateMesh(Mesh)
    exSpriteFont:Commit()
    exSpriteMng:OnPreRender()


    Mesh.uv is out of bounds. The supplied array needs to be the same size as the Mesh.vertices array.
    UnityEngine.Mesh:set_uv(Vector2[])
    exSpriteFont:UpdateMesh(Mesh)
    exSpriteFont:Commit()
    exSpriteMng:OnPreRender()


    Mesh.vertices is too large. A mesh may not have more than 65000 vertices.
    UnityEngine.Mesh:set_vertices(Vector3[])
    exSpriteFont:UpdateMesh(Mesh)
    exSpriteFont:Commit()
    exSpriteMng:OnPreRender()


    Hi, we're having the above problem, there is no real stack trace to show which object is actually causing it, has anyone had this issue and solved it? I'm also wondering if anybody has changed from the dll to the source code, do the components all get unlinked?
     
  42. GrandMasterHsu

    GrandMasterHsu

    Joined:
    Jul 5, 2012
    Posts:
    50
    Mesh.vertices is too small. The supplied vertex array has less vertices than are referenced by the triangles array.
    UnityEngine.Mesh:set_vertices(Vector3[])
    exSprite:UpdateMesh(Mesh)
    exSprite:Commit()
    exSpriteMng:OnPreRender()

    im getting the same error, the game works still but the error messages are spamming my console
     
  43. decoy98

    decoy98

    Joined:
    Aug 30, 2011
    Posts:
    36
    Hello Wu Jie! I am getting this error.

    Script attached to 'DebugHelper' in scene '' is missing or no valid script is attached.

    Script attached to 'FPS' in scene '' is missing or no valid script is attached.

    And other warnings.

    I have Unity Pro 4.0.1
    And ex2d 1.2.7

    Could you please help me?

    Thank you.
     
  44. decoy98

    decoy98

    Joined:
    Aug 30, 2011
    Posts:
    36
    I am also getting Assets/Standard Assets/Scripts/Utility Scripts/MeshCombineUtility.cs(177,30): warning CS0618: `UnityEngine.Mesh.SetTriangleStrip(int[], int)' is obsolete: `Use SetTriangles instead. Internally this function will convert the triangle strip to a list of triangles anyway.'

    and other related errors. Any suggestions?
     
  45. AntFitch

    AntFitch

    Joined:
    Jan 31, 2012
    Posts:
    243
    Does anyone know the difference between the SpriteBlendClipping and SpriteBlind shaders?

    I want to make my monsters flash pure white when they are hit. I've learned that the only way to do this easily without causing my draw calls to go up is to use a vertex shader. SpriteBlendClipping appears to be a vertex shader, but I don't know how to use it. Is there a tutorial for this shader?

    Thanks!
     
  46. struesdell

    struesdell

    Joined:
    Mar 13, 2013
    Posts:
    1
    Hi everybody!

    I picked up ex2D and I've been really enjoying how easy it is to get my sprites and sprite animations into my project now.
    In particular though, I was excited about ex2d's bitmap font support and atlasing.

    I've noticed though that I can't seem to edit the .text property of my SpriteFont objects from the inspector.
    No troubles setting them at runtime but it's distracting to have my UX covered in "Hello World!" everywhere and it is making it more difficult to do layout iteration.

    Is this a known issue and is there a solution? I couldn't find any mention of it in a quick search.

    I'm using 1.2.7 with Unity 4.0.1f2
    (though the readme for ex2D says 1.2.0)

    Thanks!

    - Shawn
     
  47. Jawad

    Jawad

    Joined:
    Nov 6, 2012
    Posts:
    140
    The link of evaluation version is not working..:/ please fix it so we have a look on its working before purchase..
     
  48. nia1701

    nia1701

    Joined:
    Jun 8, 2012
    Posts:
    74
    Hey everyone I'd like to announce my game i'm making with ex2d. Its a 2d retro adventure game. ex2d has been great for the text and atlases! I had to make my own text wrapping script which is available early on in this forum (along with soulburners superior script).
    www.bikgame.com

    $Bik_CampSceneShot1.jpg

    $Bik_LaterousEngineRoom.jpg

     
  49. xEnOnn

    xEnOnn

    Joined:
    Aug 31, 2012
    Posts:
    6
    Does the mesh collision helper in ex2d generate a mesh collider by following the alpha channel of the sprite? So the collision will take place at the edges of the sprite as opposed to box collision?
     
  50. coenonympha

    coenonympha

    Joined:
    Apr 3, 2013
    Posts:
    3
    Hello,

    I'm using ex2D (in its trial version) in a Unity 3.5.7 Test project. I'm just trying to display 3 sprite animations (201 frames per animation) that are using the same atlas, and I have 3 problems :
    • The sprite textures look awful in both the scene and the game view. But when I deploy the app on an iPad for example : the textures are in their original quality, that's curious. Is it because I'm in trial version ?
    • Even if the 3 animations use the same atlas, one of them has a white edge around my sprite (when I run it on iPad), I can't figure out why.
    • When I deploy my app on an Android Phone (Galaxy Nexus), this doesn't work at all : I just see a black rectangle replacing my sprite.

    I really want to buy ex2D but when I see these problems, I don't know what to do :D.

    Thank you for your time.