Unity Community


Page 2 of 126 FirstFirst 12341252102 ... LastLast
Results 21 to 40 of 2519

  1. Posts
    46
    if i may make a lil suggestion for future releases,

    add the ability to add a solid color
    & if possible, allow it to be gradient !!

    & I can't describe it as a bug, but the editor keeps pumping errors every now & then while using the editor, which is a lil annoying
    however, when the game is running, (if you clear the log first), it stays clear & runs in a stable fashion, which makes it a low importance request !!


  2. Posts
    92
    Two things I've run into:

    When you make a BMFont, I only usually include type-able characters (about 90 or so). When you enter that number into the number of characters field, you get a bunch of null accesses. You actually need to keep that value high, even though you're only using 90 characters. Reason being it appears to use a direct index which corresponds to the character you've typed, rather than doing something "more clever". So not sure why that value's exposed.

    The second thing I've run into is a bunch of null accesses when somehow the Sprite data gets corrupt. The SpriteId of one of my Sprites was -1 somehow (we're using SVN here, so not sure if a bad checkin had something to do with it, but the data was all there). You'll know you've run across this error when your Inspector refuses to render correctly. The way to alleviate this problem is to change your Inspector to Debug mode, then change the values, then back to Normal mode.

    Other than that, I really like the workflow and the price. Very reasonable, made the purchase a no-brainer.
    Last edited by Jodon; 06-26-2011 at 12:20 PM. Reason: Forgot my praise!


  3. Location
    Newcastle upon Tyne, UK
    Posts
    1,179
    Hi,

    Quote Originally Posted by nab477 View Post
    add the ability to add a solid color
    & if possible, allow it to be gradient !!
    Could you explain this in more detail? Do you mean to the sprite or the textmesh (which already supports gradients)?

    Quote Originally Posted by nab477 View Post
    I can't describe it as a bug, but the editor keeps pumping errors every now & then while using the editor
    Is this the "Cleaning up leaked objects in scene since no game object, component or manager is referencing them. Mesh has been leaked 11 times." message? We seem to get that when using procedural meshes in the editor, even outside the 2d toolkit. We haven't really spent any time trying to fix it, as it seems to only occur in the editor, and doesn't affect in game performance memory usage / performance in any way.

    Regards,
    unikron


  4. Location
    Newcastle upon Tyne, UK
    Posts
    1,179
    Two things I've run into:

    Quote Originally Posted by Jodon View Post
    When you make a BMFont, I only usually include type-able characters (about 90 or so). When you enter that number into the number of characters field, you get a bunch of null accesses. You actually need to keep that value high, even though you're only using 90 characters. Reason being it appears to use a direct index which corresponds to the character you've typed, rather than doing something "more clever". So not sure why that value's exposed.
    You are right, this value shouldn't really be exposed, not as-is anyway. The only 2 values which should be allowed are 128 and 256, depending on whether you need a full ascii char set or not. I think we will simply disable that and store 256 characters internally, the overhead of that being negligible in the grand scheme of things. This will be removed in the next release, thanks for your feedback.

    Quote Originally Posted by Jodon View Post
    The second thing I've run into is a bunch of null accesses when somehow the Sprite data gets corrupt. The SpriteId of one of my Sprites was -1 somehow (we're using SVN here, so not sure if a bad checkin had something to do with it, but the data was all there). You'll know you've run across this error when your Inspector refuses to render correctly. The way to alleviate this problem is to change your Inspector to Debug mode, then change the values, then back to Normal mode.
    We had this happen once on our game, and that was when we were undergoing major restructuring renaming all the classes before we released 2d toolkit. It occurs when the sprite can't find the sprite collection (eg. when it loses metadata). We thought it was improbable that this could happen when not doing crazy things like we were, but thinking about it, it could really happen if SVN somehow messed up the metadata. We will try to add some code to catch this case and fix it for the next update.


    UPDATE: Both of these have now been resolved and will be in the 1.02 update.



    Quote Originally Posted by Jodon View Post
    Other than that, I really like the workflow and the price. Very reasonable, made the purchase a no-brainer.
    Glad you like it.

    unikron
    Last edited by unikron; 06-26-2011 at 03:14 PM.


  5. Posts
    46
    Hi,
    Quote Originally Posted by unikron View Post
    Could you explain this in more detail? Do you mean to the sprite or the textmesh (which already supports gradients)?
    I meant a square full of 1 color, I think i can explain it better by saying how i usually do it (in all engines, but still didn't try it with tk2d)

    I would usually make a 1x1 white pixel, & then tint it with the color I want & resize it to whatever i want it to be.
    therefore, I get a solid color square of whatever size/color I want.

    in Unity, I noticed that it would need to set the filter mode to point before i can actually use it, otherwise, it'll be blurred out.

    anyway, it's not that important, but it'll make life easier for anybody who'd need a square filled with a solid color.


  6. Location
    Newcastle upon Tyne, UK
    Posts
    1,179
    Quote Originally Posted by nab477 View Post
    Hi,


    I meant a square full of 1 color, I think i can explain it better by saying how i usually do it (in all engines, but still didn't try it with tk2d)

    I would usually make a 1x1 white pixel, & then tint it with the color I want & resize it to whatever i want it to be.
    therefore, I get a solid color square of whatever size/color I want.

    in Unity, I noticed that it would need to set the filter mode to point before i can actually use it, otherwise, it'll be blurred out.

    anyway, it's not that important, but it'll make life easier for anybody who'd need a square filled with a solid color.

    You can actually do that with 2d toolkit with or without filtering enabled. Try the following steps:
    1. Create a while 1x1 pixel texture and add it to your sprite collection
    2. Create a sprite and set it to use your texture, change the scale on the sprite accordingly. You can now tint your white square.

    You will notice that the edges are blurred, as it filters outward to transparent. You can change that behaviour by:
    1. Select your sprite collection, click edit
    2. Find your texture, set Pad to "Extend"
    3. Click commit.

    You should now have a solid colored box in your scene.

    You can easily change this to support gradients, look into the TextMesh implementation for how its done in there. We won't be adding that as a feature, as it is fairly specific and will add additional overhead to the system. If you are implementing this, we suggest you create copy of the tk2dSprite class and go from there, ideally storing it outside the tk2d directory structure, so you don't have any issues with upgrades later.


    unikron


  7. Posts
    92
    Actually, I've run into a major issue. The sprite collections don't persist over multiple launches. I can generate the Sprite Data, then I can go to a command prompt, do a "touch data" (to renew the data), then Unity detects a change and reloads the data. The spriteDefinitions come in as length 0. This seems to indicate the tk2dSpriteDefinition does not get serialized properly. I'll have to dig into it to figure out why that is, but that's the behaviour I'm experiencing.

    Unfortunately that's a deal breaker for me as I can't actually use the library to create levels yet.


  8. Location
    Newcastle upon Tyne, UK
    Posts
    1,179
    Quote Originally Posted by Jodon View Post
    Actually, I've run into a major issue. The sprite collections don't persist over multiple launches. I can generate the Sprite Data, then I can go to a command prompt, do a "touch data" (to renew the data), then Unity detects a change and reloads the data. The spriteDefinitions come in as length 0. This seems to indicate the tk2dSpriteDefinition does not get serialized properly. I'll have to dig into it to figure out why that is, but that's the behaviour I'm experiencing.

    Unfortunately that's a deal breaker for me as I can't actually use the library to create levels yet.
    What do you mean by "touch data"? I will PM you my email address, it'll be easier to continue there.

    Resolved The problem has been resolved, it was related to the other issue Jodon was having with sprite data getting corrupted.

    This fix will be included in 1.02 some time this week.
    Last edited by unikron; 06-26-2011 at 04:11 PM.


  9. Posts
    92
    Just thought I'd update the thread in case others are reading / experiencing the issue:

    Unikron was able to solve the issue for me. It will be fixed through code in the next release. In the meantime, the bug appears when you corrupt your Sprite Collections. Make sure to fix-up all your SpriteCollections so no "null accesses" occur in the console before you re-commit your SpriteCollections. You can right-click on your SpriteCollection_Data/data.prefab file and click "Re-import" to see if it's correct or not. Fix-up all your Sprite Collections / Animations so no SpriteId is set to "-1". You can do that in Inspector Debug mode.

    Cheers and thanks Unikron!


  10. Posts
    46
    suggestion: please make better documentation !!
    especially in regards to the API & how to build things using script

    my current situation:
    I'm trying to build a framework for myself & it'll be all in code,
    so, I'm struggling with how to create a sprite from code

    so far, I created a gameobject, added a tk2dSprite

    then tried to call SwitchCollectionAndSprite(resourceSpriteCollection .spriteCollection, 0)
    & it gives me an error NullReferencException in tk2dSprite line 101

    even tried adding the MeshRenderer & MeshFilter before calling it, still the same result !!

    can you consider having a tutorial for creating sprites by code please ?


  11. Location
    Newcastle upon Tyne, UK
    Posts
    1,179
    We can certainly do that. We didn't envisage anyone creating sprites from code like that, though, which is why we didn't bother documenting it apart from the (few) comments in the codebase. We documented the few functions we actually envisaged people using, i.e. changing color, spriteId, scale, etc. once the sprite has been set up.

    When we need to do something like that, we usually create a prefab and instantiate that. That way, we get the benefit of being able to visually set up the sprite, and not have to hard code any strings (to find texture names, etc) in code. Please do consider setting it up like that, otherwise send us a PM and we'll send you some code on creating a sprite in script.

    Regards,
    unikron


  12. Location
    Newcastle upon Tyne, UK
    Posts
    1,179
    Version 1.02 has been accepted to the Asset Store!

    Changelist:
    - Bug fix: sprite Id fix for when data is corrupted
    - Bug fix: unable to create sprite collection in project root
    - Hidden number of characters on the font. This shouldn't have been visible in the first place.
    - Added new animation demo

    unikron


  13. Posts
    46
    actually that does make sense

    I refactored & rearranged the code to use prefabs instead & it's working as it was intended to be.

    thanks for the help


  14. Posts
    92
    Hello again! I have two feature requests:

    1. Multi-line text. So when it encounters \n or the shift-enter trick in the editor, it will drop to the next line.
    2. When it generates the atlases, the ability to configure no-mipmaps (or have that be the default, since it's targeted for 2d games). I also find mipmap blending to be useful for certain mipmaps that scale poorly, but I generally use no mipmaps. I can always just change the code myself I guess, but I figure new users might find that their newly made sprites don't scale well.


  15. Location
    Newcastle upon Tyne, UK
    Posts
    1,179
    Thanks for bringing that issue up though, we never thought anyone would use it like that. I will add some notes in the documentation on this for the next update.


  16. Location
    Newcastle upon Tyne, UK
    Posts
    1,179
    Quote Originally Posted by Jodon View Post
    Hello again! I have two feature requests:

    1. Multi-line text. So when it encounters \n or the shift-enter trick in the editor, it will drop to the next line.
    2. When it generates the atlases, the ability to configure no-mipmaps (or have that be the default, since it's targeted for 2d games). I also find mipmap blending to be useful for certain mipmaps that scale poorly, but I generally use no mipmaps. I can always just change the code myself I guess, but I figure new users might find that their newly made sprites don't scale well.
    1. Multi line is easy enough to implement, we'll get it in the next update.
    2. You can go and change the texture properties once its created it the first time, use the "Atlas Texture" shortcut on the Sprite Collection. Also compression is enabled by default, you may want to turn that off too.

    Regards,
    unikron


  17. Posts
    160
    I was really impressed by the videos and the workflow, it is almost perfect for me, so even when I have sprite manager, for sure I will purchase this product!

    One Question:
    I want to use a very big BG. The general idea is that it will load and unload the BG areas based on camera position. the question is, I can instantiate sprites from code?

    Thks, a fantastic product.


  18. Location
    Newcastle upon Tyne, UK
    Posts
    1,179
    Quote Originally Posted by aigam View Post
    I was really impressed by the videos and the workflow, it is almost perfect for me, so even when I have sprite manager, for sure I will purchase this product!

    One Question:
    I want to use a very big BG. The general idea is that it will load and unload the BG areas based on camera position. the question is, I can instantiate sprites from code?

    Thks, a fantastic product.
    You can instantiate sprites from code, but that isn't documented. The recommended way to do this is to create a prefab and instantiate that. That way you can set up a sprite visually, or a static sprite batcher, and instantiate that instead of doing it entirely in code. Send us a pm if this won't work for you and we will get you some code to do this.

    Unikron


  19. Posts
    14

    Problem

    Hi, i'm purchased this feature, but now i have a problem, a bug. When i tried to make a new Sprite Animation in the Project View, don't show me the options to choose the sprites collection. I wan't to know how to resolve that.

    Thanks.


  20. Location
    Newcastle upon Tyne, UK
    Posts
    1,179
    Hi,

    I need more info, will continue in PM.

    Unikron

Page 2 of 126 FirstFirst 12341252102 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •