mirror of
https://github.com/godotengine/godot.git
synced 2024-11-27 09:16:35 +08:00
don't marshal multidimensional arrays
This commit is contained in:
parent
57bdddce02
commit
5090355907
@ -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 New Issue
Block a user