The second+better way of achieving this is via "MonoBehaviors" - Which are extremely useful for even more modding capabilities. MonoBehaviour is the base class from which every Unity script derives.
you said that you will cover Monobehaviour another time, how the heck we can mod monobehaviour...