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

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704

    See my change log, it will be available in v1.1.1.

    Actually, I just add it this morning :)
     
  2. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    I doubt this can be solved by using a TileMap. You need to create a sprite chain that their vertex are shared by index.
     
  3. nantas

    nantas

    Joined:
    Feb 11, 2010
    Posts:
    124
    If those graphics are not gonna be scaled or rotated during runtime, you can set the filter mode of the atlas texture to "point".
    This should eliminate the seam most of the time.

    If it's not feasible, wait for the tilemap editor :p
     
  4. Seokho

    Seokho

    Joined:
    Aug 31, 2011
    Posts:
    23
    I did what u said above.
    I want to use Texture2D.GetPixel (int x, int y)

    I printed "atlas [exSprite.index].coords".
    The atlas [exSprite.index].coords [0, 1] was not exactly same.

    For example,
    I built a sprite atlas (512 X 512 size). It has three sprites.
    One of them was at (425, 2). Width : 46, Height : 67.

    Calculate! Now~
    (y position) 2 + (its height) 67 = 69 (may be a real start position)
    (1 - 69 / 512 ) may be a real these atlas [exSprite.index].coords UV's V value.
    = 0.865234375F
    However when I printed atlas [exSprite.index].coords, its V was ' 0.9 '.
    It looked like simillar between ' 0.9F ' and ' 0.865234375F '. But that was not correct.

    So I want to reel INT position's value. Can I?
     
  5. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Let met guess, you use the original height of the texture ? But exAtlasEditor will trim the imported texture. To get an exactly height of your atlas element, use atlas[index].trimRect.height, check if it is 67 or not.
     
    Last edited: Aug 31, 2011
  6. CapnCromulent

    CapnCromulent

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

    Have a question about your AnimationClip code: any particular reason why each FrameInfo contains a reference to an atlas, instead of having that cached in the AnimationClip? Is it intended to support animations that span across different atlases?
     
    Last edited: Sep 1, 2011
  7. johnny_karas

    johnny_karas

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

    ex2D naturally support Multi-Atlas animation!!! And yes you are right, that's the key to support this feature.

    Just drag your texture to Sprite Animation Editor, no matter which altas it belongs to. ex2D will get things done :)
     
  8. Seokho

    Seokho

    Joined:
    Aug 31, 2011
    Posts:
    23
    Hello, jwu.

    I had stupid last question. I solved a problem myself;;;

    Another question I have.

    If our company buy ex2D at Unity Asset Store, then employee can use without no charging?
    Anybody use freely? : - D


    And!!!!
    2D tool kit looks like modify anchor point (our team called it "hot spot").
    But ex2D is not support. just 9 anchor support. Right?
     
    Last edited: Sep 1, 2011
  9. johnny_karas

    johnny_karas

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

    Well, the license of ex2D is per-user. But if the user is in a team, it become complicated, and I don't have a good way to limit user share it in a team, so I have to allow user use it in a team project.

    But the least thing you should follow is you can not copy and share ex2D on the internet and re-sale it.

    The hot spot can be done by create two GameObject, one as anchor, the sprite under it. This is cheap.
     
  10. Seokho

    Seokho

    Joined:
    Aug 31, 2011
    Posts:
    23
    Thanks for reply.

    I'll not share that on the internet : )
    And I know the solution u said using 2 GameObjects. I did before when using SM2.
    But that makes a programmer work more!!!!!!
    I'd like to graphic designers work making a hot spot and animation something about "2D RESOURCES".
    So create 2 GameObjects and do some work is not easy to co-worker who is graphic designer.

    ex2D say "Not heavy 2D tool". But I think this is need to inside ur tool.

    Do you have a schedule about this? or just skipped for light weight 2D Sprite Tool.
     
  11. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Well, that's not a big deal. But I need to discuss with my partner and evaluate if this feature is essential for artist. I'll let you know our decision later. If this is feature must have, it will be released in v1.1.1 or v1.1.2.

    BTW: about the Layer XZ problem. I just solve it today, and sooner or later I'll submit and update the evaluate version. Please wait for it. I'll notify you once things done.
     
  12. nantas

    nantas

    Joined:
    Feb 11, 2010
    Posts:
    124
    Hey Seokho,

    I just reviewed Unity Asset Store EULA, and here's the statement about license sharing among the team:

    http://download.unity3d.com/assetstore/asset-store-provider-distribution-agreement.pdf

    So you are still allowed to install it onto multiple machines, but you can only have one user working with it at a time if you only purchase one license.

    Since we do not provide a separate EULA, the Unity Asset Store default one will take effect.

    Just to clarify.
     
  13. bryantdrewjones

    bryantdrewjones

    Joined:
    Aug 29, 2011
    Posts:
    147
    Thanks for the quick reply, jwu :) Do you think I can achieve the same effect by enabling mipmaps on the texture atlases generated by ex2D, then setting the quality settings for each target platform as discussed here?
     
  14. Seokho

    Seokho

    Joined:
    Aug 31, 2011
    Posts:
    23
    Hi jwu, thanks for reply quickly.
    I'm still watching ur tool.
    And our company determine yet choosing Unity 2D Sprite tool between yours and 2D ToolKit.

    Ah, here is my advice for you.
    When I using 2D ToolKit, just choosing object's sprite with a name. ( They have a sprite's list with names. )
    But in ex2D, I just pick up sprite in Project Window then drop-down to gameObject's ExSprite Script's texture in Inspector Window.
    It is better choose a sprite in Inspector everything.
    My english is not good, so it is hard to explain what I sayT_T
     
  15. johnny_karas

    johnny_karas

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

    I'm not sure if this is good to solve cross-platform problem. I need more research to proof your solution. Give me some time.
     
  16. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Hello 2Dsprite,

    Currently we don't have any plan sale our product independently, because we think Asset Store is a good way for user to upgrade bought item to latest version.

    In Unity Asset Store, if you buy a product, you can upgrade in anytime through your Unity. This is really good for both user and seller, we save much more time in maintain the update version and notify user, also save the money in maintaining the data of the bought customers.
     
  17. johnny_karas

    johnny_karas

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

    First, let me tell you our Evaluation Version has up to date, and including the Layer XZ fixes. Please go and download it in our web-page. www.ex-dev.com/ex2d

    Second, about your select issue. I'm not sure if my understanding is correct. In ex2D you can do drag and drop setup, also you can select texture from list by clicking the select button in the texture field in exSprite inspector. Check my picture in attachment for detail process.

    Comments: I think what you need is browse and select a texture from Atlas. I happy to tell you I have add this feature in my todo list, and it will become a button named "select from atlas" that just below the Texture Field.
     

    Attached Files:

    • $sel.png
      $sel.png
      File size:
      170.9 KB
      Views:
      2,132
    Last edited: Sep 2, 2011
  18. Seokho

    Seokho

    Joined:
    Aug 31, 2011
    Posts:
    23
    Yeah, that's what I mean^^
    I downloaded evaluation ex2D and founded what you had fixed. Thanks a lot.

    Unfortunately our team needs "Custom Anchor" and doesn't waste of time to make it.
    So our team may choose other 2D Sprite Tool. T_T. (Not yet choose and buy. We're looking for tools what we need.)

    Every tool has strength and weaknes. But I love your tool.
    It's very cheeper than others and interface much better and light-weighted.

    Please add "Custom Anchor Feature" quickly. T_T
    (I should choose one and confirm to buy.)

    Ah, I have an idea for ya.
    When make a sprite animation, just do drag and drop first sprite of animation.
    Then "Automatic" Button clicked, automatically adds rest of sprites using sprite's file name.


    !!
    In ex2D, if I fixed a sprite and then the atlas texture made before change automatically?
     
    Last edited: Sep 2, 2011
  19. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    OK Seokho, you win! After discussion, we've add the offset for user. Check the attachment of it.
    I've update the evaluate version of this, please download the evaluation version again for this new feature. This feature will be added in ex2D - v1.1.2 since we just submit the v1.1.1 of ex2D today.

    I think this is a working pipeline in your studio. And ex2D provide an very good way to build automatically pipeline through script. I will update my documentation to show you all these things. But you can read preview post here that also shows you how to use script create sprite animation clip, atlas in ex2D.

    I'm sorry, I don't understand your last question. Can you explain it more? Thanks.
     

    Attached Files:

    Last edited: Sep 2, 2011
  20. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    The ex2D v1.1.1 is now available in Unity Asset Store. From this version, ex2D start using assemble distribution, in this way, user can easily update ex2D without getting truble in folder hierarchy changes.

    Unfortunately, to support this, it will have problem if you already use ex2D v1.1.0 or older in your project. The upgrade will cause Script Reference Missing, and here is the step to save your data back and make things right: Upgrade from v1.1.0 to v1.1,1

    We really sorry about this upgrade since our lake experience in distributing package in Unity3D and hope you can understanding it. ex2D need your support for getting better!

    If you got any problem on it, feel free to ask me.
     
    Last edited: Sep 2, 2011
  21. badawe

    badawe

    Joined:
    Jan 17, 2011
    Posts:
    297
    jwu!

    Thinking with my team here, we come up with idea for animations.

    In cocos2D we have one AnimationControler Class!

    So think like that:

    Every Animation you have on your project, already be on this class, and you can simple call this animation from wherever you want, and don't need reference that with specific exSprite.

    This will save a lot of work, and reduce a lot of minimal problems when you work with a lot of animations.

    What you think?

    And something i really want, is something to change all animations properties once! Like one exGroupImport for this animations, to change all propertys like: Length and Wrap Mode, once! can we have that?


    Another thing!

    I want the options to set on exAnimClip the FPS i want the animation run, like: 30, and this make:
    If animations have 18 frames:
    (1 / 30) * 18 = 0,6 Length!
     
    Last edited: Sep 2, 2011
  22. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    I think you can do this by yourself. You first create the GameObject with this AnimationController in the scene. Put a list to reference the animation clip you want in it. After that, when your game running, and you need some sprite to play animation, you can write code as:

    Code (csharp):
    1.  
    2. sprite.spanim.AddAnimatoin ( AnimationController.instance.GetAnim("hero_run_01") );
    3. sprite.spanim.Play ("hero_run_01");
    4.  
    Moreover, you can do the above code in the extension:

    Code (csharp):
    1.  
    2. static public class SpriteExtension {
    3.     public static void Play ( this exSprite _sprite, string _name ) {
    4.         if ( _sprite.spanim == null ) {
    5.             _sprite.spanim = _sprite.AddComponent<exSpriteAnimation>();
    6.         }
    7.         _sprite.spanim.AddAnimatoin ( AnimationController.instance.GetAnim("hero_run_01") );
    8.         _sprite.spanim.Play ("hero_run_01");
    9.     }
    10. }
    11.  
    In this way, you have the ability to play animation directly without adding any anim-clip reference.

    Code (csharp):
    1.  
    2. sprite.Play("hero_run_01");
    3.  
    Well, group-edit is our low priority task. I believe you can doing it easily in script. Just get your selection, and show some input box, and change the length of it. Here is a reference code:

    Code (csharp):
    1.  
    2. foreach ( Object o in Selection.object ) {
    3.     if ( o is exSpriteAnimClip ) {
    4.         exSpriteAnimClip animClip = o as exSpriteAnimClip;
    5.         animClip.Length = the_value_you_put;
    6.     }
    7. }
    8.  
    I've already add this in my todo list. This feature will be available soon in v1.1.2 or v1.1.3. Please wait for it.
     
  23. CapnCromulent

    CapnCromulent

    Joined:
    Sep 7, 2010
    Posts:
    45
    So, what's the best way to file bug reports w/ you guys? Also, the source is no longer available starting from 1.1.1? Kind of a bummer, because it makes it much easier for me to identify and fix problems.

    (Specific bug: exLayer uses the main camera to assign Z-position, not the camera assigned in PixelPerfect. If the pixel perfect camera has a shorter far plane, the sprites may not show up.)
     
  24. badawe

    badawe

    Joined:
    Jan 17, 2011
    Posts:
    297
    This is not working anymore:
    clip = exSpriteAnimClip.Create ( Path.Combine(PathToSaveAnimation, AnimationName), AnimationName );

    What is the new way to create animations dynamically by editor?
     
  25. johnny_karas

    johnny_karas

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

    The method changes, the new way to create animclip is:

    Code (csharp):
    1.                    
    2. exSpriteAnimClip clip = exSpriteAnimationUtility.CreateSpriteAnimClip ( assetPath, assetName );
    3.  
    I'm working on script reference, and will finish in two days.
     
    Last edited: Sep 3, 2011
  26. johnny_karas

    johnny_karas

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

    The source of runtime script still OPEN, I just can't find a way to provide both sources and dll together in Asset Store because Unity keep reporting error since the duplicate define.

    Basically I would open a source repository in github, and I think you can submit issue there. The whole work will be done in next week, wait for it.

    About the pixel perfect component, yes you're right!
    I will change the code, move all camera from helper class to exPlane. And all helper class such as layer, ppf, viewport position, screen position will use the camera set in exPlane. I will change this in v1.1.2
     
    Last edited: Sep 4, 2011
  27. badawe

    badawe

    Joined:
    Jan 17, 2011
    Posts:
    297


    Ok, i find that to, but why i can't change the propertis of my clip?

    I try to do something like that:
    Code (csharp):
    1.  
    2.         Object[] objects = new Object[filtered.Count];
    3.         float targetLegnth = ((1.0f/30.0f)*float(objects.Length));
    4.         clip.length = targetLegnth;    
    5.         clip.wrapMode = WrapMode.Loop;
    6.        
    7.         for(int i = 0; i < filtered.Count; i++)
    8.         {
    9.             objects[i] = AssetDatabase.LoadAssetAtPath(Path.Combine(path[i], filtered[i].name+".png" ), typeof(Texture2D) );
    10.         }      
    11.        
    12.        
    13.         exSpriteAnimationUtility.AddFrames(clip, objects);
    14.         exSpriteAnimationUtility.Build(clip);
    15.  
    And don't work! I can't change anything of my clip!
     
  28. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Code (csharp):
    1.  
    2.         Object[] objects = new Object[filtered.Count];
    3.         float targetLegnth = ((1.0f/30.0f)*float(objects.Length));
    4.         clip.length = targetLegnth;    
    5.         clip.wrapMode = WrapMode.Loop;
    6.        
    7.         for(int i = 0; i < filtered.Count; i++)
    8.         {
    9.             objects[i] = AssetDatabase.LoadAssetAtPath(Path.Combine(path[i], filtered[i].name+".png" ), typeof(Texture2D) );
    10.         }      
    11.        
    12.        
    13.         exSpriteAnimationUtility.AddFrames(clip, objects);
    14.         exSpriteAnimationUtility.Build(clip);
    15.  
    Hello badawe:

    I test your code in my project, the only thing can't change is the length, because each time you call AddFrames, the length will re-calculate. And it not work if you put clip.length = targetLegnth;

    Put the code after AddFrames can't make the things right, because the length of each frameinfo still not changes, so when you edit the clip in animation editor, it will reset to the length equals to the sum of the length in frameinfos.

    I will fix the length assignment code so that clip.length = n; will trigger a set function.

    Other properties are work correct in my project, so can you give me an example package so that I can locate the problem?
     
    Last edited: Sep 3, 2011
  29. badawe

    badawe

    Joined:
    Jan 17, 2011
    Posts:
    297
    The only thing i can't change is the length! But this make all the process useless!


    Now i tryng to do something like that:

    Code (csharp):
    1.  
    2. void OnGUI()
    3.     {
    4.         AnimationName       = EditorGUILayout.TextField("Name of Animation to be created: ", AnimationName);
    5.         PathToSaveAnimation = EditorGUILayout.TextField("Folder to save Animation: ", PathToSaveAnimation);
    6.         framesPerAnimations = EditorGUILayout.IntField("Total Frames per Animations: ",framesPerAnimations);
    7.        
    8.         if(AnimationName=="")
    9.         {
    10.             GUI.enabled = false;
    11.             GUILayout.Button("Missing the name of Animation");
    12.             GUI.enabled = true;
    13.             return;
    14.         }
    15.         if (!GUILayout.Button("Generate Animation"))return;
    16.        
    17.         Object[] t                  = Selection.GetFiltered(typeof (Object), SelectionMode.DeepAssets);
    18.         List<Texture2D> filtered    = new List<Texture2D>();
    19.         foreach (Object o in t)
    20.         {
    21.             if (o.GetType() == typeof(Texture2D))
    22.             {
    23.                 filtered.Add(o as Texture2D);
    24.             }
    25.         }
    26.         filtered.Sort(CompareListByName);
    27.        
    28.         DirectoryInfo dirInfo = new DirectoryInfo( Path.Combine("Assets/",PathToSaveAnimation) );
    29.         if ( dirInfo.Exists == false ) {
    30.             AssetDatabase.CreateFolder ( PathToSaveAnimation, AnimationName );
    31.         }
    32.        
    33.         int totalAnimations = filtered.Count/framesPerAnimations;
    34.        
    35.        
    36.         int startTexture = 0;
    37.         for(int i0 = 0; i0 < totalAnimations; i0++)
    38.         {      
    39.             exSpriteAnimClip clip = exSpriteAnimationUtility.CreateSpriteAnimClip(Path.Combine("Assets/",PathToSaveAnimation), (AnimationName+"_"+i0));
    40.            
    41.             Object[] objects = new Object[filtered.Count];
    42.             //Debug.Log((1.0f/30.0f)/totalAnimations);
    43.             //clip.length   = ((1.0f/30.0f)/totalAnimations);
    44.             //clip.wrapMode     = WrapMode.PingPong;
    45.            
    46.             for(int i1 = startTexture; i1 < (startTexture+framesPerAnimations); i1++)
    47.             {
    48.                 //objects[i1] = AssetDatabase.
    49.                 objects[i1] = AssetDatabase.LoadAssetAtPath(Path.Combine(getPathOf(filtered[i1]), filtered[i1].name+".png" ), typeof(Texture2D) );
    50.             }      
    51.             exSpriteAnimationUtility.AddFrames(clip, objects);
    52.             exSpriteAnimationUtility.Build(clip);
    53.            
    54.             clip.wrapMode   = WrapMode.PingPong;
    55.             if(clip.wrapMode == WrapMode.PingPong)
    56.             {
    57.                 clip.length = (((1.0f/30.0f)/totalAnimations)*2);
    58.             }
    59.             else
    60.             {
    61.                 clip.length = ((1.0f/30.0f)/totalAnimations);
    62.             }
    63.            
    64.             startTexture+=framesPerAnimations;
    65.         }
    66.     }
    67.  
    Seens ok! but when i click over it, length return to 1!

    This drive me crazy!
     
  30. johnny_karas

    johnny_karas

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

    Let me show you a temp solution:

    Code (csharp):
    1.  
    2. exSpriteAnimationUtility.AddFrames(clip, objects);
    3. clip.wrapMode   = WrapMode.PingPong;
    4. if(clip.wrapMode == WrapMode.PingPong)
    5. {
    6.     clip.length = (((1.0f/30.0f)/totalAnimations)*2);
    7. }
    8. else
    9. {
    10.     clip.length = ((1.0f/30.0f)/totalAnimations);
    11. }
    12.  
    13. foreach ( exSpriteAnimClip.FrameInfo fi in clip.frameInfos ) {
    14.     fi.length = clip.length/clip.frameInfos.Count;
    15. }
    16. exSpriteAnimationUtility.UpdateLength(clip);
    17. exSpriteAnimationUtility.Build(clip);
    18.  
    Like I said, the length of the sprite anim clip always equals to the sum of the all frame-infos' length.
     
  31. llavigne

    llavigne

    Joined:
    Dec 27, 2007
    Posts:
    977
  32. johnny_karas

    johnny_karas

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

    I can't open the link. Let me guess, have you follow the article and upgrade to v1.1.1 ? Your atlas asset would missing reference. Just follow the step and those data will get back.
     
  33. doncabrera

    doncabrera

    Joined:
    Jun 22, 2009
    Posts:
    59
    I just want to say this looks like a fantastic asset to have for any unity developer and I am planning on buying this as soon as we finish with the pre production. Just want to express my gratitude and say I'll be getting this as if it were food. Thanks.
     
  34. llavigne

    llavigne

    Joined:
    Dec 27, 2007
    Posts:
    977
    I re created the atlas from scratch - multiple times and the same thing happen : the atlas editor doesn't show the atlas, only the buttons to the left.

    $Screen_shot_2011-09-03_at_8.06.jpg
     
  35. johnny_karas

    johnny_karas

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

    It looks like there have an error happen when rendering GUI. Can you help me check the Console, see if any error log in there?

    BTW: do you have Resource folder in your ex2D/Editor/ directory?

    It should looks like this:

    • ex2D/Core/ex2D.Runtime.dll
    • ex2D/Core/Shader/
    • ex2D/Editor/ex2D.Editor.dll
    • ex2D/Editor/Resource/
     
    Last edited: Sep 4, 2011
  36. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    All you added is great !!!
    I'm waiting for the 1.1.2 version... and for the documentation for the soft clip option.

    thanks jwu,
    6R
     
  37. badawe

    badawe

    Joined:
    Jan 17, 2011
    Posts:
    297
    jwu!

    Thanks for the great work you are doing on ex2D keeps getting better!

    I have one question, how can i set the target atlas to target scene?


    I try to export my objects on my Resources Folder, but beside the Atlas, he moves every single image i use for the atlas?! Or i'm missing something?
     
    Last edited: Sep 4, 2011
  38. johnny_karas

    johnny_karas

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

    Not quite understand your question :(. Here is my guess: You should only put Atlas Texture, Atlas Material and Atlas in Resources Folder. The Atlas - EditorInfo only used for editor and should not go to the final build. Because EditorInfo reference the raw textures.

    What do you mean about "target atlas to target scene" ?
    What's the behavior of "he moves every single image i use for the atlas"?
     
  39. Seokho

    Seokho

    Joined:
    Aug 31, 2011
    Posts:
    23
    Thank you so muck ^^
    I've checked this feature right after I had read.
    My question is "I built a atlas with a.png sprite image(a.png is in Project Editor Window), after that I modified a.png image. And then atlas will change automatically?"

    Another question I have.
    I make sprite images base on "iPhone 4G - retina display (960 * 640)".
    Can I use my sprite images without any changes to "iPhone 3GS or 3G"'?
    Demo uses a orthographic camera but each demo scene's camera has a different size. ( 160 or 384 )
    Is there any setting value or reference this feature?

    ------------------------------------------------------------------------------------------------------------------------------------------------------
    I found something.
    When I was using SetSprite(), it needed int value of atlas's element index.
    So I just made my own function which can get int value (index) in atlas using "sprite name - string".
    Well, why don't you add a function doing like this? : )
    Just that was my guess.

    And When v1.1.2 will be updated?
    When you update v1.1.2, I'll buy ex2D.~~

    Sincerly.
     
  40. johnny_karas

    johnny_karas

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

    Nice feature! In current version no, but this is not a big deal since ex2D is able to detect this change and automatically build atlas for it. So I will add this in v1.1.2

    You can use the sprite anywhere, but you need to resolve them in different resolution by yourself. Current version of ex2D doesn't provide a standard multi-resolution solution. Though we have plan on it, we still research a proper working pipeline.

    You can do this as:
    Code (csharp):
    1.  
    2. sprite.SetSprite ( sprite.atlas, sprite.atlas.GetIndexByName("run_01") );
    3.  
    The run_01 is the name of the raw texture. I didn't provide this because GetIndexByName is very expensive and people should avoid it by pre-cache the index in Awake function through exAtlas.GetIndexByName.

    Probably in next week. And thank you for your evaluation and your advices, these advices are great, and help us improve ex2D better and better.
     
    Last edited: Sep 5, 2011
  41. Seokho

    Seokho

    Joined:
    Aug 31, 2011
    Posts:
    23
    Hell, jwu.
    I'm always glad to your reply so quickly.

    I know what you concerned.
    GetIndexByName has a loop from 0 to atlas's element.Length?

    ------------------------------------------------------------------------------------------------------------
    I downloaded evaluation ex2D and tested now.

    I'm wondering a feature that Physics feature.

    I chosen Physics to "Mesh" and checked "Auto Resize".
    When I change sprite of GameObject, mesh collider looked like doesn't be resized automatically.
    But box collider did right.(did work - resized automatically)
    This happen just show in evaluation ex2D? or v1.1.1?

    I founded your websites had been changed!
    The Reference page looks very nice! That's what I want to see : )
    Great job!!!!
     
    Last edited: Sep 5, 2011
  42. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Yes, loop and string compare

    I find this bug, too. I'll fix it.

    BTW:

    I have done this just now and test it. Looks great!
     
  43. Seokho

    Seokho

    Joined:
    Aug 31, 2011
    Posts:
    23
    I'm expecting next version +_+!

    I have a question.
    EX)
    1. I have two sprite images. - A.png, B.png
    2. I make an atlas image using ex2D. - atlas.png
    3. Create ex2D sprite object (which is named SpriteObject) and choose a texture. - Select B.png
    -> Here is same with document.
    4. Delete B.png in Project Editor Window.
    5. SpriteObject's texture link has been broken. No image.


    So, I should not delete sprite images (A.png or B.png).
    When I build this project to iPhone, these sprite images (A.png or B.png) will has been included?
    Due to app size, I want to remove those sprite images. Just add a atlas image.
    Do not care about this when I build the project?
    I'm not sure whether sprite images (A.png or B.png) included.
     
  44. johnny_karas

    johnny_karas

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

    The A.png and B.png will not include in the final build unless some object reference it. In ex2D, if you build the texture in atlas, the game-object will only reference the atlas.png texture which means in final build, A and B will be excluded.

    You can not delete A and B in the project because AtlasDB and other things need it to identify if use atlas texture or raw texture, also for those syncing stuff.
     
  45. Siris Dracken

    Siris Dracken

    Joined:
    Sep 5, 2011
    Posts:
    1
    I am currently using the evaluation version, and I am trying to decide if I should buy. ex2D seems pretty awesome so far, except that when I create a Atlas for the sprites that I want to use, it causes them to loose their clarity, making the sprites fuzzy. I saw some previous posts about images getting pixelated, but thats not really what is happening for me (using 32x32 textures, can't really get any more pixelated), the images are just getting really fuzzy, and the alphas are getting fuzzy as well, leaving white lines around the sprites.

    Is there any way to fix this?
     
  46. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Hello Siris Drachen,

    Just get your texture. So since you are doing a 8-bit like pixel style Game. You need to choose Point filter mode settings in your built atlas texture.

    You only set your raw-texture to Point Filter Mode, but that's not enough because when you import these texture to atlas and use the sprite, the sprite will only use the atlas textures and of cause it will use the settings of the atlas texture to render the mesh. That's why you see the sprite fuzzy.

    Thanks in advance.
     
    Last edited: Sep 6, 2011
  47. DrPygameNewb

    DrPygameNewb

    Joined:
    May 6, 2011
    Posts:
    136
    Jwu have you thought about making a demo version of this? Like limit a user to design 1 level with a few sprites?
     
  48. johnny_karas

    johnny_karas

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

    I have provided an Evaluate version in my site here
    Is this what you want?
     
    Last edited: Sep 6, 2011
  49. Seokho

    Seokho

    Joined:
    Aug 31, 2011
    Posts:
    23
    Hello, jwu.

    I found 2 bugs and have no idea this feature u already know.

    #1 Bug
    1. Make ex2D Sprite Object and it has mesh physics, auto resize option enabled.
    2. Make a prefab using 1's object.
    3. Instantiate through a script and change a sprite using SetSprite ().
    4. Mesh Collider doesn't work cause auto resize bug.

    #2 Bug
    1. Make ex2D Sprite Object.
    2. Make a prefab using 1's object.
    3. Select 2's prefab in Project Editor Window.
    4. In Inspector Editor Window, change Physics Option. (None->Box or Mesh)
    5. Change Physics option one more time. (Box -> Mesh or Mesh -> Box)
    -> then prefab has 2 collider!!
    6. Change Physics option to None.
    -> then prefab do not destroy collider. Collider still alive.
     
    Last edited: Sep 6, 2011
  50. johnny_karas

    johnny_karas

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

    Nice catch, I will go and fix these two bugs. Plus, I will open a github page in this week, so user have a way to submit bugs and track the issue.

    Anyway, I'll let you know my progress.



    * The first bug I've already fix it since last time you reported the auto-size no use in MeshCollider.
    * The second one I just fix it.

    So these two fixes will be added in v1.1.2, we plan to submit the version in this weekend.
     
    Last edited: Sep 6, 2011