Unity Games

Instructions on building Unity Games

Spawning a GameObject in Unity 2D

In the following example, we will be spawning a sprite image of a turtle into the game. ################################using System.Collections;using System.Collections.Generic;using UnityEngine; public class TurtleSpriteScript : MonoBehaviour{    private void OnTriggerEnter2D(Collider2D collision)    {        if…

How to Add Scores to a Game in Unity 2D

2. Create a C# Script (MonoBehaviour) and change name to ScoreScript.cs. This script will be responsible for displaying the new score value. See example below: ############################## using UnityEngine;using UnityEngine.UI; public class ScoreScript…