InstantiateSystem.cs 579 B

12345678910111213141516171819
  1. using UnityEngine;
  2. namespace Blue
  3. {
  4. public class InstantiateSystem : SingletonMonobehaviour<InstantiateSystem>
  5. {
  6. [SerializeField] private BlueObject blueObject;
  7. public BlueObject BlueObject => blueObject;
  8. public GameObject InstantiatePrefab(GameObject prefab, GameObject parent = null)
  9. {
  10. return Instantiate(prefab, parent.transform);
  11. }
  12. public GameObject InstantiatePrefab(GameObject prefab, Transform parent = null)
  13. {
  14. return Instantiate(prefab, parent);
  15. }
  16. }
  17. }