Ways to "Add Component from class"?

I have the same problem.