Tag: C#
All the articles with the tag "C#".
1 << -1 Isn't an Error, It's Layer 31
A 2022 post on scanning the surroundings with OverlapSphere. Fetching the layer by name is the right move, but the value then gets shifted by hand. When NameToLayer returns -1, that expression points at layer 31 instead of throwing.
You Can't Remove an Anonymous Function — But Not Because It's Anonymous
A 2022 post on registering events with Action. The behavior descriptions are accurate, but the comment 'anonymous functions can't be removed' hides the reason. What blocks removal isn't anonymity — it's not holding the same instance.
Unload(false) Doesn't Unload the Instances
Notes from the Unite Seoul 2025 optimization session. I cross-checked some twenty items against the docs one by one. Most hold up; five don't. The most dangerous is AssetBundle.Unload, whose two parameter cases are swapped.
An Outline Is Duplicated Vertices, Not a Shader
I clipped the Outline component doc and it's the Unity 5.3 edition. Yet the wording is nearly identical to the current page. It wasn't updated — which is why Use Graphic Alpha's description still contradicts the property's own name.