Security System
Overview

The GC2 Networking Security System provides comprehensive server-authoritative protection for all Game Creator 2 networking modules. It includes:
Rate Limiting: Prevents request spam from clients
Sequence Validation: Detects replay attacks
State Validation: Detects state desynchronization and cheating
Violation Tracking: Logs, warns, blocks, or kicks malicious clients
Optional Source Patches: Deep integration for maximum security
Architecture
Quick Start
1. Add NetworkSecurityManager to Scene
2. Configure Security Settings
In the Inspector on NetworkSecurityManager:
Enable Rate Limiting
true
Limit requests per second
Max Requests Per Second
20
Per-module request limit
Enable Anomaly Detection
true
Track violation patterns
Violation Threshold
5
Violations before action
Violation Action
TempBlock
LogOnly/LogAndWarn/TempBlock/Kick
Temp Block Duration
30s
Block duration for TempBlock
Enable State Validation
true
Periodic state checks
3. Integrate with Controllers
Optional Source Patches
For maximum security, you can patch GC2 source files to add deep network validation hooks. This prevents clients from bypassing network validation by calling GC2 methods directly.
Patch Menu
Access via: Game Creator > Networking Layer > Patches
Abilities
Caster.Cast(), Learn(), UnLearn()
Stats
RuntimeStatData.Base, AddModifier(), RemoveModifier()
RuntimeAttributeData.Value
Inventory
TBagContent.Use(), Drop()
BagWealth.Set(), Add()
Melee
MeleeStance.InputCharge/Execute(), PlaySkill(), Hit()
Skill.OnHit()
Shooter
ShooterStance.PullTrigger(), ReleaseTrigger(), Reload()
WeaponData.Shoot()
How to Apply Patches
Go to
Game Creator > Networking Layer > Patches > [Module] > PatchReview the dialog explaining changes
Click "Apply Patch"
Backups are created automatically
How to Remove Patches
Go to
Game Creator > Networking Layer > Patches > [Module] > UnpatchOriginal files are restored from backup
Check Patch Status
Single module:
Game Creator > Networking Layer > Patches > [Module] > Check StatusAll modules:
Game Creator > Networking Layer > Patches > Status Overview...
Security Violation Types
RateLimitExceeded
Client sending too many requests
InvalidSequence
Out-of-order or duplicate request IDs (replay attack)
ReplayAttack
Request ID already processed
OutOfBoundsValue
Value outside acceptable range
StateDesync
Client state doesn't match server
UnauthorizedAction
Action not permitted for client
InvalidTarget
Targeting entity client shouldn't access
Violation Actions
Configure in NetworkSecurityConfig:
LogOnly
Log to console only
LogAndWarn
Log + send warning to client
TempBlock
Temporarily block client requests
Kick
Disconnect client from server
Custom
Call your custom handler
Module-Specific Configuration
You can configure different security settings per module:
Enable module overrides in Inspector by checking "Use Module Overrides".
State Validators
State validators periodically compare client-reported state with server-authoritative state:
Configure validation interval and discrepancy threshold per module.
Events
Subscribe to security events for custom handling:
Best Practices
Always validate on server: Never trust client data
Use rate limiting: Prevent request flooding
Enable state validation: Catch desync early
Apply patches for competitive games: Maximum security
Test thoroughly: Security can cause false positives
Log violations: Track potential exploits
Tune thresholds: Balance security vs. false positives
Troubleshooting
"Rate limited" errors for legitimate players
Increase
MaxRequestsPerSecondfor the moduleIncrease
RateLimitWindowfor burst tolerance
False positive state desync
Increase
ValidationIntervalIncrease
MaxDiscrepanciesthresholdCheck for high network latency
Patches fail to apply
GC2 source may have been updated
Check console for specific error
Create GitHub issue with GC2 version
File Locations
Security/NetworkSecurityTypes.cs
Config, enums, helpers
Security/NetworkSecurityManager.cs
Central manager singleton
Security/StateValidators.cs
State validation classes
Security/SecurityIntegration.cs
Controller integration helpers
Patches/GC2PatcherBase.cs
Abstract patcher base
Patches/GC2PatchManager.cs
Menu items & status window
Patches/[Module]Patcher.cs
Module-specific patchers
Library/GameCreator2NetworkingLayer/Patches/Backups/[Module]/
Auto-generated backup files
Version Compatibility
Unity: 6 LTS
Game Creator 2: 2.18.6+
DaimahouGames Abilities: 2.0+
Support
For issues or questions, please open a GitHub issue with:
Unity version
GC2 module versions
Console error logs
Steps to reproduce
Last updated