CPMStar Ad

Naughty Who @ indiedb

Friday, April 11, 2014

[unity] API #gamedev


While working with Unity API I noticed a couple of small details, which can complicate your life if you're not quite ready for them.

1. The fact that there's no such simple function like stop the animation while you're working with animated objects (Unity 4.3) was most surprising. Fulfilling this mechanism requires some workaround, for example, you can set the playing speed at 0.  Shame on Unity J

2. It also turned out, that you cannot find out the name of the animation, which is played on the object at the moment. I had to write my own lisp for memorizing that.

GUI was and still is difficult for me, as there are many ways of creating it and none of them is perfect (at least it seems so so far). Meanwhile I realized the main part of the interface on a standard class GUI, however it has a couple of defects there too.

3. There's no parameter, which could allow to block the editing possibility in TextArea. Of course, you can use Label instead of TextArea, but they could have finished doing such a small thing

4. For today the line spacing control isn't realized and that's a big disadvantage of GUI, more workabout: you need to draw separate labels or change the fonts – shame on Unity once more)

5. The evenness of the image ofted depends from the war with DrawCall. From experience with Starling – half of this task was was solved through merging the textures into a texture atlas. After studying API I found a function like GUI. DrawTextureWithTexCoords, basically it's meant for drawing textures from such atlases, but unfortunately it does not reduce their amount and each call += DrawCall.

Hope it helps :)

No comments:

Post a Comment