Unity Tutorials and Solutions

How to save and load a bool variable with PlayerPrefs in Unity

Introduction We’re going to see how to store bools in Unity using the PlayerPrefs class, then we’ll see how to load those bool values. This can be useful to save game states, for example if the player has already done some action. How to save a bool with PlayerPrefs PlayerPrefs doesn’t have a function to …

How to save and load a bool variable with PlayerPrefs in Unity Read More »

How to save and load a float variable with PlayerPrefs in Unity

Introduction We’re going to see how to store floats in Unity using the PlayerPrefs class, then we’ll see how to load those float values. This can be useful, for example, to save configuration parameters that has decimal values. How to save a float with PlayerPrefs To save a float in Unity using PlayerPrefs we’ll use …

How to save and load a float variable with PlayerPrefs in Unity Read More »

How to save and load a String with PlayerPrefs in Unity

Introduction We’re going to see how to store Strings in Unity using the PlayerPrefs class, then we’ll see how to load those Strings. This can be useful, for example, to save the player’s name in memory. How to save a String with PlayerPrefs To save a String in Unity using PlayerPrefs we’ll use the static …

How to save and load a String with PlayerPrefs in Unity Read More »

How to save and load an integer with PlayerPrefs in Unity

Introduction We’re going to see how to store integers in Unity using the PlayerPrefs class, then we’ll see how to load those integers. This method will be useful for example to save the score in Unity, if that score is represented by an integer number of course. How to save an integer with PlayerPrefs To …

How to save and load an integer with PlayerPrefs in Unity Read More »

Difference between Update and FixedUpdate in Unity

Introduction In this article we will analyze the execution of a simple program to understand what are the differences between Update and FixedUpdate in Unity. To see these differences I set up a simple Unity scene with two cubes and some programming scripts, you can download the Unity package in this article. Downloadable Unity Package …

Difference between Update and FixedUpdate in Unity Read More »

activar botones e interruptores en unity

Basic Interaction System for First Person Character

Introduction Here is a solution for a First Person Player to activate buttons, switches, levers and more in Unity. The solution consists of three Scripts that interact with each other to solve the detection of the interactive elements and their activation. In addition, two Scripts are provided as examples to achieve what is observed in …

Basic Interaction System for First Person Character Read More »

unity como mover al personaje haciendo clic en el escenario, solucion para descargar

Move the Character with Mouse, Point and Click – Unity Solution

Introduction This solution consists of a way to control Standard Assets’ artificial intelligence prefab, Ethan, by clicking on the stage. By right clicking the character will walk to the indicated position and if double clicking, the character will run to the indicated position. Download Unity Package IMPORTANT When importing the package you must bake the …

Move the Character with Mouse, Point and Click – Unity Solution Read More »