The player particles aren’t playing when I hit something with my ship… but it will print to the console.
CollisionHandler.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement; // ok as long as this is the only script that loads scenes
public class CollisionHandler : MonoBehaviour
{
[Tooltip("In seconds")] [SerializeField] float levelLoadDelay = 1f;
[Tooltip("FX prefab on player")] [SerializeField] GameObject deathFX;
void OnTriggerEnter(Collider other)
{
StartDeathSequence();
deathFX.SetActive(true);
print(deathFX);
Invoke("ReloadScene", levelLoadDelay);
}
private void StartDeathSequence()
{
SendMessage("OnPlayerDeath");
}
private void ReloadScene() // string referenced
{
SceneManager.LoadScene(1);
}
}