public static GameObject InstantiatePrefab(this GameObject prefab, Vector3 position, Quaternion rotation) { if (prefab == null) { return(null); } PersistentIgnore persistentIgnore = prefab.GetComponent <PersistentIgnore>(); if (persistentIgnore != null) { return(persistentIgnore.InstantiatePrefab(prefab, position, rotation)); } return(UnityObject.Instantiate(prefab, position, rotation)); }