I couldn't get the errors on the title
modules/mono/csharp_script.cpp:2327 - Exception thrown from constructor of temporary MonoObject:
modules/mono/mono_gd/gd_mono_utils.cpp:369 - System.InvalidCastException: Specified cast is not valid.
I am trying to load an Area but can have a Kinematic body. I am trying to what I did 2 Questions ago with Godot 3 C#
Here is my code:
private Area FloorSegment = ResourceLoader.Load<Area>("res://MyMesh.tscn");
public override void _Ready()
{
string aname;
Area inst;
Vector3 mabit = Vector3.Zero;
mabit.y = -1;
inst = FloorSegment;
inst.Translate(mabit);
for (int i = 0; i < 10; i++)
{
aname = string.Format("Wall {0}", i);
inst.Name = aname;
Vector3 mpos = Vector3.Zero;
mpos.z = -2;
inst.Translate(mpos);
AddChild(inst);
}
}