Hi,
I realise i am about 2 years late to this, but it seems like a stumbling point for a few people so i will post it in case anyone else comes lookiung for an answer. The .NET SDK doesn't allow casting in that way. Doesn't matter what types you want to cast, nothing will work. The way around it is to go through the GlobalInterface like so
IIGameSpline spline = GlobalInterface.Instance.IGameSpline.Marshal(obj.NativePointer);
That will work. The same goes for getting other things like IGameMesh etc. Another example
IIGameMesh mesh = GlobalInterface.Instance.IGameMesh.Marshal(obj.NativePointer);
That will work. While i have not worked with splines, this is how i case an IIGameObject to IIGameMesh