Advanced Concepts

Learn the advanced concepts of scripting in Unity.

Unity provides tools and workflows tailored to game development, such as a visual editor for creating GameObjects and scenes, physics simulations, and support for various platforms. Additionally, Unity uses a component-based system for GameObject behavior. Unlike traditional inheritance-based systems used in other frameworks, each GameObject can have multiple components that define its behavior. Now, we’ll cover some other ideas that will aid us in developing a holistic game.

Multi-frame tasks

The lifespan of an event handler begins with the event’s invocation and ends when the method returns. Therefore, the lifespan of the handler is bound by the next frame to be rendered. However, some tasks demand that the execution of the method should persist across the frame.

Let’s say that we have a method that iteratively increases the size of a GameObject:

Get hands-on with 1200+ tech skills courses.