r2mods/ilspy_dump/ror2_csproj/RoR2/StartEvent.cs

21 lines
300 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
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();
}
}
}