Godot Version
4.5.1 .Net
Question
Unable to
System.InvalidCastException: Unable to cast object of type 'Godot.CSharpScript' to type 'SludgeGameTools.SDK.Behavior'.
4.5.1 .Net
Unable to
System.InvalidCastException: Unable to cast object of type 'Godot.CSharpScript' to type 'SludgeGameTools.SDK.Behavior'.
Hi,
An invalid cast means that it’s not possible to cast a type A to a type B.
For instance, you could not cast a float to a Vector2 as there’s no existing casting method.
I suppose you’re trying to do a cast at runtime that failed due to your two objects not being compatible. Please share some more code if you need more help, as it’s impossible to help you more with so few information.
As @sixrobin said, you need to provide more information. Simply pasting an error message on a forum and expect help in return is an insult to the people who spend their time trying to help you. You haven’t even provided the snippet of code responsible for the error that you’re showing.
Delete your topic or add sufficient contextual information.