A downloadable tool

Const Generator generates constant properties within static classes replacing the usage of magic strings by holding the value of those strings in the given constant property.

.
.
.
.
.
but why the use for this, you ask?
why not just use magic strings and simply write it like this:

animator.SetFloat("XMove", 5);ノ( ゜-゜ノ)

Well....
Because screw this! (╯°□°)╯︵ ;(ϛ ',,ǝʌoWX,,)ʇɐolℲʇǝS˙ɹoʇɐɯᴉuɐ

Magic strings are considered bad as they are very error-prone, they are non-performant and slow as no optimization is applied on them by the compiler as they are dynamically changing. The more you use them the more it will add up that will not only cause performance problems but will also make it harder to fix the bugs on your code.

So instead so we use constants, by this way we are fixing a variable's value so that it can be optimized, not only that it also eliminates the error of writing a typo in which the compiler has no whatsoever idea but will instead propagate an error at runtime causing annoying problems and bugs.

Download and check it out at: https://github.com/INFGameDev/ConstGen

Leave a comment

Log in with itch.io to leave a comment.