Merge branch 'fixing-strigview-gettext-uses' of git://github.com/Zbyl/FlaxEngine into Zbyl-fixing-strigview-gettext-uses

This commit is contained in:
Wojtek Figat
2021-08-13 13:57:02 +02:00
15 changed files with 165 additions and 112 deletions

View File

@@ -166,7 +166,7 @@ namespace Flax.Build.Bindings
if (typeInfo.Type == "String")
return $"(StringView){value}";
if (typeInfo.IsPtr && typeInfo.IsConst && typeInfo.Type == "Char")
return $"((StringView){value}).GetText()";
return $"((StringView){value}).GetNonTerminatedText()"; // (StringView)Variant, if not empty, is guaranteed to point to a null-terminated buffer.
if (typeInfo.Type == "AssetReference" || typeInfo.Type == "WeakAssetReference")
return $"ScriptingObject::Cast<{typeInfo.GenericArgs[0].Type}>((Asset*){value})";
if (typeInfo.Type == "ScriptingObjectReference" || typeInfo.Type == "SoftObjectReference")