Alright I might be rusty in C#.
I've managed to figure out most of my problems with Godot's C# either on my own or with a quick google.
But I'm stuck on this and I'm embarrassed.
The simple of it, is I need to Access a Sprite from code, specifically for its SetFrame().
But every time I try I'm getting " System.InvalidCastException: Specified cast is not valid.".
I am confused because I can grab the Node2D, Labels, pretty much anything else, but it yells at me if I even look the wrong way at a sprite.
I've used this way of doing it with Node2D and Labels and stuff
Sprite spriteName;
spriteName = (Sprite)GetNode("pathtosprite");
and that works for most of what I need.
I'm also used to doing the following in C# normally-
spriteName = GetNode<Sprite>("pathtosprite");
but that is also yelling at me.
I don't know, I've even tried using as Sprite
as well, all of these in different combinations. Just frustrated. I've scoured the Docs, I've googled the hell out of it, I've tried every Solution I've seen so far. I've seen how easy it is in GDScript.
I'd love to understand what I'm messing up and how to do it properly.
And if this is so obvious and simple, I'm sorry I'm just very tired and can't really think it out for some reason.