Unity – Unity By Example

How to Convert Numbers to Letters in Unity

Converting numbers to text can be useful in various situations, especially in game development. In Unity, for example, converting numbers to a word representation can be used for displaying the quantity of game resources, scores, levels, time, etc. It can also be helpful for creating customizable interfaces where numbers need to be displayed in words. ... Read More

Using NavMeshAgent in Unity

NavMeshAgent is a component in Unity 3D that provides automatic pathfinding for game characters based on a navigation mesh. This component allows you to create “smart” characters that can automatically move towards a specified point, avoiding obstacles in their path. Steps After completing all the steps, you should see blue boundaries where the player can ... Read More

How to Save a Game After Minimizing The Application

Saving game progress is an important aspect of any game. However, when a user minimizes a mobile application, they can potentially lose their saved data. In this context, game developers should use appropriate methods to save the game after the application is minimized to prevent the loss of game progress and provide a better gaming ... Read More

Creating a Day and Night Cycle in Unity

Unity 3D provides a multitude of options for creating interactive game environments, including the ability to simulate a day and night cycle. This effect can enhance the realism and atmosphere of the game, evoking different emotional responses from players. There are several techniques for implementing the day and night cycle in Unity 3D, such as ... Read More

How to Make a Settings Menu in Unity

Steps Create script SettingsMenu.cs Create script ScreeMode.cs Create Canvas, set Custom Scaler > Reference Resolution like your screen size. Create an empty object on the Canvas. Add Component Vertical Layout Group and attach script SettingsMenu.cs. Create an empty object with Text and Dropdown. Result Download

How to Make Smooth Camera Follow in Unity

Smooth camera follow in Unity. Often found in games, it adds a beautiful effect of moving the character with the help of Lerp. Steps Create script SmoothCameraFollow.cs Add script to the Main Camera. Result Download

How to Make a Simple Dialogue System in Unity

Dialogues in games are interesting mechanics for interacting with the environment Steps Create script Dialogue.cs Create script DialogueManager.cs Create two Text Mesh Pro. First for name, second for dialogues Create empty object and attach script DialogueMananger.cs Press the space bar to go to the next dialog Result Download

How to Make Health Bar in Unity

The health bar is suitable for determining the amount of health of enemies or the main character. The health bar changes color depending on the amount of health to green, yellow, red. Steps Download

How to Make Loading Bar in Unity

The loading bar is a convenient visual design for determining how much is left to load the game Steps Create script LoadingBar.cs Create two scenes Loading and Main Add two scenes to Scene is Build File > Build Settings > Add Open Scenes Create a Slider customize to your taste. Add to Text Mesh Pro ... Read More