Untitled
unknown
csharp
5 months ago
426 B
37
Indexable
using UnityEngine; // This is a simple example of how to spawn an enemy - Gatsby public class MonsterSpawner : MonoBehaviour { public GameObject enemyPrefab; void Update() { if (Input.GetKeyDown(KeyCode.E)) { SpawnEnemy(); } } void SpawnEnemy() { Instantiate(enemyPrefab, gameObject.transform.position, Quaternion.identity); } }
Editor is loading...
Leave a Comment