Lecture: Argon Assault Unity 3D (103)
I added Parent Fx Clone to the script and hit override. The Section that I changed does not override the originalprefab and remains bold. I had to drag and drop the GameObject onto each enemy. I checked to see if my duplicates are all connected and each one is connected to the original.
NOTE: I tried Prefabing the EnemyClones and it still does not work.
public class Enemy : MonoBehaviour
{
[SerializeField] GameObject EnemyDeathFX;
[SerializeField] Transform parentFxClone;
private void Start()
{
colliderSettings();
}
private void colliderSettings()
{
Collider enemyCollider = gameObject.AddComponent<BoxCollider>();
enemyCollider.isTrigger = false;
}
public void OnParticleCollision(GameObject other)
{
GameObject fx = Instantiate(EnemyDeathFX, transform.position, Quaternion.identity);
fx.transform.parent = parentFxClone;
Destroy(gameObject);
}
}