The Unity part

Now do: Add component>New Script (Name it the EXACT same name as the script you want to use)



Next copy and past the entire class into this script you just added.



It is important that you ignore any errors! You must also never change the contents of the script or else it will not work! You are not writing a script, only preparing the file to pass a hash check Unity does to make sure the script you want is the same as this script it has.

[github.com]

Start by selecting your game Object in the scene.If you are adding new scripts simply strip everything except for the definitions for non-static, non-constant public variables and enums.It should look like this:Lets fix it: