don't marshal multidimensional arrays
This commit is contained in:
parent
57bdddce02
commit
5090355907
1 changed files with 6 additions and 2 deletions
|
@ -156,6 +156,10 @@ namespace Godot.SourceGenerators
|
|||
else if (typeKind == TypeKind.Array)
|
||||
{
|
||||
var arrayType = (IArrayTypeSymbol)type;
|
||||
|
||||
if (arrayType.Rank != 1)
|
||||
return null;
|
||||
|
||||
var elementType = arrayType.ElementType;
|
||||
|
||||
switch (elementType.SpecialType)
|
||||
|
@ -177,8 +181,8 @@ namespace Godot.SourceGenerators
|
|||
if (elementType.SimpleDerivesFrom(typeCache.GodotObjectType))
|
||||
return MarshalType.GodotObjectOrDerivedArray;
|
||||
|
||||
if (elementType.ContainingAssembly.Name == "GodotSharp" &&
|
||||
elementType.ContainingNamespace.Name == "Godot")
|
||||
if (elementType.ContainingAssembly?.Name == "GodotSharp" &&
|
||||
elementType.ContainingNamespace?.Name == "Godot")
|
||||
{
|
||||
switch (elementType)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue