r2mods/ilspy_dump/ror2_csproj/RoR2/StartEvent.cs

21 lines
300 B
C#

using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Networking;
namespace RoR2;
public class StartEvent : MonoBehaviour
{
public bool runOnServerOnly;
public UnityEvent action;
private void Start()
{
if (!runOnServerOnly || NetworkServer.active)
{
action.Invoke();
}
}
}