neikeq/GodotSharp

Properly support namespaces.

neikeq opened this issue · 1 comments

C# does not have a class-file relation, so the script file and its class must share the same name to allow us locate the class. The problem comes when dealing with scripts whose classes are placed in namespaces. Right now, we iterate through all the classes in an assembly and pick the first one that matches the script name. This means one cannot have more than one script with the same name in a project, no matter what namespace its class belongs to.

In order to properly support namespaces, we must either find a way to detect the script namespace or make its class have a knowledge of its path.