Unity networking library built on AWS lambda, Dynamodb and APIGateway websocket, written by Kevin Yang (MADKEV Studio)
- .Net 6.x
- Unity
AWS Code Contains functions responsible for communicating with DynamoDB, AWS Lambda and APIGateway as example
- Open up any example scene located inside MADNetworking/Examples
- Put your AWS APIGateway websocket connect url into [Websocket URl] field in NetworkManager
- Select your initialization option (auto start or by calling NetworkManager.Instance.StartManager()
- Play around with example Rock Paper Scissors game or view NetworkTransform example and NetworkBehavior example
- Youtube Game Examle: https://youtu.be/vnzcJQelot0
- To invoke a function across all clients, make sure your script inherits from NetworkBehavior, then call NetworkInvoke("FUNCTION_NAME", object[] parameters, bool includeOwner). If includeOwner = true, function will be invoked again on calling client
- NetworkIdentity.isLocalPlayer returns true for current local client that has authority, useful for player control scripts where only the object with authority should respond
- Attach NetworkTransform to any object you wish to sync transform with. Options to sync position, rotation, scale, and specify a sync interval (lower may be more accurate but cost on network usage)
- To spawn an object across all connected clients, use NetworkSpawn(GameObject object), make sure the prefab is registered to NetworkManager before spawning
- To spawn player, add player prefab to NetworkManager [Player Prefab] field