Hi,
I spend the last days searching for new optimization methodes. Now I have a few Ideas and questions about optimizing (iphone projects) - maybe soeone of you has experience with the following things and could share some hints :).
1.“simply animations” - for example i would like to rotate a object (let me say a coin in a j&r game) I could do this in 2 ways:
first I use the animation timeline and I set 2-3 nodes with rotation and the animation parameters on loop = the coin will rotate.
second I write a script like this:
Transform myTransform;
public Vector3 rotationSpeed = Vector3.zero;
void Start()
{
myTransform = this.transform;
}
void Update()
{
myTransform.Rotate(rotationSpeed * Time.deltaTime, Space.Self);
}
the question is - what is better? using one “update call” or the timeline ![]()
-
the scripts are not as fast as native code (even if they are compiled into some sort of native code)… anyway I had the idea(but no objective C skill to test it
) - to write some code in o.C and then calling it from the scripts. for example - “swarms” in a game - at 20 moving units the iphone simply dies
(because of the scripts not graphics) the thing is what about doing such a thing: the objective C code handels the movement,collision and so on - and returns simply a list of transforms (or only positions) for my units? -
physics… how does unity handels physic optimizations? it is better to have one big level mesh for the collision or a lot short collision meshes, where I can turn on/off the collision for distant places?
that is all at this moment ![]()
with best regrads
Sim