Unity Community |

simply awesome, very generous of you. I love my Prime31 plugins!
all your neutron are belong to neutrinoless-double-beta-decay.... ;-)
psimek.com
@TaintedLemon, that should work just fine. You can use the getButtonForScreenPosition() method and if it returns something other than null ignore the touch and don't shoot off your ray.
Added a little note about the awesome animation system baked into UIToolkit to the main post...
Thanks !
I am starting to be a Prime31 fan! Thanks a lote Mike!
Amazing product. I would love to use it in my projects.
Thanks
Kamran
Not sure if this info makes sense here regarding implementing it in this GUI system, but I found a tutorial on how to apply a text to a texture of any 3D shape, in this example a mug. I wonder if this makes sense to use for showing score on a game object, since there is mention of some slowness of this method in the tutorial. If someone knows more about the possible slowness issue, and the usefulness of this method for frequently updated text, like a score, on a 3D surface, please comment.
http://blog.almostlogical.com/2010/0...ender-texture/
Looks awesome.
Small question, in this code example:
Code:
var playButton = UIButton.create( "playUp.png", "playDown.png", 0, 0 ); playButton.highlightedTouchOffsets = new UIEdgeOffsets( 30 );
Could the images also be referenced with an index, to avoid string creation (GC) and string lookups?
UniTile - 2d Tile-based Map Editor for Unity - now also available in the Asset Store.
My games :
- ReRave (for iOS and Arcade)
- Robin Hood - Archer of the Woods (published by Chillingo/Clickgamer)
- Pig Shot (published by Nexx Studio)
- Captain Ludwig
- Pinkvasion
- Deep
- iPigeon
@smag, you could assign the uvRect directly. Most controls have "raw" constructors that don't take in any strings. we purposely went with the string route though in order to keep the code readable, work across SD/HD and most importantly so the texture atlases can be totally rebuilt/modified at any time and still work with the same code. Those pesky tradeoffs...
This looks great - many thanks Prime31!
Not to go too off topic (maybe someone can point me to a seperate thread), but what's the problem with string creation / lookups, as mentioned by Smag?
I see the benefits of that, but if each image would get a number in the atlas, you could keep those benefits (except readability, but that can be solved by the user if they use enums). However, this would only work well if the TexturePacker keeps the order of the images in it's exported files consitant.@smag, you could assign the uvRect directly. Most controls have "raw" constructors that don't take in any strings. we purposely went with the string route though in order to keep the code readable, work across SD/HD and most importantly so the texture atlases can be totally rebuilt/modified at any time and still work with the same code. Those pesky tradeoffs...
Well, strings will increase the garbage that the garbage collector has to collect. So the more strings you use, the quicker the GC has to kick in, which can cause small hitches.
In this case however, most of these things will be setup at the start of your scene so it shouldn't be that big a deal.
UniTile - 2d Tile-based Map Editor for Unity - now also available in the Asset Store.
My games :
- ReRave (for iOS and Arcade)
- Robin Hood - Archer of the Woods (published by Chillingo/Clickgamer)
- Pig Shot (published by Nexx Studio)
- Captain Ludwig
- Pinkvasion
- Deep
- iPigeon
Thanks Smag.![]()
TexturePacker will reconfigure the order depending on the new sprites added to best fit the setup. Believe me, I tried every way possible to go without string creation and the cost of making a few strings at startup outweighed every other option. They all required some post or pre processing which just isn't worth the extra work. Letting the GC do it's job and collect some strings at startup and keeping a nice, simple workflow far outweighed the alternatives.I see the benefits of that, but if each image would get a number in the atlas, you could keep those benefits (except readability, but that can be solved by the user if they use enums). However, this would only work well if the TexturePacker keeps the order of the images in it's exported files consitant.
Fantastic! Brilliant idea!
I've co-run an open source project for many years now (www.delta3d.org), so I've been where you're about to go. It is a really enjoyable process - one that can lead to many opportunities, is personally satisfying, and is at the same time very challenging. One of the neatest thing about a project like that is when you start getting user submissions and even better, major adopters/users/partners.
I haven't used GIT yet, but I guess now is as good a time as any to learn it.
Gigiwoo
@Gigiwoo, sounds like you have some work to do. Here is your todo list:
1. grab yourself a copy of Gitbox (free) or Tower (paid but really nice)
2. make the container objects you were asking about previously
3. send over a pull request
I'm currently experimenting about GUI solution for mobile development. You've come at the right time.
Thank you very very much for this awesome release!!!
This prime guy is the number one, once again a really complete solution and this time for free![]()
http://www.eskemagames.com iOS freelance
Looks like an outstanding start Prime! Downloaded the files this morning and looking forward to experimenting with your system and to the Container addition you're working on!
Thanks again!
AF
------
The right answer is usually the one that gets the job Done!
This is a nice feature - to be able to embed font bitmaps in a texture atlas! very coolAdd the exported bitmap font png to your texture atlas in Texture Packer and you are good to go, just be sure the image name is the same as the .fnt filename.
Very nice work! One question guys does this GUI system works on Android (I did not tested on Iphone yet)