I was wondering what is more fast among Update Function and loop.
For e.g.
I have a big code in block { very big code } which will be executed on 100 Enemy each.
- Case Update function :
Each Enemy will have there own running update function and in each of enemy { very big code } will be executed .
- Case Loop :
Update() { // one unique Update for ( var i = 0 ; i < TotalEnemys ; i++) { Enemys[i] = { very big code } ; } }
Now , which one of case will be best ?
I Asked this question because ,
” In Unity when 100 gameobjects are instantiated each have there own update function which keeps updating , i previous also started using few other html5 gaming frameworks since i needed more performance over browser since unity webgl still lacks lots things . When i tried few frameworks i found that it only had one unique update functions for all game stuff”
I know its seriously idiotic question but still curious .
By the way do someone thinks that there should be a “Just Curious” Topic ?