Spawn and Despawn

In ObjectNet, spawning and despawning are essential operations for managing networked objects across all connected clients. These features ensure that when objects are created or destroyed, the changes are synchronized across the entire multiplayer session.

Spawning and Despawning only applies to registered NetworkObjects to spawn a normal object across the network use Rpc's Network Methods

Automatic Prefab Detection

ObjectNet automatically detects when a NetworkObject is created on the server. Once the object is instantiated on the server, it sends a notification to all connected clients to spawn the same object, ensuring synchronization across the network.

This functionality is powered by the NetworkInstantiateDetection script, which is automatically attached to all NetworkObjects. This script handles the detection and communication process seamlessly, so you don’t need to manually manage synchronization for networked objects.