The countdown timer in the game is an important mechanic in the game. This timer works in HH:MM:SS format. Steps Create script Timer.cs Attach script to object with Text Mesh Pro. Result Download
Merging objects is a way to simplify your designs and reduce CPU usage when you need to quickly create and destroy new objects. Steps Create script ObjectPool.cs Create script Enemy.cs Add an object to the scene that will be an enemy. Create empty object and attach script ObjectPool.cs Result Download
How to move an object in a unit? This example shows different ways to move. Transform.position The world space position of the Transform. The position property of a GameObject’s Transform, which is accessible in the Unity Editor and through scripts. Alter this value to move a GameObject. Get this value to locate the GameObject in ... Read More
Character controller with animations – walk, run, jump. Steps Create script FirstPersonCharacterController.cs Create script MoveCamera.cs Create script Key.cs Import character with rig in Unity. I will use a character and animation from https://www.mixamo.com/ Press on character, select rig tab. Avatar Definition select “Create This From Model” and press applay. Create Animator Controller and customize it ... Read More
In most games, it is desirable to interrupt the game at some point in order to do something else, such as taking a break or changing options. Steps Create script Pause.cs Create canvas in it create empty object add text. Add script Pause.cs to Pause obejct. Select key to pause, default key is escape. Result ... Read More
How to enable and disable components via script Steps Create script EnableAndDisableComponent.cs Add script to game object. Press Play and press key F to enable/disable box collider. Result Download
Destruction of game objects is an important element in the game. Killing the enemy, destroying the object to avoid the accumulation of debris in the scene. Steps Create script DestroyObject.cs Add script to gameobject. Press Play, the game object will be destroyed Result Download
The top down camera is used in games such as Civilization, Warcraft 3, XCOM, TAVERN MASTER, PRISON ARCHITECT, etc.d Steps Create script TopDownCamera.cs Add script to top down object and move Main Camera to the object Result You can use keyboard or mouse to control Download