库

s&box 库列表

Debug Assertions

quality.debugassertions

关于

This library adds Assert functions which are only checked in debug mode (that is, in the editor).
This lets you create reliable code which has no performance impact once the game is released.
This is because C# has an attribute which can actually remove code if DEBUG isn't defined. It completely disappears.

For a taste about defensive programming, please watch the ~9 minutes after this timestamp in this video: https://youtu.be/oitYvDe4nps?t=210
Emphasis on the part at 8:40.

The issue which inspired this project: https://github.com/Facepunch/sbox-public/issues/291
The source code is available at https://gitgud.io/nixx/sbox-debug-assertions

Note: The assertions sit in the Quality.Diagnostics namespace, in case s&box ever add their own.

更多作品,作者: quality

查看创作团队分析 →
01
Simple Anti-Tamper 缩略图
Simple Anti-Tamperquality.simpleantitamper

Keep your saves safe from tampering!

+024小时
2收藏
5好评
65%Terry 评分