21 lines
No EOL
409 B
C#
21 lines
No EOL
409 B
C#
using UnityEngine;
|
|
|
|
namespace KitsuneCafe.System
|
|
{
|
|
public class SpawnPrefab : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private GameObject prefab;
|
|
|
|
public void SpawnAt(Vector3 position)
|
|
{
|
|
Instantiate(prefab);
|
|
prefab.transform.position = position;
|
|
}
|
|
|
|
public void Spawn()
|
|
{
|
|
SpawnAt(transform.position);
|
|
}
|
|
}
|
|
} |