Overriding Tick() Inefficiency

In most of the tutorials and examples I’ve seen, developers really like to override the Tick() function to change default behavior. However, since this is a function that gets called every frame, that seems horribly inefficient. Generally speaking shouldn’t there be a better place to override default behavior? Why is overriding Tick() the default for so many developers?

Many thanks,

Mason

Overriding tick is needed if you want to do stuff that execute every frame. If you want something to happen only once at actor start, you can override BeginPlay().

Overriding Tick() is common, since a lot of Actor NEED to be updated every frame (actor movement for example, if you want it to be smooth, a timer, lerp functions, etc).

If you want an actor to be updated every 2 frame, it’s alsopossible, either via using timers or with checks in the tick function.

I’m not sure I understand your question, because overriding tick is normal, you just have to make sure what you put in there really needs to be checked every frame.

I hope this answers your question.

That does answer most of my question. I’ve just noticed a number of people overriding Tick() for things that should only be done once. I wasn’t sure if there was some functionality in Tick() other than its call frequency that wouldn’t be available in something like BeginPlay(). Your response certainly confirms my suspicion that there are just plain bad developers out there :wink: