public static void OnPositionListener() { if (message == null) { return; } if (message.type != MessageType.Position) { return; } var m = message; message = null; PositionMessage positionMessage = JsonUtility.FromJson <PositionMessage>(m.message); MultiplayerStatic.UpdatePositionById(positionMessage.id, positionMessage.name, positionMessage.position); }
} // Debug public static void SendPositionDebug(string name, PositionStructure structure) { structure.z += 2f; MultiplayerStatic.UpdatePositionById("1", "Ratto", structure); }