Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

2D Toolkit - 2D in Unity made simple [RELEASED]

Discussion in 'Assets and Asset Store' started by unikronsoftware, Jun 16, 2011.

  1. Ericks89

    Ericks89

    Joined:
    Nov 3, 2012
    Posts:
    39
    No worries, you can do all of this in the toolkit no problem. But it's how you want to tackle Tilemaps that could be an issue, everyone has a different way of doing tilemaps, Tk2D handles tile level construction similar to Photoshop or any image program. Because you can place or paint them onto the screen, nice way of doing it and the tilemap has some cool things like lighting "I'd use an actual lighting system though".

    Tk2D has everything done very well and does some things better than Unity 2Ds systems, I do want to point out that older games from the snes/genesis are closer to TK2Ds tilemap editor minus a few things, except I wish I could see the dang grid...

    -------------------------------------------------------------------------------------------
    I really like the toolkit, but is there anyway to view a grid in the tilemap editor? It's not like I'm not use to an image program without one but of course I can view one if I need it. I've been using a different tilemap asset but it's not compatible or works in Unity 5, Tk2D for the most part does.
     
  2. unikronsoftware

    unikronsoftware

    Joined:
    May 21, 2011
    Posts:
    1,287
    Hi,

    There isn't a way to view the grid but you can do one of two things - render it in OnDrawGizmos (can get very very slow if you zoom out on a big tilemap). I can get you code to do this, its not particularly efficient hence it not being in the toolkit itself.

    Or you can create a cheeky "grid" layer thats full of a semi transparent grid looking sprites, untick the "Render Mesh" "Color" and "Collider" - when you commit the tilemap, this layer will simply disappear. This is super efficient, and the grid can look like anything you like really. Try this to see if it works, its quick and super efficient.

    Also you can use turn on lighting if you want, it should just work as long as you have normals turned on with the sprite collection.

    ps I got logged out of the forum again and didn't get notified, email support / post in the tk2d forums for faster response :)
     
  3. miken619

    miken619

    Joined:
    Apr 29, 2015
    Posts:
    11
    Hi guys,

    I'm interested in buying the 2D toolkit but I have a couple of question I hope someone can answer
    I'm developing a isometric game for mobile devices

    1). If I have 8 sprites of a 3D model facing 8 direction, if I splice one of the sprite and do an animation on it, can I apply the same animation to all other sprites in different direction

    2). Can I interchange armor and weapons before starting a mission?

    3). How does it handle animation when the sprite switches direction, for example if it is in the middle of a 30 frame animation, will there be a glitch in the graphics when it start the animation at the same frame but in a different direction?

    4). Is it optimize to handle large amount of sprite on screen at one time? Like Clash of Clan

    5). Is there occlusion culling?

    6). How is the map editor, is it easy to paint isometric map? Can I make my own custom isometric tiles?
     
  4. unikronsoftware

    unikronsoftware

    Joined:
    May 21, 2011
    Posts:
    1,287
    Miken619 -
    1. You will need to set up the animations for other directions. 2D Toolkit animation editor lets you script an operator (without modifying tk2d source) that will create all the derivative animations from a main one (http://2dtoolkit.com/docs/latest/advanced/animation_editor_operators.html)

    2. Thats game code, I guess but you could use attach points to attach armor and weapon sprites.

    3. There is a variant of Play that will start from the same time as the previous clip, you can use this to seamlessly switch clips without restarting.

    4. It should work OK (http://www.citybuildingkit.com is built using 2D Toolkit)

    5. Uses Unity dynamic occlusion culling

    6. You can, but there are restrictions with isometric tiles, especially around overlaps. Looks like http://www.citybuildingkit.com has worked around those but I don't know.
     
  5. celaeno

    celaeno

    Joined:
    Jan 31, 2013
    Posts:
    53
    Hello,

    When I'm building for windows store I get some errors:


    - Could not load file or assembly 'System.Runtime, Version=4.0.Assets/scripts/GameManager.js(29,26): BCE0018: The name 'tk2dTextMesh' does not denote a valid type ('not found'). Did you mean 'UnityEngine.TextAsset'?

    - Assets/scripts/GameManager.js(30,26): BCE0018: The name 'tk2dTextMesh' does not denote a valid type ('not found'). Did you mean 'UnityEngine.TextAsset'?


    I'm using Unity 4.6.5f and setted up 2d toolkit for javascript, on android, ios and windows phone there are no errors. First I used 2d Toolkit 2.4.0, then I downloaded the latest version of 2d Toolkit (2.5.3) and still have the problem when building for windows store. Do you maybe know a solution for this?

    Thanks
     
  6. unikronsoftware

    unikronsoftware

    Joined:
    May 21, 2011
    Posts:
    1,287
    Unity for Windows Store doesn't support calling C# classes from JS. Tk2d is fully supported, but tk2d is written in c# so your JS code will not be able to see it in Windows store mode.
    http://docs.unity3d.com/Manual/windowsstore-gettingstarted.html
    Under "Things that are not yet supported:"

    Unfortunately we can't do anything about this, you should file a bug report with Unity so they know people want to be able to do this.
     
  7. j3lackfire

    j3lackfire

    Joined:
    Dec 23, 2013
    Posts:
    4
    Hi guys.

    How is toolkit 2d doing now compared to the native solution of Unity ? Could you please tell me what can toolkit 2d does that the Native version of Unity doesn't (or does but take tons of time to implement).

    Thanks.
     
  8. unikronsoftware

    unikronsoftware

    Joined:
    May 21, 2011
    Posts:
    1,287
  9. ikemen_blueD

    ikemen_blueD

    Joined:
    Jan 19, 2013
    Posts:
    316
  10. unikronsoftware

    unikronsoftware

    Joined:
    May 21, 2011
    Posts:
    1,287
    Not as far as I'm aware, seems to be running fine for me now. I've heard of cases where the IP was blocked in some parts of the world though, but I was under the impression that was no longer the case...
     
  11. ikemen_blueD

    ikemen_blueD

    Joined:
    Jan 19, 2013
    Posts:
    316
    Cool, I just used proxy and accessing the website fine.
     
  12. unikronsoftware

    unikronsoftware

    Joined:
    May 21, 2011
    Posts:
    1,287
    Awesome! Thanks for reporting back.
     
  13. BlackBIRDSoft

    BlackBIRDSoft

    Joined:
    Mar 30, 2015
    Posts:
    2
    I've just starte with 2dTK. I have a problem with layouts. In editor for Tk2dUILayoutContainerSizer I do not see the children of the gameobject to which this script is attached to. Even in the demo scene. When I change Direction attr, components changing their position, but I cannot set any advanced options for the children. Any ideas?
     
  14. unikronsoftware

    unikronsoftware

    Joined:
    May 21, 2011
    Posts:
    1,287
    Hi,

    What are you seeing / what do you expect to see? It works fine in the latest tk2d on Unity 5.0. Please email support
     
  15. BlackBIRDSoft

    BlackBIRDSoft

    Joined:
    Mar 30, 2015
    Posts:
    2

    Attached Files:

    • 2dTK.png
      2dTK.png
      File size:
      186.3 KB
      Views:
      592
  16. unikronsoftware

    unikronsoftware

    Joined:
    May 21, 2011
    Posts:
    1,287
    Replied to your email. Its a bug in tk2d, fixed attached in the email + will be in the next release.
     
  17. Whelly

    Whelly

    Joined:
    Sep 24, 2013
    Posts:
    4
    I had a quick noob question about 2D development in Unity using your plugin. I just bought the Corgi 2D engine, and I was wondering if 2D Toolkit can supplement or enhance the workflow in that engine. Thanks!
     
  18. unikronsoftware

    unikronsoftware

    Joined:
    May 21, 2011
    Posts:
    1,287
    Hi Whelly, I'm afraid I don't know - I don't use the asset.
     
  19. rerwandi

    rerwandi

    Joined:
    Dec 8, 2014
    Posts:
    532
    Is this asset still powerful as it should be after Unity 2D system ?
    Maybe yes, there are features than doesn't yet in Unity 2D now.
    But how else ?

    I look my friend using this and seems complicated.
    There's a lot of components and too much button in it anway.
     
  20. unikronsoftware

    unikronsoftware

    Joined:
    May 21, 2011
    Posts:
    1,287
    It depends. There are a lot of features that Unity 2D doesn't have (http://2dtoolkit.com/unity2d.html), and while the workflow needs you to create atlases explicitly, etc. it lets you create animations is quite a bit faster than Unity. I recommend looking through the docs to see if it'll work for you. http://2dtoolkit.com/docs/latest/
     
  21. Xaron

    Xaron

    Joined:
    Nov 15, 2012
    Posts:
    264
    I get an error during loading my project (see attachment). It is not critical as it runs anyway though.

    Using Unity 5.1 (had this issue in 4.6 as well) and latest toolkit2d.

    Code (CSharp):
    1. IsMatrixValid (matrix)
    2. UnityEngine.Camera:set_projectionMatrix(Matrix4x4)
    3. tk2dCamera:UpdateCameraMatrix() (at Assets/TK2DROOT/tk2d/Code/Camera/tk2dCamera.cs:788)
    4. tk2dCamera:OnEnable() (at Assets/TK2DROOT/tk2d/Code/Camera/tk2dCamera.cs:275)
    5.  
     

    Attached Files:

  22. unikronsoftware

    unikronsoftware

    Joined:
    May 21, 2011
    Posts:
    1,287
    Hi, do you have the game window hidden / closed when this happens?
    ps Its safe to ignore that, it gets resolved after the first frame
     
  23. TokyoDan

    TokyoDan

    Joined:
    Jun 16, 2012
    Posts:
    1,080
    How does 2D toolkit fit with Unity's native 2D? Are there conflicts? Are there redundancies?
     
  24. unikronsoftware

    unikronsoftware

    Joined:
    May 21, 2011
    Posts:
    1,287
    You can't use tk2d atlases as 2D sprites, but you can mix and match tk2d sprites and unity sprites in the same scene with no problem. tk2dCamera works with unity cameras, and tk2dtilemaps, etc work just fine with the rest of unity sprites. Basically mix and match as you need.
    http://2dtoolkit.com/unity2d.html
     
  25. Napoleonite

    Napoleonite

    Joined:
    Mar 15, 2015
    Posts:
    29
    When I click on the documentation on the site, all I get is:
    Forbidden

    You don't have permission to access /docs/latest/html/annotated.html on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


    Same for the other links around there.
    Also I can't ask about it on the forums because it seems that your site also does not send any verification e-mails at the present time (yes I checked the spam folder). So I can't access the forums either :/.

    So I sent an e-mail to your support: support@unikronsoftware.com. But that one failed to deliver... It's like they are totally down?

    Anyway, I just wanted to find out how to add collision/pathfinding to the 2D tilemap.
     
  26. unikronsoftware

    unikronsoftware

    Joined:
    May 21, 2011
    Posts:
    1,287
    @Napeoleonite

    Site was intermittently down yesterday, sorry - server migration. Also, thanks for pointing out the support email is broken, I fixed it once yesterday but its died again :(

    The tilemap adds colliders automatically based on what you define in the sprite collection.
    There are a few posts about pathfinding in the tk2d forums, its outside the plugin scope but its doable.
     
  27. Napoleonite

    Napoleonite

    Joined:
    Mar 15, 2015
    Posts:
    29
    Great the documentation is up again.
    The activation e-mail for the forums still doesn't work for me though. It's probably related to the support email not working.

    Okay thanks. Implementing pathfinding shouldn't be hard if the tiles already have collision. Especially since we can also attach data to tiles.
     
  28. unikronsoftware

    unikronsoftware

    Joined:
    May 21, 2011
    Posts:
    1,287
    Just resent all recent activation emails, check your junk email in case it ended up in there. I've manually activated your account as well, so you should be able to log in.
     
  29. Napoleonite

    Napoleonite

    Joined:
    Mar 15, 2015
    Posts:
    29
    Still no e-mail. But I can login, thanks for the manual activation.
     
  30. unikronsoftware

    unikronsoftware

    Joined:
    May 21, 2011
    Posts:
    1,287
    Hey thanks for letting me know about the broken email - the account was indeed broken during maintenance.
     
  31. Durango

    Durango

    Joined:
    Feb 3, 2015
    Posts:
    1
    If I buy this app will I receive updates when future versions appear? What is the time limit for new patches?
     
  32. pan-xiaohai

    pan-xiaohai

    Joined:
    Nov 30, 2014
    Posts:
    6
    Sorry for my poor English.
    I am using 2D Toolkit. What I can do if I want to use sliced sprites (Sprite Mode is Multiple) in SpriteCollection, it have 9 sprites instead of 1 sprite, I can not find any method to do this, can anyone tell me how to do, Thanks.
    20150710171056.jpg 20150710170922.jpg
     
  33. pan-xiaohai

    pan-xiaohai

    Joined:
    Nov 30, 2014
    Posts:
    6
    Do you fix this problem : is it possible to create sprite collection depends on already created sprite sheet ?
     
  34. unikronsoftware

    unikronsoftware

    Joined:
    May 21, 2011
    Posts:
    1,287
  35. unikronsoftware

    unikronsoftware

    Joined:
    May 21, 2011
    Posts:
    1,287
    Hi, updates for this product are free.
     
  36. pan-xiaohai

    pan-xiaohai

    Joined:
    Nov 30, 2014
    Posts:
    6
  37. unikronsoftware

    unikronsoftware

    Joined:
    May 21, 2011
    Posts:
    1,287
    Because 2D Toolkit was written way before the Unity sprite system. And we also still support versions of Unity before that.
     
  38. AvaJarvis

    AvaJarvis

    Joined:
    Jun 2, 2015
    Posts:
    16
    I need multiple resolutions of image objects within uGUI controls (I don't really want to reimplement 50 panels in 2DToolkit GUI). Does 2DToolkit provide this?

    Also the links in the asset store to the website, docs, forums, etc., don't work; they 404.
     
  39. unikronsoftware

    unikronsoftware

    Joined:
    May 21, 2011
    Posts:
    1,287
    Hi,
    tk2d doesn't support image objects in uGI controls.

    p.s. thanks for letting me know about the 404s, moved the site to its own domain + killed the subpages thinking "what could go wrong". Apparently, a lot.
     
  40. xiaohai_pan

    xiaohai_pan

    Joined:
    May 21, 2014
    Posts:
    4
    Could you add support for Unity's Sprite Editor?
     
  41. unikronsoftware

    unikronsoftware

    Joined:
    May 21, 2011
    Posts:
    1,287
    There are no plans to do that anytime soon, we intend to keep compatibility with older versions of Unity for a while yet. There are still a fair few other features in the pipeline that will need to be implemented before we can veven consider this.
     
  42. Ericks89

    Ericks89

    Joined:
    Nov 3, 2012
    Posts:
    39
    Hello, I'm needing some help with sprites as they're appearing quite blurry in game.

    I have the sprites pixels per meters set to 1, filtering is set to point, I have them diced to the dimensions of the sprite which is 22x40(I'm just testing out settings before I get the ball rolling).
    This is the result I'm getting, the left is what I SHOULD be getting, and the right is what is appearing in game.
     
  43. sanjodev

    sanjodev

    Joined:
    May 29, 2012
    Posts:
    63
    I followed the documentation to create a font in a sprite collection. The font isn't selectable in the drop down list for tk2dTextMesh object. If I create a regular font outside of a sprite collection, it shows up fine. Any ideas?
     
  44. unikronsoftware

    unikronsoftware

    Joined:
    May 21, 2011
    Posts:
    1,287
    Hi,

    Is the sprite collection in the font set up & committed properly? if it is you'll see the font data objects next to the sprite collection data. Post a screenshot of the font in the sprite collection + folders, that might help...
     
  45. sanjodev

    sanjodev

    Joined:
    May 29, 2012
    Posts:
    63
    After more investigation and using a clean project with just tk2dToolKit, it seems that if the sprite collection is set to use the "Platform" feature of the sprite collection, then even though it looks like the font is committed properly in the sprite collection, it does not show up on the drop down. If I create a different sprite collection without using the "Platform" feature, then everything works correctly. If I remove the "Platform" feature from the first sprite collection, my font in the sprite collection becomes "Inactive", then if I recommit to make it "Active" again and close and reopen Unity, then the font is now selectable.

    My current workaround is then to not use the platform feature or just don't use a font in a sprite collection.

    FontSpriteCollection.png
     
  46. unikronsoftware

    unikronsoftware

    Joined:
    May 21, 2011
    Posts:
    1,287
    Platforms do work but it suggests that the platform files for the font might be missing? Send me a repro case to support and I'll investigate further.
     
    Last edited: Aug 8, 2015
  47. sanjodev

    sanjodev

    Joined:
    May 29, 2012
    Posts:
    63
    Am I supposed to supply additional files to support the platform feature for the fonts? Like do I supply another BMFont file and just name it ***@1x and ***@2x? Is there a page in the document describing platform feature specifically for fonts? Because I don't it in the documentation.
     
  48. unikronsoftware

    unikronsoftware

    Joined:
    May 21, 2011
    Posts:
    1,287
    Yes you do need to supply the 1x and 2x files. Details on this page
    http://2dtoolkit.com/docs/2.5/advanced/platform_specific_sprite_collections.html

    Code (csharp):
    1. The same rules apply to fonts. 2D Toolkit will now parse your bmfont to find the appropriate texture, so you won't need to rename the texture. If in doubt, export from your font package using the full @platform filename instead of renaming it once it has been exported.
     
  49. sanjodev

    sanjodev

    Joined:
    May 29, 2012
    Posts:
    63
    When using the component tk2dUIScrollableArea, how do I disable the scrolling past the bounds of the content and snapping to bounds feature? I just want it to scroll and hit a hard stop when it reaches the bounds instead.
     
  50. Benjamin.chevalier

    Benjamin.chevalier

    Joined:
    Jul 3, 2014
    Posts:
    21
unityunity