Tips and Tricks

Unity Remove Components Attached to GameObjects

Tips and Tricks: Remove Components Attached to GameObjects in Unity Introduction Using the power of components to drive game design is what makes developing with Unity so flexible and easy to use. Building around singular behaviors and reusing them across your game makes for better code that is easy to understand. There are tons of …

Unity Remove Components Attached to GameObjects Read More »

unity getcomponent

Unity GetComponent for Accessing, Storing, and Modifying Components

Tips and Tricks: Unity GetComponent for accessing, storing, and modifying the behaviors of your objects Introduction Unity’s GetComponent method is probably the most commonly used method you will need outside of the lifecycle event methods. GetComponent retrieves a component that is attached to a GameObject and returns the component and all of its current properties. …

Unity GetComponent for Accessing, Storing, and Modifying Components Read More »

unity addcomponent

Using Unity AddComponent to Modify Objects in Your Game

Tips and Tricks: Using Unity AddComponent to Modify the Properties of Objects in Your Game Introduction Unity’s AddComponent method is extremely useful in scenarios where building a prefab is not possible. AddComponent adds custom classes or any of Unity’s provided components to your GameObjects while the game is running. There are a few ways to …

Using Unity AddComponent to Modify Objects in Your Game Read More »

unity lerp

Unity Lerp

Tips and Tricks: Unity Lerp Introduction Using Unity’s Lerp methods can be quite confusing and error prone if done incorrectly. Despite this they are a vital part of creating a game. Allowing for smooth movement and transitions between things like positions, rotations, and even colors. You may want to use a lerp to fade the …

Unity Lerp Read More »