Why my class that is derived from a UActorComponent derived class is not attaching to my actor

I have this UActorComponent derived class named RaycastController and then I made another class derived from RaycastController named Collision2D, now the problem is that I can attach RaycastController to my actor but not Collision2D, what I am doing wrong here ?