C#: Fix ScriptPathAttribute generator with none or nested namespaces
The following two bugs were fixed:
- For classes without namespace we were still generating `namespace {`
without a namespace identifier, causing a syntax error.
- For classes with nested namespaces we were generating only the innermost
part of the namespace was being generated, e.g.: for `Foo.Bar` we were
generating `namespace Bar {` instead of `namespace Foo.Bar {`.
This wasn't causing any build error, but because of the wrong namespace
Godot wasn't able to find the class associated with the script.
This commit is contained in:
@@ -23,11 +23,12 @@
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Package Sdk\Sdk.props and Sdk\Sdk.targets file -->
|
||||
<None Include="Sdk\Sdk.props" Pack="true" PackagePath="Sdk" Visible="false" />
|
||||
<None Include="Sdk\Sdk.targets" Pack="true" PackagePath="Sdk" Visible="false" />
|
||||
<None Include="Sdk\Sdk.props" Pack="true" PackagePath="Sdk" />
|
||||
<None Include="Sdk\Sdk.targets" Pack="true" PackagePath="Sdk" />
|
||||
<!-- SdkPackageVersions.props -->
|
||||
|
||||
<None Include="..\..\..\SdkPackageVersions.props" Pack="true" PackagePath="Sdk" Visible="false" />
|
||||
<None Include="..\..\..\SdkPackageVersions.props" Pack="true" PackagePath="Sdk">
|
||||
<Link>Sdk\SdkPackageVersions.props</Link>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="CopyNupkgToSConsOutputDir" AfterTargets="Pack">
|
||||
|
||||
Reference in New Issue
Block a user