The script should be added to the asset pipeline instead. Otherwise it will not be compiled along with the rest.