0 votes

Hi,
I set up Godot with C# with the intention of using all the excessive Framework already provided by C#.

So my Project is starting and running with C# skripts.

Now if i want to use a C# List i get an compiler error saying List<> was not found.

So my guess is that the C# stuff is not included by the compiler.

How do i get access to those?

I am using Visual Studio Code for editing and VS2019 as a compiler.

Godot version v3.4.stable.mono.official
in Engine by (12 points)

1 Answer

0 votes

Likely just missing the the appropriate using clause. Everything C# is included.

using System.Collections.Generic;

(that is also assuming the code is correct; e.g. List<> isn't valid as it is missing a type).

Consider using VS2019 as the editor as it provides appropriate hints while editing. You may also consider adding appropriate C# extensions to Visual Studio Code to provide the same hints and compilation; but pick one and use it consistently to avoid confusion.

by (418 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.