Casting Transform to RectTransform - InvalidCastException: Cannot cast from source type to destination type.

Hey all,

RectTransform rt = (RectTransform)transform;

This line, in MonoBehaviour::LateUpdate(), is giving me the following error:

InvalidCastException: Cannot cast from source type to destination type.

I’m running 5.3. Is there something I’m missing?

Thanks,

Nvm, was casting wrong transform.