Quantcast
Channel: Multiplayer
Viewing all articles
Browse latest Browse all 16796

Networked object pool example for UNet HLAPI

$
0
0
Attached is an example of networked object pool for UNet. It uses custom spawn handler functions and has object pools on the host and clients.

Instances of the specified "Prefab" object are created at initialization time, and then used when spawn messages are recieved, so there is no run-time object allocation and destruction.

View attachment 162909

The pooled object are controlled by the server. Example usage in a player script:

Code (CSharp):
  1. using UnityEngine;
  2. using...
Networked object pool example for UNet HLAPI

Viewing all articles
Browse latest Browse all 16796

Trending Articles