Search Unity

Uni2D tool: A new amazing way to create 2D games in Unity!!

Discussion in 'Assets and Asset Store' started by Bento-Studio, Jul 6, 2012.

  1. devandart

    devandart

    Joined:
    Jun 7, 2013
    Posts:
    144
    @Bento-Studio
    Hi Bento-Studio,

    in our current game we want to have 4 different Characters with many individual Animation Clips.
    The player can switch between them in realtime because each character has it's own specials.
    So I would like to create for each Character a Uni2DSprite / single prefab.

    Do you have an idea how to handle this because your prefabs lose the connection by instantiating???

    Thanks a lot.
    I hope you understand my problem.

    Cheers.
     
  2. Chaosgod_Esper

    Chaosgod_Esper

    Joined:
    Oct 25, 2012
    Posts:
    295
    create all characters in the scene, but keep 3 of them outside the level (in a box somewhere).
    And simply change the positions at changing characters. That way you have all characters wirh connection.
     
  3. devandart

    devandart

    Joined:
    Jun 7, 2013
    Posts:
    144
    Yeah okay, but I don't want to attach all my components to all characters.
    And the other problem is, that I want to have them all usable in new scenes.

    But then the asset connection is lost.

    Isn't there a workaround? :confused:
    Maybe I should create a "Player" Prefab with all controllers etc. and all sprites are only sprites with Tags "Character1" for example.
    Then I search for this sprite in the scene and use it...

    I'll wait for other ideas.

    But thanks.
     
    Last edited: Sep 12, 2013
  4. gdeglin

    gdeglin

    Joined:
    Mar 7, 2013
    Posts:
    78
    Hi. We're running into a problem where Uni2D sometimes modifies the meta files for every single image file in our project when sharing code via version control.

    Here's an example of the kind of change that is made to each meta file (first line deleted, second line added)
    labels:
    -- Uni2DID_9edfd2ff-a9cd-4e79-a9f7-20244c15015c
    +- Uni2DID_a686a8ab-2c1e-47f4-8026-46bba9d3c8e8

    Anyone know how to fix this?

    On a side note, the Uni2D/NGUI compatibility issues are annoying. Hope the next version resolves them!
     
  5. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    Here is my video to show a nice way to use Uni2D and Grey/White Textures to colorize then to deform or to animate :
    (Sorry for the bad quality of the video ! Look at 720 p !)



    6R
     
  6. paul-velocity

    paul-velocity

    Joined:
    Oct 20, 2012
    Posts:
    18

    yea, was looking for soemthing out of the box really, as id have to wrap, background , foreground, collision layer, entities, pickups and enemies :-(
     
  7. Bento-Studio

    Bento-Studio

    Joined:
    Aug 29, 2011
    Posts:
    275
    @devandart We're not sure of what you exactly want to do. Could I suggest you to do some screenshots to explain what you exactly expect

    @p6r Cool!

    @ paul-velocity We take note of your wishes.

    @gdeglin
    These problems will be fixed in the upcoming 2.02.
    Release planned for the next week!

    Cheers!
     
  8. devandart

    devandart

    Joined:
    Jun 7, 2013
    Posts:
    144
    Thanks for your answer.
    I think my main problem is, that I want to use animationSprites as real prefabs with update-connection in all scenes. :D
    For example when I add a new animationClip I want it in all scenes.
    I know this is not really possible but isn't there a workaround for this?

    Another question is, if it's a good idea to have many many animation frames?
    Our animationClips have up to 50 frames and everytime I change sth. the atlas is recreated and it takes many seconds. :D

    Cheers.
     
  9. Bento-Studio

    Bento-Studio

    Joined:
    Aug 29, 2011
    Posts:
    275
    @devandart Hello, you can only use Prefabs in runtime for now. So you can do a spawner of GameObject with the constraint that you will not see the result in editor. About your second question, we prefer regenerate even if it's not very efficient, to be sure that everything is well changed (due to a Unity constraint) but we may find a better solution in the next update to improve this.
     
  10. Gorgor

    Gorgor

    Joined:
    Apr 28, 2012
    Posts:
    51
    Hi,
    great to hear that Uni2D-NGUI problem si going to be resolved. I just want to point out that Uni2D also breaks "uTomate" plugin.. I use uTomate to build mac/windows players but if I add Uni2D plugin into the project, building players freezes Unity. I'd like to point out that it is not necessary to use uTomate to freeze unity. I can build player the standard manual way with uTomate AND UNI2D in project and it freezes unity.. if I remove Uni2D everything works fine..
    So just telling you to let you know.. hopefully your update somehow resolves even this and if not, the next one will.
     
  11. Bento-Studio

    Bento-Studio

    Joined:
    Aug 29, 2011
    Posts:
    275
    @Gorgor
    Hello! Thanks for this feedback. We hope the upcoming version will fix this. I added some details in PM. Meanwhile, could you try to contact uTomate's support? The only thing from our side that could cause a trouble on the uTomate's side, is about the texture management. Please, could you check with uTomate's creator what could be in conflict with the texture management?
     
  12. kork

    kork

    Joined:
    Jul 14, 2009
    Posts:
    280
    Hi, I'm from Ancient Light Studios, the creator of uTomate. I guess it's easier if we work this out here instead of sending our customers back and forth :D I found the following stack trace in the log of our mutual customer:

    Code (csharp):
    1.  
    2. NullReferenceException: Object reference not set to an instance of an object
    3.   at Uni2DEditorAssetTable.get_Instance () [0x0008a] in /Users/Gorgor/Documents/development/Unity/Projects/2dLightsTest/Assets/Root/Plugins/Uni2D/Sprite/Scripts/AssetManagement/Uni2DEditorAssetTable.cs:115
    4.   at Uni2DAssetPostprocessor.OnPostprocessAllAssets (System.String[] a_rImportedAssets, System.String[] a_rDeletedAssets, System.String[] a_rMovedAssets, System.String[] a_rMovedFromPath) [0x00010] in /Users/Gorgor/Documents/development/Unity/Projects/2dLightsTest/Assets/Root/Plugins/Uni2D/Sprite/Scripts/AssetManagement/Uni2DAssetPostprocessor.cs:73
    5.  
    This looks like an asset postprocessor is failing at or after the build. I wonder if that could be the reason for the freezing. Would you be willing to supply me with an evaluation copy of Uni2D, so I could conduct some more tests to see why this breaks?
     
  13. Bento-Studio

    Bento-Studio

    Joined:
    Aug 29, 2011
    Posts:
    275
    @kork

    PM sent.
     
  14. Gorgor

    Gorgor

    Joined:
    Apr 28, 2012
    Posts:
    51
    To all interested..
    Both uTomate and NGUI incompatibilities were resolved in version 2.02 - version sent to me today (ahead of official release I suppose). Going to update ma AS review:)
    Big thanks to both Uni2D and uTomate guys!..
     
  15. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    I always have this "4096 behaviour" in Version 2.01 under Unity 3.5.7 !?!

    6R
     
  16. Bento-Studio

    Bento-Studio

    Joined:
    Aug 29, 2011
    Posts:
    275
    Sorry I forget to mention this have been fixed for the upcoming 2.02 (submit planned for today)
     
  17. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    Hmmm...
    Yes, when we drag and drop pictures in Unity 3.5.7 with Unid2D 2.0.2 imported, the textures are now 1024 Max size for example... GREAT !
    BUT when I create a sprite, the texture suddenly has a "Max size" of 4096 !!! And then + 1 Mb instead of 300 kb !!! Normal ???

    Regards,
    6R
     
    Last edited: Sep 29, 2013
  18. fmarkus

    fmarkus

    Joined:
    May 22, 2010
    Posts:
    181
    No response... Must be a french company...
     
  19. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,422
    @fmarkus

    Snap, you did know Bento-Studio IS actually a french company, didn't you :D ?
     
  20. Bento-Studio

    Bento-Studio

    Joined:
    Aug 29, 2011
    Posts:
    275
    Yes apologize for missing your post and indeed we are french ;) So no there is no other way to set keyframes but you could still use Keyframe manager shipped for free with Uni2D 2.0.1 to manage your keys. It's a very useful tool. And about Chipmunk we know it but we'll use the native Unity implementation of Box2D for the future. Cheers!
     
  21. fmarkus

    fmarkus

    Joined:
    May 22, 2010
    Posts:
    181
    ;)

    Is it possible to know what's new in the update?


     
  22. Bento-Studio

    Bento-Studio

    Joined:
    Aug 29, 2011
    Posts:
    275
    @fmarkus Yes, it contains bug fixes concerning the atlas issue with the combination of Ngui or with other plugins and small workflow improvement. The update have been sent for more than a week and seems to have been accepted but I get no confirmation from Unity. It's very strange. The next update will be 2.1 and will contain a new amazing feature. Stay tuned!
     
    Last edited: Oct 6, 2013
  23. fmarkus

    fmarkus

    Joined:
    May 22, 2010
    Posts:
    181
    Sounds great! What's the new feature?!!!? ;)
    By the way Michel Ancel, the author of the Rayman series is my brother in law :)
     
  24. pixelsteam

    pixelsteam

    Joined:
    May 1, 2009
    Posts:
    924
    By the way Michel Ancel, the author of the Rayman series is my brother in law :)

    He is a bloody Genius!
     
  25. fmarkus

    fmarkus

    Joined:
    May 22, 2010
    Posts:
    181
    He is!
     
  26. Deleted User

    Deleted User

    Guest

    hi bento studio

    sorry if this has been asked already, how do i switch the texture to use a hires version for retina, without altering the mesh/bones?

    thanks
     
  27. devandart

    devandart

    Joined:
    Jun 7, 2013
    Posts:
    144
  28. egor.shaldov

    egor.shaldov

    Joined:
    Aug 20, 2012
    Posts:
    1
    Please tell me why when I download the latest version of the repository are ALWAYS billed meta files for ALL image files
     
  29. Ash_Woodlander

    Ash_Woodlander

    Joined:
    Jun 25, 2013
    Posts:
    4
    Hi, Bento-Studio. Sorry for my bad English at first. Thanx for so good asset.
    But a have some questions. Help me, please.

    1) How can i flip animation? Horizontal or vertical.I don't know, how can i do it. I can flip texture, but my texture is atlas for animation... Maybe i can't understand some things...help me please.

    2) Can i edit the atlases? I know only how create automatic, but i can't create atlas which i want. Only when i add texture to Uni2dSprite, or to AnimationClip. But don't know how can i do it myself. I want select some png images, press any button, and take atlas.

    3) How can i do multi-resolution graphic packs for my mobile game(IOS, Android). In 2dtoolkit i can choose overrides for the camera, and build many resolution packs of the graphix. How can i do it in Uni2d?

    Sorry, again.
     
  30. Ves

    Ves

    Joined:
    Apr 6, 2011
    Posts:
    23
    Amazing plugin. I just have a quick question: what's the best way to animate a character's limbs? Should the limbs be children of the body, and then each have their own bone structure animation clip?

    Thanks for your time!
     
  31. Rekkou

    Rekkou

    Joined:
    Apr 30, 2013
    Posts:
    2
    Greetings, pardon my bad grammar but i need to ask a question. Is the bone axis in Uni2d is limited only to one axis?

    Right now, i am currently trying to animate a wing, but the movement i wanted to do seems impossible because the bone can only rotate to one direction.
     
  32. Mihai-Ionut

    Mihai-Ionut

    Joined:
    Mar 15, 2013
    Posts:
    5
    I got a character made from parts that are in an atlas,everything good (3 draw calls,9 saved by batching) but when I start an animation, batching doesn't works anymore,I get 12 draw calls.In the animation(made with Unity Animation) i change the transform and for one sprite I change the alfa of the material. All sprites are quads,no shadows or light mapping.
     
  33. Bento-Studio

    Bento-Studio

    Joined:
    Aug 29, 2011
    Posts:
    275
    Hello everyone,
    Apologize for delaying our answers.

    @Ash_Woodlander
    1) Try to use negative scale to invert your sprites.
    2) You can create manual atlas by creating an atlas texture and adding them manually in the list of sprites.
    3) Uni2D doesn't support yet the multi-resolution feature.

    @Ves
    It depends of your character, but yes you should connect them to the body and beginning by a root empty object to control the character position/orientation. Uni2D allows you to move bone into the hierarchy and rename the bones but remember that you can't rename the bones after you create the animation.

    @Rekkou
    You can animate only in 2D from the uni2D inspector but you can animate in all the axis from the animation vie or by manipulating the 3D gizmos.

    @Mihai Ionut
    Did you change the scale of the sprites?
     
  34. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    Any plan for this feature?
     
  35. Bento-Studio

    Bento-Studio

    Joined:
    Aug 29, 2011
    Posts:
    275
    @mcmorry
    Sorry not yet unfortunately :/
     
  36. Mihai-Ionut

    Mihai-Ionut

    Joined:
    Mar 15, 2013
    Posts:
    5
    @Bento-Studio Yes,I am changing the scale in some of the sprites but not all.
     
  37. Yendall

    Yendall

    Joined:
    May 29, 2013
    Posts:
    1
    Is there a release date for Uni2D 2.1? I'm excited for this new amazing feature haha :)

    I also have a question about Sprite Animation:

    Say I created a character sprite with controllers with added animation clips for walking. Is there a way to script the sprite to start certain animations on key down? for example: if(Input.GetKeyDown(KeyCode.D) { animation.Play }

    This IF statement doesn't work because I am assuming Uni2D uses a completely different animation system to the standard Unity3D system. Is there a way to play these clips given certain scenarios?
     
    Last edited: Oct 28, 2013
  38. Bento-Studio

    Bento-Studio

    Joined:
    Aug 29, 2011
    Posts:
    275
    @Mihai Ionut
    Yes that's why you may have some unwanted drawcalls try to use our "sprite scale" instead of regular resize. And please note that if you use skinning on GPU batching can't be done.
     
  39. devandart

    devandart

    Joined:
    Jun 7, 2013
    Posts:
    144
    Yeah a new feature...
    Bones with inverse kinematics? :D

    Your Plugin is so awesome, thanks again for that!
     
  40. Chaosgod_Esper

    Chaosgod_Esper

    Joined:
    Oct 25, 2012
    Posts:
    295
    XD - devand is hungry for inverse kinematics
    But yes - that sould be awesome.

    +1 for InKi bones :)
     
    Last edited: Nov 6, 2013
  41. teamkrinoid

    teamkrinoid

    Joined:
    Nov 6, 2013
    Posts:
    4
    Having a weird issue with Uni2D (latest version) and Unity 4.2.1

    I create a blank project, import Uni2D from the asset store, and the example scenes run fine. However, I can't drag and drop sprites from the project into the scene view; the cursor turns into a circle with a dash in it. I was convinced by a friend to get Uni2D after I saw his workflow of dragging sprites from the project into the scene view. Any reason why this wouldn't be working? It should work in a blank project...
     
  42. Chaosgod_Esper

    Chaosgod_Esper

    Joined:
    Oct 25, 2012
    Posts:
    295
    be sure to have the uni2D sprite manager opened and as active window in the foreground :)
    without it, the uni2D functions are not updating - means no mouse or keysystem and drag&drop
     
  43. Bento-Studio

    Bento-Studio

    Joined:
    Aug 29, 2011
    Posts:
    275
    @teamkrinoid, Chaosgod_Espér just given the answer to your problem! Thanks
     
  44. alex-ra

    alex-ra

    Joined:
    Nov 8, 2013
    Posts:
    2
    Having an question about the drawcalls, I have a complex system of rigging for a character , it has only 2 bone systems, all the sprites fit in one atlas, in theory i should have 5 to 6 drawcalls(2 bones per bonesystem, one from an alpha value and one from the atlas), but it gives 7.
    I've found that only some of the sprites are making one drawcall, but they don't have any bones on them(but are parented to a bone) and have no scale value changed, also i used texture to mesh to do some alpha cutoff (but all the sprites have alpha cutoff and only these are giving one drawcall).

    From where do i have one drawcall in plus?
    And why some times uni2d bones give 3 drawcalls for 2 bone systems and some times 4?

    The caracter is for mobile device so one drawcall its very important for me. :-s

    $AAA.jpg

    Update:
    I've managed to discover this situation:

    when i disable the head group and keep a hand group i still have +1 drawcall
    when i disable a hand group i have -1 drawcall

    when i disable the hand group and keep the head group +1 drawcall
    when i disable the head group -1 drawcall

    It's like something cumulative is eating one drawcall.
     
    Last edited: Nov 8, 2013
  45. alex-ra

    alex-ra

    Joined:
    Nov 8, 2013
    Posts:
    2
    I found out why, when my sprites with alpha, pass through the front and the back of the skinned mesh i have another drawcall in plus.
     
  46. timelord

    timelord

    Joined:
    Aug 24, 2013
    Posts:
    3
    Hello,

    Im trying to figure out how to start a Uni2DSprite animation when a box trigger has a collision. I added this script to my box collider only to get a error
    Here is my code......

    public var sprite : Uni2DSprite;
    public var expSound : AudioClip;

    function OnTriggerEnter (col : Collider) {

    if(col.gameObject.tag == "Player"){
    AudioSource.PlayClipAtPoint(expSound, transform.position);
    sprite.spriteAnimation.Play();

    }
    }


    Im sorry im such a noob at programming but I just wish Uni2d had more tutorials and examples available so I could understand how the API works.

    Best Regards
    Timelord
     
  47. marvelshaan

    marvelshaan

    Joined:
    Oct 22, 2013
    Posts:
    21
    hello,is this working for android games..anyone developed app with this asset..i heard that this asset is very good.....
     
  48. devandart

    devandart

    Joined:
    Jun 7, 2013
    Posts:
    144
    Hi,

    yes Uni2D works very well with android and I think with each other platform, too.
    It's one of the best assets I know for 2D. ;)

    Regards
     
  49. Deleted User

    Deleted User

    Guest

    hi bento

    i'm having trouble getting draw call batching to work.

    i have 11 uni2d sprites, under the uni 2dsprite panel in the inspector it has the right textureatlas selected under 'user atlas'. under shared material it says none and is greyed out, just so you know. at the bottom of the inspector under skinned mesh renderer it has the texture atlas material and i can see the texture atlas in the preview.

    however instead of being 11 draw call, i am seeing 11.

    wondering if any of this is my be why:
    - each sprite has a bone / skeleton animation attached
    - each sprite is inside a container empty gameobject. that game object is stored in the resources folder and inited at runtime. there are no gameobject/sprites on the stage in the editor only at runtime.

    any thoughts?

    many thanks
     
  50. teamkrinoid

    teamkrinoid

    Joined:
    Nov 6, 2013
    Posts:
    4
    Thanks for the answer! Thought it was probably something simple I was overlooking :neutral:

    Just saw that Unity 4.3 is finally out (with new 2D support). Will there be any compatibility issues with Uni2D? Should I hold off upgrading? I could see some of the new 2D workflow improvements in 4.3 clashing with the custom functionality of Uni2D