Tips and Tricks

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 »

unity quaternion

Unity Quaternion

Tips and Tricks: Unity Quaternion Introduction Turning and rotating are pretty common aspects in a game. Players will rotate to look at things, enemies will turn to attack the player, and sometimes things will spin around when launched through the air. Knowing how to rotate things when making games in Unity is key to creating …

Unity Quaternion Read More »

unity color32

Unity Color32

Tips and Tricks: Unity’s Color32 Introduction Unity’s Color32 takes a 32 bit RGBA value and converts it into a color. Giving you more precision when setting the colors in your game. Each RGBA value has a min value of 0 and a maximum value of 255. This allows for greater control over your color value …

Unity Color32 Read More »