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. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,644
    Thanks, there is anyway a chance that the problem appears only on windows 7
     
  2. nantas

    nantas

    Joined:
    Feb 11, 2010
    Posts:
    124
    Hi sebas,

    I've tested latest ex2D with windows 7 and it compiles fine in MonoDevelop. Also the dll files of ex2D is not read-only on my machine.
    Maybe there's something wrong during the installation process of Unity or ex2D.

    Could you share more details?
     
  3. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Hi CapnCromulent,

    Yes, the new version will not affect pixel-perfect scale by sprite.scale. Instead it calculate the result saved in sprite.ppfScale. But what you mentioned they don't automatically changes is not what I expect. So I will do more test and find out what happen behind it.
     
  4. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Hi Will,

    I'm not the author of EZGUI so I can't tell you how to do that. But if you purchase directly from our own Web Store, you can't switch to Unity Asset Store currently. Cause the Unity Asset Store didn't provide cut-down option for saler. But you are free to switch from Unity Asset Store to our web store.

    We recommend people buying our product from Unity Asset Store, it is convenience for update. The reason we open our own Web Store is some customers ask for that and we think the Pro version is better to sale by ourself.
     
  5. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    I think people have answer the 1st one. Also compiling and running good in my PC.
    Let me answer the 2nd question.

    You need to inherit and implement both exScreenPosition and exScreenPositionEditor. One in the Runtime the other one in the Editor. And you need to take care of the OnInspectorGUI in your new exScreenPositionEditor. The code would like this:

    Code (csharp):
    1.  
    2. [CustomEditor(typeof(MyScreenPosition))]
    3. public class MyScreenPositionEditor : exScreenPositionEditor {
    4.     override public void OnInspectorGUI () {
    5.  
    6.         base.OnInspectorGUI();
    7.              
    8.         // Your codes here....
    9.     }
    10. }
    11.  
     
  6. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,644
    it's two of us in our office to have the same problem (we are the only coders atm). In practice, for some unknown reasons, the ex2D.Runtime.dll has the full control permission flagged only for the machine admins, while the for the users it is read only. For some reasons monodevelop obviously tries to access in write mode (why I do not know) and then it fails because the access is denied.
     
  7. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Hi sebas77,

    Can you show me the version you are using? The latest the daily fix or the one downloaded from Unity Asset Store/Our Web Store. Just check the Window -> ex2D -> About. There have the version number.

    In the mean time, would you mind trying other Editor such as Visual Studio Express or Vim for editing code, and see if anything wrong happens.

    Thanks in advance.
     
  8. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,644
    1.2.2 (111121) rc4
     
  9. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,644
    works in visual studio!
     
  10. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Hi sebas77,

    Sorry we've try to reproduce it but never met the problem. Would you mind to try the latest build in both 3.4 and 3.5 of Unity. We can send you the version through e-mail. Our latest daily build version is (120108). Please PM me your E-mail address if you wish.
     
  11. jdviz

    jdviz

    Joined:
    Nov 3, 2008
    Posts:
    35
    Ok, so I bought your product. I've created a Sprite Font. Can you give me a example of javascript code that will enable me to change the text by script please?
     
  12. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Hi JD,

    Just do:

    Code (csharp):
    1.  
    2. exSpriteFont font = GetComponent<exSpriteFont>();
    3. font.text = "your_text";
    4.  
     
  13. CapnCromulent

    CapnCromulent

    Joined:
    Sep 7, 2010
    Posts:
    45
    Hi JWu,

    I believe there's a bug in the pixel perfect calculations -- in PixelPerfectCamera:prerender, the camera applies pixel perfect calculations to all objects returned by GameObject.Find without checking whether the sprite render camera is the same as the pixel perfect camera.

    I emailed you a sample project with two cameras of different sizes. I probably shouldn't have two pixel perfect cameras, but the ppf parameter's not exposed, so the only way I can get a good initial size of sprites is to toggle the pixelperfect component (which ends up adding the ppf camera component automatically).
     
  14. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Hi CapnCromulent,

    Yes you are right, I should check the camera first, I'll fix that. Thanks for your report!
     
  15. michaelkamms

    michaelkamms

    Joined:
    Nov 21, 2011
    Posts:
    7

    Hmmm... is there a fix or workaround for this?

    Look like the same problem still exists....
     
  16. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Hi michaelkamms,

    The problem has been fixed in the latest daily build, have you get it? The daily build number is 120108. If you didn't get this through the newsletter, please PM me your E-Mail address, I'll send you one.
     
  17. helioxfilm

    helioxfilm

    Joined:
    Apr 23, 2008
    Posts:
    259
    Hi jwu,

    I I bought ex2d via PayPal. How do I receive the latest build?

    Best,
    Gyula
     
  18. greay

    greay

    Joined:
    Mar 23, 2011
    Posts:
    88
    Has anybody else run into issues w/looping animations in 3.5 not playing?

    I installed the latest daily this morning, and most of my issues have been cleared up, except for one big one:none of the animations are working now. None of my looping animations play at all, and the others are all wonky – the timing is off. Everything plays fine in the animation preview.

    I'm new to ex2D (my first experience was using the old version w/the beta a couple days ago) so I'm not sure how much is me doing things wrong or just my project being messed up due to the incompatibilities.
     
  19. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Hi helioxfilrm,

    You probably miss the latest daily build ( sent in 2012.01.08). So if you still need it, please ask me through the E-Mail directly or PM me through the forum.

    Regards,
    Wu
     
  20. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Hi greay,

    I think the issue may be caused by data corrupt during the upgrade. Can you create a new animation and test it again. See if it works well.
     
  21. greay

    greay

    Joined:
    Mar 23, 2011
    Posts:
    88
    Unity drives me crazy sometime...

    I've tried deleting the animations sprite atlases and recreating them all, to no avail. But if I create a brand new project do the same thing, I'm able to get the animation to work. I have no idea what's up with my project or how to fix it.
     
  22. greay

    greay

    Joined:
    Mar 23, 2011
    Posts:
    88
    ok I'm clearly doing *something* wrong. What's the proper way to use the 3.5-compatible daily build? importing that in a new project seems busted. Do I need to start w/the asset store version first? Trying that doesn't appear to update all the files – just add a couple image assets. As far as I can tell.
     
    Last edited: Jan 17, 2012
  23. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Hi greay,

    It seems people reports there have problem with sprite animation in ex2D Unity 3.5 compatible version. And I'm checking the problem. Looks like the build for 3.5 is a flash support version with some animation Hacking. I'll released a non-flash support version for 3.5 in recently daily fix newsletter.
     
  24. am0

    am0

    Joined:
    Dec 19, 2011
    Posts:
    6
    Hello everyone,

    We just start to use ex2D in your project. it's a great tool, thanks to Exdev to share this !
    We have 2 little -basic-questions:
    - Should the background image be in atlas or not (no exsprite animation on it) ?
    - If not, should it be used with Power of two dimensions (use the "power of 2" option in Texture importer)?



    Best Regards,
     
  25. nantas

    nantas

    Joined:
    Feb 11, 2010
    Posts:
    124
    Hi am0,

    For background image, we usually put them into separate atlas to take advantage of PVR compression. Since the background is usually static and without transparency, it's normally ok to compress it.

    In this case, you don't need to worry about original texture's dimension as long as they are within 1024 or 2048 pixels. Then you create a new atlas just for this texture. And it will turn out to be a 1024x1024 atlas texture that can be compressed with PVR format perfectly.
     
  26. Gooms9

    Gooms9

    Joined:
    Dec 17, 2011
    Posts:
    31
    Hello, I am wondering if it's possible to move the ex2D folder and .ex2D_AtlasDB and .ex2D_SpriteAnimationDB out of the root of my directory. I'm kind of anal when it comes to my project structure. I like to put any downloaded plugins into a ThirdParty folder to keep them out of the way. I tried moving the ex2D folder into my ThirdParty directory, and when I open up the atlas editor, it starts complaining that it can't find the checker texture among other things.

    Thanks
     
  27. am0

    am0

    Joined:
    Dec 19, 2011
    Posts:
    6

    Hi Nantas,
    Thank you for your fast reply !
    if the Background dimensions are about 2560x1848, should i cut it in two parts and two atlas, or use a big (4096x2048) atlas ?
     
  28. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Hi Gooms9,

    For current version no. For later version of v1.2, I will consider provide a settings panel for people who wish to set this in their own way. For v1.3, we still discuss if use DB files.
     
  29. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Hi am0,

    If your background doesn't contains too much transparent area, you can put it in one texture.
     
  30. Thomas-Pasieka

    Thomas-Pasieka

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    Hey there jwu,

    I am experiencing extreme issues using Unity beta and your ex2D extension. When do you think ex2D will be ready for 3.5? I am getting errors and odd behavior all over the place to the point that it's completely useless to me right now.
     
  31. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Hi Thomas Pasieka,

    We've support Unity 3.5 beta with ex2D in our daily build. If you subscribe the Newsletter, you will receive the mail including it. If you missed the latest daily build, send an E-Mail or PM me plz.
     
  32. am0

    am0

    Joined:
    Dec 19, 2011
    Posts:
    6
    Thanks Jwu !
    It's a good news ;]

    Definitely, we are happy to choise Ex2D tool, it's a great powerful tool and the ExDev support given to the community is amazing !

    Best Regards
     
  33. nantas

    nantas

    Joined:
    Feb 11, 2010
    Posts:
    124
    Hi Thomas,

    I've sent you the latest ex2D newsletter to the email address you used for subscribing to ex2D mailing list.
    It includes the latest ex2D build for Unity3.5 (120118).

    Please check if it fixes your issue.

    Thanks!
     
  34. Thomas-Pasieka

    Thomas-Pasieka

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    Hey Nantas,

    Thank you for sending. I tried the latest build just now but I am still having a lot of issues with it. I reported one bug just a little while ago on your bug page. This however is just one of the bugs/problems I have.
     
  35. Thomas-Pasieka

    Thomas-Pasieka

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    I just reported another one. I am really having issues all over the place but not enough time to report all right now. Will see what else I can report tomorrow. I would really love to use your tool but currently it's not really working at all on my end.
     
  36. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Hi Thomas,

    Thanks for your reports first. Are you using the ex2D with other plugin when you met these bugs? If yes, would you mind to list the plugin so that I can reproduce them in similar environment. Cause right now we didn't met your problem in our machine.
     
  37. Thomas-Pasieka

    Thomas-Pasieka

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    We are not using any other plugins/extensions with ex2D at the moment and the project itself is very fresh. There are just a few sprites in there that's it. I completely removed everything that had to do with ex2D and re-installed the extension/plugin which seemed to have helped in this case. I can now preview the animations and I can also preview atlas creation. I am still getting some errors and odd behavior here and there which I will try to file later.
     
  38. WillBellJr

    WillBellJr

    Joined:
    Apr 10, 2009
    Posts:
    394
    Just catching back up on this thread - any news / timeframe on custom collider shapes?

    I've been (painstakingly) creating mesh shapes to match my sprites to get past square collision shapes but it would be nice if we could draw collider shapes or some automagic thingy that works off of sprite transparency etc.

    -Will
     
  39. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Not yet. We are testing v1.2.3 and will release recently. This version only including some bug fixes. We will discuss if add some small new feature in v1.2.4 first or doing it after v1.3.0.
     
  40. fgielow

    fgielow

    Joined:
    Jan 3, 2012
    Posts:
    122
    I am experiencing a huge produced file due to some assets.

    Here is the thing. I have plenty of .png files, which are by default not compressed on importing to unity3d.
    But that is alright, should be, at least, because I am generating an atlas with ex2d and the atlas with all the individual resources is set to be compressed, instead.

    The thing is that both my atlases and the original files, used to compose that atlas, are being exported to the iOS build! That is wrong, isn't it? I need only the full atlas, not the atlas and all individual resources. Hence, more than 70% of the application is composed of redundant textures...




    Let me illustrate, here is a small piece of the resulting log:

    The fact is that the FIRST file, which comprises only 2mbs is an atlas that has all the other images, each sizing 918kb.
    They are pretty dumb images, as you may imagine, as all of them together after compressed in an atlas took only 2mbs of space. And I know that is right, I checked the big atlas image and everything is there and in good quality..


    So, in the end, how do I set it that only my atlas is exported? all the original files are unnecessary.
    I was caught by surprise when I discovered that my project on iOS had 240mb+, when it has only 30mb when compiled for a web browser.

    Any idea of what my problem is, and how to correct it?


    Thanks very much!

    Fernando.
     
  41. WillBellJr

    WillBellJr

    Joined:
    Apr 10, 2009
    Posts:
    394
    Okay thanks for the roadmap on your priorities - I stopped using v3.5 - too many issues at the moment for me with the addons I'm using, not ready for prime time IMO...

    I really like ex2D and I purchased it specifically because of the quality of support I see you providing for this package - Kudos from me on that, I appreciate how helpful you are to everyone here - a standard I look for with any Asset Store purchase I make!

    While learning ex2D, the collision shapes weren't an issue for me. I didn't really think about them until I saw 2D Toolkit mention they let you draw out the collision shapes (somehow), but now that I'm really comfortable with the workflow of ex2D, and have become more advanced in what I try to do with it, custom colliders are now paramount for me - sprites by their very nature are non-square and therefore need non-square colliders for them to look right when interacting with other on screen objects...

    Hopefully this will be a priority after all the v3.5 dust settles.

    Thanks for a great product and support!

    -Will

    PS - Maybe my workflow for (painstakingly) creating flat mesh based colliders is harder that what It needs to be - how do you deal with non-square, sprite shaped colliders?
     
  42. Eyeofgod

    Eyeofgod

    Joined:
    Jun 25, 2010
    Posts:
    126
    Hi!

    I was trying to add sprites through code to a SoftClipObject at run time (not editor). I can do it with ease making the sprites child of the SoftClipObject and calling UpdateClipList(). But this tree structure doesn't work for my current project. I know that I can update the list and the undo the parent relationship but this is not elegant.

    I was trying to add the exPlane list manually using exSoftClip.plane and then calling UpdateClipList() but it doesn't work. Here is the code:

    Code (csharp):
    1. List<exPlane> spriteList = new List<exPlane>();
    2. foreach (GameObject tempGameObject in listElements){
    3.         spriteList.Add(tempGameObject.GetComponent<exPlane>());
    4. }
    5. clipBorder.planes = spriteList;
    6. clipBorder.UpdateClipList();
    7.  
    8.  
    This compiles and runs perfectly, but there is 0 sprites on the list (my guess is UpdateList() overwrites everything)

    Many thanks
     
  43. fgielow

    fgielow

    Joined:
    Jan 3, 2012
    Posts:
    122
    How do I update ex2d if I downloaded it from the ex2d own website, instead of unity3d asset store?

    In the email I received I have:

    But If I try to access that link, I get 404'd.


    Hence, how do I proceed on updating ex2d?

    By the way. The version I bought did not include source codes.
    Is there any way to update to the version that includes?


    Thanks again.
     
    Last edited: Jan 21, 2012
  44. Froobzi

    Froobzi

    Joined:
    Dec 27, 2011
    Posts:
    6
    Hey, I have bought ex2D just recently and I can tell you, it is awesome. Thanks for the great work you guys did.

    I had just a question and sorry / correct me if this isn't the right place to ask but did anyone try to use some kind of "lightning" within the game itself? I know real-time lightning is not something common in 2D games but Id like to know how you guys would do it?

    For example my game has a day/night cycle (just changing background works) but compared to that backgrounds my sprites have the same shade and just look too luminous at night (because of Alpha Blended Shader). Also what could I do about light sources such as torches?

    PS: I am not limiting this to Unity's lightning system but anything that could mimic the things I posted above (maybe tint the texture darker or something in that style).

    Sorry again if I should have asked this question on the wrong place.

    Thanks in advance!
     
  45. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Hello All,

    I'm on vacation right now, so sorry for any late reply.
     
  46. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Hi Fernando,

    As I can see, you put those unused images in the Asset/Resources folder. This folder is very special in Unity3D. All resources in it will involved into build phase regardless your scenes or prefabs reference them or not.

    So to correct the things, you have to move those unused picture to a folder NOT name as Resources. Also you need to examine your scene make sure no one reference those pictures in final game.
     
  47. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Hi WillBellJr,

    We usually use box collider or sphere collider. If needed, we will create mesh collider in blender or something else instead. But I believe a tool let user customize collider is much more easier than create it externally.

    I have one question about those un-regular shape in a sprite animation. For example, an action game may change collider in a sprite animation clip even if it is just a rectangle/box. I'm not sure what is a better working flow for this kind of things. My first idea is to make these variable shapes editable in each frame, and I just record all of them and change it when the animation is playing.

    May be someone have great idea in this whole things. I'm currently can only do somethings similar as what Torque 2D Editor have done.
     
  48. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Hello Eyeofgod,

    If you glance at the source code of exSoftClip.cs in ex2D_Runtime in github here, you will see only child node of soft-clip object can be added and calculated as clipping sprite. So instead of setting the planes, you may change the scripts into:

    Code (csharp):
    1.  
    2. List<exPlane> spriteList = new List<exPlane>();
    3. foreach (GameObject tempGameObject in listElements){
    4.         tempGameObject.transform.parent = clipBorder.transform;
    5. }
    6. clipBorder.UpdateClipList();
    7.  
     
  49. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Hello fgielow,

    I will contact nantas to solve your upgrade problem. ex2D provide Pro version which including the source code. The Pro version currently only sales in our WebSite. Since you already bought ex2D, you can upgrade to Pro by a coupon code that saves you 25$. You just need to send mail to sales in our website, provide your information and invoice ID and we will arrange the rest of the thing.

    Can you PM me your E-Mail address? Thanks in advance.

    Regards,
    Wu
     
    Last edited: Jan 24, 2012
  50. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Hi Froobzi,

    This is a very good question. Current version of ex2D didn't support the lighting shader since we disable creating normal in vertex.

    If you are familiar with shader, and would like to do a 2D light, all you need is put a 2D-Light GameObject and pass the right thing to those sprites affect with it each frame. You need to calculate the diffuse light effect in a totally 2D way, the pixel will only affect by the distance of the light point and the sprite texture color it has.

    If you only want to doing a day/night effect by color, ex2D Sprite provide the color value which can be changed in the run time. So you can loop the scene to found those sprites need to be take care of with colors, and init them depends on your game settings in Awake function.

    If you wish to have the best effect, I think making two sort of resource is a good idea. You will draw the day and night pictures separately, and use them depends on your game's day and night.

    Hope this help you, and would like to see other ones advice, too.