LethalCompany/Lethal Company/ExportedProject/Assets/Scripts/Assembly-CSharp/SyncWithServerOnSpawn.cs
2023-12-22 18:30:10 -05:00

37 lines
636 B
C#

using Unity.Netcode;
using UnityEngine;
public class SyncWithServerOnSpawn : NetworkBehaviour
{
public RoundManager roundManager;
private bool hasSynced;
private void Start()
{
}
public void SyncWithServer()
{
if (!base.IsServer)
{
Object.Destroy(base.gameObject);
return;
}
NetworkObject component = base.gameObject.GetComponent<NetworkObject>();
if (component != null)
{
component.Spawn(destroyWithScene: true);
}
}
protected override void __initializeVariables()
{
base.__initializeVariables();
}
protected internal override string __getTypeName()
{
return "SyncWithServerOnSpawn";
}
}