I just discovered something that I wish I'd known a long time ago...
Referring to AnimationStates in an update loop, such as in the following code...
Code:
function Update () {
if (animation["idle"].weight == 1) {
// do stuff
}
}
... allocates massive amounts of memory each update. My first iPhone game ended up using this kind of logic quite a bit to determine animation behavior, when to play what clip, with what weight, etc. etc. Turns out it was causing the garbage collector to run overtime due to the fact that each time you use an animation state in this manner, you're burning memory. On the contrary...
Code:
var idle : AnimationState;
function Awake () {
idle = animation["idle"];
}
function Update () {
if (idle.weight == 1) {
// do stuff
}
}
...causes no runtime allocation. Just thought others might like to know.
B.I.G. Games: Review Sites - 0 views
9magnets.com's App Success Guide - 0 views
prMac - 0 views
Games Press: How to submit assets - 0 views
iSpreadNews.com - - 0 views
Tinyfund - TinyCo - 0 views
PhoneFinger | Wonder Warp Software - 0 views
Zombieville USA - performance hitches - 0 views
Gapless looping MP3 tracks - 0 views
Gapless MP3 playback? - 0 views
Sound FX | Reiner`s Tilesets - 0 views
‹ Previous
21 - 40 of 186
Next ›
Last »
Showing 20▼ items per page