fishbait/UnityProject/Assets/FishNet/Runtime/Utility/Extension/Object.cs
NIMFER bf403a8f97 Ducktaped together a FishNet version of the Transport
Ducktaped together a FishNet version of the Transport, now I need to edit the LoadBalancer and Server so it connects and actually trades information
2022-08-14 03:55:25 +02:00

28 lines
No EOL
772 B
C#

using FishNet.Connection;
using FishNet.Object;
using UnityEngine;
namespace FishNet.Utility.Extension
{
public static class ObjectFN
{
/// <summary>
/// Spawns an object over the network using InstanceFinder. Only call from the server.
/// </summary>
public static void Spawn(this NetworkObject nob, NetworkConnection owner = null)
{
InstanceFinder.ServerManager.Spawn(nob, owner);
}
/// <summary>
/// Spawns an object over the network using InstanceFinder. Only call from the server.
/// </summary>
public static void Spawn(this GameObject go, NetworkConnection owner = null)
{
InstanceFinder.ServerManager.Spawn(go, owner);
}
}
}