unity-networking

Unity Networking - Multiplayer Game Development

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "unity-networking" with this command: npx skills add creator-hian/claude-code-plugins/creator-hian-claude-code-plugins-unity-networking

Unity Networking - Multiplayer Game Development

Overview

Multiplayer networking for Unity using Netcode for GameObjects, Mirror, or Photon frameworks.

Foundation Required: unity-csharp-fundamentals (TryGetComponent, FindAnyObjectByType, null-safe coding)

Core Topics:

  • Client-server architecture

  • State synchronization

  • Lag compensation

  • RPC (Remote Procedure Calls)

  • Network variables

  • Matchmaking

Quick Start (Unity Netcode)

using Unity.Netcode;

public class Player : NetworkBehaviour { private NetworkVariable<int> mHealth = new NetworkVariable<int>(100);

public override void OnNetworkSpawn()
{
    if (IsOwner)
    {
        // Only owner can control
        HandleInput();
    }

    mHealth.OnValueChanged += OnHealthChanged;
}

[ServerRpc]
void TakeDamageServerRpc(int damage)
{
    mHealth.Value -= damage;
}

[ClientRpc]
void ShowDamageEffectClientRpc()
{
    // Visual feedback on all clients
}

}

Network Architecture

  • Authoritative Server: Server validates all actions (competitive)

  • Client Authority: Clients control own entities (cooperative)

  • Relay Servers: NAT traversal for peer-to-peer

  • Dedicated Servers: Professional hosting

Synchronization Patterns

  • Transform Sync: Position, rotation interpolation

  • Network Variables: Automatic state replication

  • RPCs: Remote method calls

  • Ownership: Who can modify what

Reference Documentation

Netcode for GameObjects Fundamentals

Core networking concepts:

  • NetworkManager setup and configuration

  • Client-server architecture patterns

  • State synchronization and RPCs

Best Practices

  • Server authority: Prevent cheating

  • Client prediction: Smooth movement

  • Interpolation: Handle lag gracefully

  • Bandwidth optimization: Delta compression

  • Test with network simulation: Latency, packet loss

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

unity-unitask

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

csharp-code-style

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

csharp-xml-docs

No summary provided by upstream source.

Repository SourceNeeds Review