RootComponent = CapsuleComp; Why does this compile?

I have a question regarding the line mentioned in the title:
How exactly can this compile since CapsuleComp is of type UCapsuleComponent and RootComponent is of type USceneComponent ?

I even had VS warning me about this with red squiggly lines, yet when I pressed compile in the UE Editor, the lines disappeared and it compiled just fine.

Iā€™m confused. Thanks :slight_smile:

UCapsuleComponent is derived from USceneComponent

image

1 Like

Oh, should have figured this out myself. Sorry for the inconvenience.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms