-
Heine, Eric R authored
Added a component for firing game events on Unity Start and added the ability to delay firing Unity Events when a Game Event is being listened to.
Heine, Eric R authoredAdded a component for firing game events on Unity Start and added the ability to delay firing Unity Events when a Game Event is being listened to.
StartEventSender.cs 298 B
using UnityEngine;
namespace Shared.ScriptableVariables {
// Fires the supplied GameEvent on Start()
public class StartEventSender : MonoBehaviour {
[Tooltip("Game Event to fire on start")]
public GameEvent startEvent;
void Start() {
startEvent?.Raise();
}
}
}