A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.unity3d.com/Manual/../ScriptReference/../Manual/object-oriented-development.html below:

Unity - Manual: Object-oriented development

Object-oriented development

Traditional Unity projects are grounded in object-oriented design principles and programming philosophy, which is centered around objects, their properties and functions, and the relations between these objects. Code is organized around GameObjectsThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
See in Glossary
whose behavior is controlled by attached MonoBehaviour componentsA functional part of a GameObject. A GameObject can contain any number of components. Unity has many built-in components, and you can create your own by writing scripts that inherit from MonoBehaviour. More info
See in Glossary
. In general, these MonoBehaviour components encapsulate logic (methods) and data (fields) together, which can be convenient but can have performance issues at scale.

An alternative to object-oriented development is data-oriented development, which is both a design philosophy and a set of technologies that help you implement that philosophy. This approach stresses a clear separation between code and data to maximize CPU cache efficiency and parallelism. Instead of MonoBehaviours, the Entity Component System (ECS) architecture uses components for data, and systems for logic. The data-oriented approach offers strong performance advantages at scale but can be more challenging for inexperienced developers to learn.

Object-oriented and data-oriented development are not mutually exclusive and you can combine elements from both. For information on data-oriented development, refer to Unity’s Data-Oriented Technology Stack.

Topic Description Fundamental Unity types Understand some of the fundamental C# types that Unity provides and their special significance and behavior in the Unity Editor and runtime. Managing update and execution order Understand the order in which Unity executes your script components and the lifecycle callbacks within those scriptsA piece of code that allows you to create your own Components, trigger game events, modify Component properties over time and respond to user input in any way you like. More info
See in Glossary
during the runtime application loop. Managing time and frame rate Understand how Unity measures time so you can manage the rate at which time passes in your application and ensure values update according to the appropriate time scale. Handling events Make your application responsive to events such as user input, object collisionsA collision occurs when the physics engine detects that the colliders of two GameObjects make contact or overlap, when at least one has a Rigidbody component and is in motion. More info
See in Glossary
, and physics and rendering updates. Split tasks across frames with coroutines Split the execution of a task synchronously across multiple scenesA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary
with coroutines. This can be useful for tasks that should progress gradually over several frames, such as a fade out effect. Interacting with web servers Use the UnityWebRequest system to allow your application to interact with a web server via HTTP. Adding functionality to objects at runtime Use the Unity Properties API to implement a visitor design pattern and add new operations to .NET objects at runtime. Programming with mathematics Use Unity’s mathematical APIs to apply trigonometric, logarithmic, and other functions in your application, move objects with vectors, and generate random values. Additional resources

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4