hi guys. Which do you think is more performing for update method?
update(){
if(shouldIRunTheFunction)
theFunction();
}
or
List<Action> functions = new List<Action>();
update(){
foreach (Action func in functions)
func();
}
//when i need to run function in every frame
functions.Add(theFunction);
//when the function is not necessary
functions.remove(theFunction);
or i can use the for loop at the "action list" codes