unity-integrate-netcode
Integrate explicitly selected Netcode for GameObjects with server authority, lifecycle-safe replication, and failure testing.
- License 许可
- MIT
- 最近更新
- 2026-11-08
- Stars
- ★ 4
- Forks
- 3
01 前言 Front Matter
- name
- unity-integrate-netcode
- engines
- [ "UNITY" ]
- description
- Integrate explicitly selected Netcode for GameObjects with server authority, lifecycle-safe replication, and failure testing.
02 资源文件 3
- 参考文档agents/openai.yaml278 B
- 参考文档README.md1.8 KB
- 参考文档references/replication-handoffs.md2.9 KB
03 SKILL.md 正文
Unity Integrate Netcode
When to use
Integrate explicitly selected Netcode for GameObjects with server authority, lifecycle-safe replication, and failure testing. Use this feature only for Unity-owned project code and assets.
Activation and prerequisites
Run commands/resolve-engine.sh and commands/resolve-skill.sh unity-integrate-netcode before edits or tool launches. Continue only when the effective engine is UNITY and this skill is eligible. A requested skill never selects its engine. Honor the resolved task override evidence and permitted output scope when an isolated prototype is selected.
Require an explicit Netcode for GameObjects selection and compatible package/Editor versions, selected transport, session topology, target platforms, authority model and bandwidth/latency budgets. Do not substitute Netcode for Entities or a hosted service.
Workflow
- Map NetworkManager startup, approval, shutdown and reconnect lifetimes. Separate session discovery/authentication from replication; transport configuration and any relay or lobby service remain explicit dependencies. Selected MPS Sessions/matchmaking/Relay orchestration belongs to
unity-integrate-multiplayer-services; neither successful service membership nor session ownership establishes simulation authority. - Define NetworkObject spawn/despawn and ownership policy, registered network prefabs and server-side validation. Use NetworkBehaviour spawn/despawn callbacks for network lifetime rather than assuming MonoBehaviour Start means replication is ready.
- Choose replicated state and RPCs by durability. Use NetworkVariable or the package-supported equivalent for persistent shared state; use version-supported RPC syntax for requests/events, with sender, ownership, bounds and rate validation.
- Keep authoritative simulation on the chosen server/owner and presentation interpolation separate. State authority, prediction and reconciliation are design decisions; do not label client anticipation as complete rollback prediction.
- Implement late join snapshots, scene synchronization, respawn and disconnect cleanup. Stable domain IDs and save schemas must not rely solely on transient network object IDs.
- Keep serialization bounded and version-aware. Validate sizes, optional fields and content identifiers before applying remote data; unknown or malicious messages must not create assets, execute code or bypass gameplay rules.
- Reconcile audiovisual and haptic event identities across prediction, retransmission and correction. Prevent duplicate local feedback without suppressing the actual authoritative result.
Read replication and service handoffs when integrating session, transport and scene readiness.
Verification
- Run separate server/host and at least two clients; test ownership violations, invalid requests, late join, scene transitions and despawn during pending callbacks.
- Exercise latency, loss, jitter, reconnect and transport failure using the selected project's test facilities; record packet and bandwidth measurements.
- Distinguish local simulated transports from deployed target-platform tests. No service account, relay spend or public endpoint is authorized implicitly.
Output
Network ownership/replication map, package-bound components and serialization contracts, lifecycle and abuse tests, multi-process evidence and network budgets. Record environment, expected and observed results, evidence paths, and blocked or not-run checks separately from passes.
Boundaries
Fail clearly if NGO or its selected transport is unavailable. Installing packages, adopting online services or accepting service terms requires a separate explicit decision. Engine guidance applies to engine-owned code; independent services retain their architecture contracts.
References
- Netcode for GameObjects. Use the documentation matching the installed project version.
- Unity Transport. Use the documentation matching the installed project version.
04 同仓库更多 Skills
verify-web3-game-lifecycle
Verify a game's selected Web3 asset, wallet, ownership and trading lifecycle with contract properties, canonical recovery, actual target evidence and separate release readiness.
verify-onchain-game-assets
Verify exact on-chain game collection ownership and quantities at canonical blocks, reconcile inventory events, and design honest match admission. Use for ERC721/ERC1155 inventory, reorg recovery, reservations, or transfer-during-match rules.
plan-web3-game-assets
Define an opt-in Ethereum, Base or Immutable game-asset lifecycle, including token identity, supply, rights, custody, game eligibility and chain-specific dependencies.
integrate-game-wallets
Integrate explicit player-wallet connection, scoped SIWE authentication, authority invalidation and reviewed target-specific handoff without application-held player keys.
integrate-game-asset-trading
Integrate explicitly selected game asset settlement with exact unsigned intents, scoped approvals, idempotent operations and canonical receipt reconciliation. Use for NFT listing, buying, cancellation, retries or marketplace integration.
build-evm-game-contracts
Author and verify host-owned EVM game collections and explicit mint, burn, craft or admin rules with pinned Solidity tooling. Use for contract source and deployment candidates; deployment and player signing require separate authorization.