
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…