Tag: C#
All the articles with the tag "C#".
Mirror's Commands and RPCs: Running on the Server Doesn't Mean It's Safe
I revisited a write-up on Mirror's Command, ClientRpc, and TargetRpc. The prefix rule and argument types differ from today's docs, and more importantly, the example code carries a pattern that defeats server authority.
Unity's JsonUtility: The Limits Come From the Serializer, Not From JSON
Rather than memorising JsonUtility's list of limitations, one rule predicts them: if it isn't visible in the Inspector, it isn't in the JSON. Plus the most dangerous item, which the manual never mentions — polymorphism.
Character Encodings: Unicode Is Not Two Bytes
Revisiting a write-up covering ISO 8859-1 through EUC-KR, CP949 and UTF-8. Three widespread misconceptions corrected against the official specs and bytes I measured myself, plus how to trace mojibake back to its cause.
Subscribing to InputAction Directly: The Lifetime of Delegate-Based Input
Handling input by subscribing to InputAction in code instead of using PlayerInput's Behavior. Why subscribe and unsubscribe belong in a pair, who actually enables the action, and what looking actions up by string costs you.