← スキル一覧に戻る

unity-networking
by creator-hian
⭐ 3🍴 0📅 2026年1月15日
SKILL.md
name: unity-networking description: Implement multiplayer games with Unity Netcode, Mirror, or Photon. Masters client-server architecture, state synchronization, and lag compensation. Use for multiplayer features, networking issues, or real-time synchronization. requires:
- csharp-plugin:csharp-code-style
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(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
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
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です