bodong1987 / UnrealSharp

A free plugin that allows you to develop with .net 8.0 and C# 12 in UnrealEngine5
MIT License
59 stars 4 forks source link

In UnrealSharp.UnrealEngine generated Bindings, default double parameters are not convertible to float #2

Open gillesF78 opened 5 months ago

gillesF78 commented 5 months ago

Hello,

My UnrealSharp.Toolkit version is 1.0.0.19, and .NET version is 8.0.5.

When I generate UnrealSharp.UnrealEngine project, the generated bindings have some double/float compatibility issues: Génération démarrée à 16:07... 1>------ Début de la génération : Projet : UnrealSharp.UnrealEngine, Configuration : Debug-Windows-Editor Any CPU ------ 1>Generate C# binding codes for Unreal C++, Please wait... 1>Work Mode:codegen 1>Start work mode:codegen 1>Start Generate Binding Code, Mode: JsonDoc 1>Input Source Path:C:\gilles\research\devel\UnrealEngine\UnrealSharp1\Intermediate\UnrealSharp\NativeTypeDefinition.tdb 1>Unreal Project Path:C:\gilles\research\devel\UnrealEngine\UnrealSharp1\ 1>Export Schema Type:NativeBinding 1>Start Create TypeDefinitionDucment, Please wait... 1>Create TypeDefinitionDucment Success, Start Export, Please wait... 1>Document Attribute:AllowFastInvokeGeneration 1>Enable Unreal C++ Function Fast Invocation, Generate C++ Interop Functions to:C:\gilles\research\devel\UnrealEngine\UnrealSharp1\Source/UnrealSharp1/UnrealSharpBinding 1>Find Fast accessable 2439 methods, unsupported 1357 methods [...] 1>Finish export C# binding codes, process 3582 files, write 3582 files, skip 0 files[no changes]. 1>Export Placeholder code, Please wait... 1>Success. 1>UnrealSharpTool Finished, Exit Code: 0 1> 1>C:\gilles\research\devel\UnrealEngine\UnrealSharp1\GameScripts\Game\UnrealSharp.UnrealEngine\Bindings\NativeBinding\Engine\Classes\AActor.gen.cs(2201,43,2201,52): error CS1750: Impossible d'utiliser une valeur de type 'double' comme paramètre par défaut, car il n'existe pas de conversion standard en type 'float'

Indeed, the file AActor.gen.cs contains

public bool WasRecentlyRendered(float Tolerance = 0.200000)

The errors disappears when adding "f" to the default parameter "0.200000" as following: public bool WasRecentlyRendered(float Tolerance = 0.200000f)

Manual editing of bindings will overwritten at the next generation.

Can you help me to solve this issue ?

Thanks in advance

Best regards

Gilles

bodong1987 commented 4 months ago

Hello,

My UnrealSharp.Toolkit version is 1.0.0.19, and .NET version is 8.0.5.

When I generate UnrealSharp.UnrealEngine project, the generated bindings have some double/float compatibility issues: Génération démarrée à 16:07... 1>------ Début de la génération : Projet : UnrealSharp.UnrealEngine, Configuration : Debug-Windows-Editor Any CPU ------ 1>Generate C# binding codes for Unreal C++, Please wait... 1>Work Mode:codegen 1>Start work mode:codegen 1>Start Generate Binding Code, Mode: JsonDoc 1>Input Source Path:C:\gilles\research\devel\UnrealEngine\UnrealSharp1\Intermediate\UnrealSharp\NativeTypeDefinition.tdb 1>Unreal Project Path:C:\gilles\research\devel\UnrealEngine\UnrealSharp1 1>Export Schema Type:NativeBinding 1>Start Create TypeDefinitionDucment, Please wait... 1>Create TypeDefinitionDucment Success, Start Export, Please wait... 1>Document Attribute:AllowFastInvokeGeneration 1>Enable Unreal C++ Function Fast Invocation, Generate C++ Interop Functions to:C:\gilles\research\devel\UnrealEngine\UnrealSharp1\Source/UnrealSharp1/UnrealSharpBinding 1>Find Fast accessable 2439 methods, unsupported 1357 methods [...] 1>Finish export C# binding codes, process 3582 files, write 3582 files, skip 0 files[no changes]. 1>Export Placeholder code, Please wait... 1>Success. 1>UnrealSharpTool Finished, Exit Code: 0 1> 1>C:\gilles\research\devel\UnrealEngine\UnrealSharp1\GameScripts\Game\UnrealSharp.UnrealEngine\Bindings\NativeBinding\Engine\Classes\AActor.gen.cs(2201,43,2201,52): error CS1750: Impossible d'utiliser une valeur de type 'double' comme paramètre par défaut, car il n'existe pas de conversion standard en type 'float'

Indeed, the file AActor.gen.cs contains

public bool WasRecentlyRendered(float Tolerance = 0.200000)

The errors disappears when adding "f" to the default parameter "0.200000" as following: public bool WasRecentlyRendered(float Tolerance = 0.200000f)

Manual editing of bindings will overwritten at the next generation.

Can you help me to solve this issue ?

Thanks in advance

Best regards

Gilles

Hello, could you please tell me the version of UnrealEngine you are using? In my local tests using 5.3 (based on EpicLauncher) and 5.4 (based on source code), I found that the generated code is correct, and the default value of float type will automatically append the f suffix.

#region WasRecentlyRendered
#region Interop Pointers
private static class WasRecentlyRenderedInteropFunctionPointers
{
    public readonly static IntPtr AActor_WasRecentlyRendered;

    static WasRecentlyRenderedInteropFunctionPointers()
    {
        InteropFunctions.BindInteropFunctionPointer(ref AActor_WasRecentlyRendered, nameof(AActor_WasRecentlyRendered), nameof(WasRecentlyRenderedInteropFunctionPointers));
    }
}
#endregion

/// <summary>
/// Returns true if this actor has been rendered "recently", with a tolerance in seconds to define what "recent" means.
/// e.g.: If a tolerance of 0.1 is used, this function will return true only if the actor was rendered in the last 0.1 seconds of game time.
/// @param Tolerance  How many seconds ago the actor last render time can be and still count as having been "recently" rendered.
/// @return Whether this actor was recently rendered.
/// </summary>
/// <meta name="Category">Rendering</meta>
/// <meta name="CPP_Default_Tolerance">0.200000</meta>
/// <meta name="DisplayName">Was Actor Recently Rendered</meta>
/// <meta name="Keywords">scene visible</meta>
[UFUNCTION(EFunctionFlags.Final|EFunctionFlags.RequiredAPI|EFunctionFlags.Native|EFunctionFlags.Public|EFunctionFlags.BlueprintCallable|EFunctionFlags.BlueprintPure|EFunctionFlags.Const, Category = "Rendering")]
[UMETA("CPP_Default_Tolerance", "0.200000")]
[UMETA("DisplayName", "Was Actor Recently Rendered")]
[UMETA("Keywords", "scene visible")]
[FastAccessable]
public bool WasRecentlyRendered(float Tolerance = 0.200000f)
{
    unsafe
    {
        bool __result = default;
        ((delegate* unmanaged[Cdecl]<IntPtr, float, bool*, void>)WasRecentlyRenderedInteropFunctionPointers.AActor_WasRecentlyRendered)(GetNativePtrChecked(), Tolerance, &__result);
        return __result;
    }
}
#endregion

If possible, it is recommended that you use the latest source code and upgrade the Toolkit to version 1.1 to give it a try.

gillesF78 commented 4 months ago

I've upgraded UE5 to version 5.4.2, and I created a new C++ project with a "Games / First Person" template.

I installed UnrealSharp, and I've new compilation errors :

2> Running Internal UnrealHeaderTool C:\gilles\research\devel\UnrealEngine\FPS_USharp1\FPS_USharp1.uproject C:\gilles\research\devel\UnrealEngine\FPS_USharp1\Intermediate\Build\Win64\FPS_USharp1Editor\Development\FPS_USharp1Editor.uhtmanifest -WarningsAsErrors -installed 2>C:\gilles\research\devel\UnrealEngine\FPS_USharp1\Plugins\UnrealSharpTests\Source\UnrealSharpTests\Public\UnrealSharpTestsStructValueInCpp.h(41): error : Invalid BlueprintType enum base - currently only uint8 supported

I've errors when I attempt to install UnrealSharp.Utils 1.1.0 Nuget package in the project Error Failed to install package 'UnrealSharp.Utils 1.1.0'. You are trying to install this package in a project targeting "native,Version=v0.0", but the package does not contain any content files or assembly references compatible with this framework. For more information, contact the package creator.

bodong1987 commented 4 months ago

I've upgraded UE5 to version 5.4.2, and I created a new C++ project with a "Games / First Person" template.

I installed UnrealSharp, and I've new compilation errors :

2> Running Internal UnrealHeaderTool C:\gilles\research\devel\UnrealEngine\FPS_USharp1\FPS_USharp1.uproject C:\gilles\research\devel\UnrealEngine\FPS_USharp1\Intermediate\Build\Win64\FPS_USharp1Editor\Development\FPS_USharp1Editor.uhtmanifest -WarningsAsErrors -installed 2>C:\gilles\research\devel\UnrealEngine\FPS_USharp1\Plugins\UnrealSharpTests\Source\UnrealSharpTests\Public\UnrealSharpTestsStructValueInCpp.h(41): error : Invalid BlueprintType enum base - currently only uint8 supported

I've errors when I attempt to install UnrealSharp.Utils 1.1.0 Nuget package in the project Error Failed to install package 'UnrealSharp.Utils 1.1.0'. You are trying to install this package in a project targeting "native,Version=v0.0", but the package does not contain any content files or assembly references compatible with this framework. For more information, contact the package creator.

You need to update UnrealSharp's C++ to version 1.1. Because Unreal has always required that Blueprintable enumerations can only be of byte type, but past versions did not do this check. Maybe version 5.4 fixed this problem. Version 1.2 of UnrealSharp is ready now, you can use 1.2 directly. for this compile error : You can manually add a uint8 constraint to the C++ enumeration in the error code, like this:

UENUM(BlueprintType, meta=(Bitflags))
enum class EUnrealSharpLanguageTypesInCpp : uint8
{
    None = 0,
    CSharp = 1 << 0,
    CLanguage = 1 << 1,
    CPlusPlus = 1 << 2,
    Python = 1 << 3,
    VisualBasic = 1 << 4,
    FSharp = 1<<5,
    JavaScript = 1<<6
};
gillesF78 commented 4 months ago

Thanks, the solution compiled after adding the uint8constraint and also a #include <string> in Plugins\UnrealSharp\Source\UnrealSharp\Private\MonoRuntime\MonoRuntime.cpp

I upgraded UnrealSharp.Toolkit to version 1.2.1 in GameScripts/UnrealSharp.sln, but I was unable to do so in my project solution FPS_USharp2.sln Impossible d’installer le package « UnrealSharp.Utils 1.2.1 ». Vous essayez d’installer ce package dans un projet ciblant « native,Version=v0.0 », mais le package ne contient aucun fichier de contenu ou référence d’assembly compatible avec ce framework. Pour plus d’informations, contactez le créateur du package. Temps écoulé : 00:00:01.1492138 However, FPS_USharp2.sln compilation success...

The compilation of GameScripts/UnrealSharp.sln still fails with the same error CS1750 due to the missing "f" in default parameters ;

public static UAITask_MoveTo? AIMoveTo(AAIController? Controller, FVector GoalLocation, AActor? GoalActor = null, float AcceptanceRadius = -1.000000, EAIOptionFlag StopOnOverlap = EAIOptionFlag.Default, EAIOptionFlag AcceptPartialPath = EAIOptionFlag.Default, bool bUsePathfinding = true, bool bLockAILogic = true, bool bUseContinuousGoalTracking = false, EAIOptionFlag ProjectGoalOnNavigation = EAIOptionFlag.Default, EAIOptionFlag RequireNavigableEndLocation = EAIOptionFlag.Default)

==> C:\gilles\research\devel\UnrealEngine\FPS_USharp2\GameScripts\Game\UnrealSharp.UnrealEngine\Bindings\NativeBinding\Engine\Classes\AActor.gen.cs(2139,43,2139,52): error CS1750: Impossible d'utiliser une valeur de type 'double' comme paramètre par défaut, car il n'existe pas de conversion standard en type 'float'

bodong1987 commented 4 months ago

Thanks, the solution compiled after adding the uint8constraint and also a #include <string> in Plugins\UnrealSharp\Source\UnrealSharp\Private\MonoRuntime\MonoRuntime.cpp

I upgraded UnrealSharp.Toolkit to version 1.2.1 in GameScripts/UnrealSharp.sln, but I was unable to do so in my project solution FPS_USharp2.sln Impossible d’installer le package « UnrealSharp.Utils 1.2.1 ». Vous essayez d’installer ce package dans un projet ciblant « native,Version=v0.0 », mais le package ne contient aucun fichier de contenu ou référence d’assembly compatible avec ce framework. Pour plus d’informations, contactez le créateur du package. Temps écoulé : 00:00:01.1492138 However, FPS_USharp2.sln compilation success...

The compilation of GameScripts/UnrealSharp.sln still fails with the same error CS1750 due to the missing "f" in default parameters ;

public static UAITask_MoveTo? AIMoveTo(AAIController? Controller, FVector GoalLocation, AActor? GoalActor = null, float AcceptanceRadius = -1.000000, EAIOptionFlag StopOnOverlap = EAIOptionFlag.Default, EAIOptionFlag AcceptPartialPath = EAIOptionFlag.Default, bool bUsePathfinding = true, bool bLockAILogic = true, bool bUseContinuousGoalTracking = false, EAIOptionFlag ProjectGoalOnNavigation = EAIOptionFlag.Default, EAIOptionFlag RequireNavigableEndLocation = EAIOptionFlag.Default)

==> C:\gilles\research\devel\UnrealEngine\FPS_USharp2\GameScripts\Game\UnrealSharp.UnrealEngine\Bindings\NativeBinding\Engine\Classes\AActor.gen.cs(2139,43,2139,52): error CS1750: Impossible d'utiliser une valeur de type 'double' comme paramètre par défaut, car il n'existe pas de conversion standard en type 'float'

I think this may have something to do with localization. Inside the tool, an interface like float.TryParse is used to try to convert strings to float. This conversion is associated with localization. For example, in some local environments, the string conversion of -1.000000 will be successful, while in others it will fail. And your current language should be the one that will fail. try this:

using System.Globalization;

namespace ConsoleApp22
{
    internal class Program
    {
        static void Main(string[] args)
        {
            string value = "-1.000000";
            foreach (CultureInfo culture in CultureInfo.GetCultures(CultureTypes.AllCultures))
            {
                float result;
                bool success = float.TryParse(value, NumberStyles.Float, culture, out result);
                if (!success)
                {
                    Console.WriteLine($"Failed to parse '{value}' in culture '{culture.Name}'");
                }
                else
                {
                    Console.WriteLine($"Success parse '{value}' in culture '{culture.Name}'");
                }
            }
        }
    }
}
Success parse '-1.000000' in culture ''
Success parse '-1.000000' in culture 'aa'
Success parse '-1.000000' in culture 'aa-DJ'
Success parse '-1.000000' in culture 'aa-ER'
Success parse '-1.000000' in culture 'aa-ET'
Failed to parse '-1.000000' in culture 'af'
Failed to parse '-1.000000' in culture 'af-NA'
Failed to parse '-1.000000' in culture 'af-ZA'
Failed to parse '-1.000000' in culture 'agq'
Failed to parse '-1.000000' in culture 'agq-CM'
Success parse '-1.000000' in culture 'ak'
Success parse '-1.000000' in culture 'ak-GH'
Success parse '-1.000000' in culture 'am'
Success parse '-1.000000' in culture 'am-ET'
Failed to parse '-1.000000' in culture 'ar'
Failed to parse '-1.000000' in culture 'ar-001'
Failed to parse '-1.000000' in culture 'ar-AE'
Failed to parse '-1.000000' in culture 'ar-BH'
Failed to parse '-1.000000' in culture 'ar-DJ'
Failed to parse '-1.000000' in culture 'ar-DZ'
Failed to parse '-1.000000' in culture 'ar-EG'
Failed to parse '-1.000000' in culture 'ar-ER'
Failed to parse '-1.000000' in culture 'ar-IL'
Failed to parse '-1.000000' in culture 'ar-IQ'
Failed to parse '-1.000000' in culture 'ar-JO'
Failed to parse '-1.000000' in culture 'ar-KM'
Failed to parse '-1.000000' in culture 'ar-KW'
Failed to parse '-1.000000' in culture 'ar-LB'
Failed to parse '-1.000000' in culture 'ar-LY'
Failed to parse '-1.000000' in culture 'ar-MA'
Failed to parse '-1.000000' in culture 'ar-MR'
Failed to parse '-1.000000' in culture 'ar-OM'
Failed to parse '-1.000000' in culture 'ar-PS'
Failed to parse '-1.000000' in culture 'ar-QA'
Failed to parse '-1.000000' in culture 'ar-SA'
Failed to parse '-1.000000' in culture 'ar-SD'
Failed to parse '-1.000000' in culture 'ar-SO'
Failed to parse '-1.000000' in culture 'ar-SS'
Failed to parse '-1.000000' in culture 'ar-SY'
Failed to parse '-1.000000' in culture 'ar-TD'
Failed to parse '-1.000000' in culture 'ar-TN'
Failed to parse '-1.000000' in culture 'ar-YE'
Success parse '-1.000000' in culture 'arn'
Success parse '-1.000000' in culture 'arn-CL'
Success parse '-1.000000' in culture 'as'
Success parse '-1.000000' in culture 'as-IN'
Success parse '-1.000000' in culture 'asa'
Success parse '-1.000000' in culture 'asa-TZ'
Failed to parse '-1.000000' in culture 'ast'
Failed to parse '-1.000000' in culture 'ast-ES'
Failed to parse '-1.000000' in culture 'az'
Failed to parse '-1.000000' in culture 'az-Cyrl'
Failed to parse '-1.000000' in culture 'az-Cyrl-AZ'
Failed to parse '-1.000000' in culture 'az-Latn'
Failed to parse '-1.000000' in culture 'az-Latn-AZ'
Success parse '-1.000000' in culture 'ba'
Success parse '-1.000000' in culture 'ba-RU'
Failed to parse '-1.000000' in culture 'bas'
Failed to parse '-1.000000' in culture 'bas-CM'
Failed to parse '-1.000000' in culture 'be'
Failed to parse '-1.000000' in culture 'be-BY'
Success parse '-1.000000' in culture 'bem'
Success parse '-1.000000' in culture 'bem-ZM'
Success parse '-1.000000' in culture 'bez'
Success parse '-1.000000' in culture 'bez-TZ'
Failed to parse '-1.000000' in culture 'bg'
Failed to parse '-1.000000' in culture 'bg-BG'
Success parse '-1.000000' in culture 'bin'
Success parse '-1.000000' in culture 'bin-NG'
Success parse '-1.000000' in culture 'bm'
Success parse '-1.000000' in culture 'bm-ML'
Success parse '-1.000000' in culture 'bn'
Success parse '-1.000000' in culture 'bn-BD'
Success parse '-1.000000' in culture 'bn-IN'
Success parse '-1.000000' in culture 'bo'
Success parse '-1.000000' in culture 'bo-CN'
Success parse '-1.000000' in culture 'bo-IN'
Failed to parse '-1.000000' in culture 'br'
Failed to parse '-1.000000' in culture 'br-FR'
Success parse '-1.000000' in culture 'brx'
Success parse '-1.000000' in culture 'brx-IN'
Failed to parse '-1.000000' in culture 'bs'
Failed to parse '-1.000000' in culture 'bs-Cyrl'
Failed to parse '-1.000000' in culture 'bs-Cyrl-BA'
Failed to parse '-1.000000' in culture 'bs-Latn'
Failed to parse '-1.000000' in culture 'bs-Latn-BA'
Success parse '-1.000000' in culture 'byn'
Success parse '-1.000000' in culture 'byn-ER'
Failed to parse '-1.000000' in culture 'ca'
Failed to parse '-1.000000' in culture 'ca-AD'
Failed to parse '-1.000000' in culture 'ca-ES'
Failed to parse '-1.000000' in culture 'ca-FR'
Failed to parse '-1.000000' in culture 'ca-IT'
Success parse '-1.000000' in culture 'ccp'
Success parse '-1.000000' in culture 'ccp-BD'
Success parse '-1.000000' in culture 'ccp-IN'
Success parse '-1.000000' in culture 'ce'
Success parse '-1.000000' in culture 'ce-RU'
Success parse '-1.000000' in culture 'ceb'
Success parse '-1.000000' in culture 'ceb-PH'
Success parse '-1.000000' in culture 'cgg'
Success parse '-1.000000' in culture 'cgg-UG'
Success parse '-1.000000' in culture 'chr'
Success parse '-1.000000' in culture 'chr-US'
Failed to parse '-1.000000' in culture 'ckb'
Failed to parse '-1.000000' in culture 'ckb-IQ'
Failed to parse '-1.000000' in culture 'ckb-IR'
Success parse '-1.000000' in culture 'co'
Success parse '-1.000000' in culture 'co-FR'
Failed to parse '-1.000000' in culture 'cs'
Failed to parse '-1.000000' in culture 'cs-CZ'
Success parse '-1.000000' in culture 'cu'
Success parse '-1.000000' in culture 'cu-RU'
Success parse '-1.000000' in culture 'cy'
Success parse '-1.000000' in culture 'cy-GB'
Failed to parse '-1.000000' in culture 'da'
Failed to parse '-1.000000' in culture 'da-DK'
Failed to parse '-1.000000' in culture 'da-GL'
Success parse '-1.000000' in culture 'dav'
Success parse '-1.000000' in culture 'dav-KE'
Failed to parse '-1.000000' in culture 'de'
Failed to parse '-1.000000' in culture 'de-AT'
Failed to parse '-1.000000' in culture 'de-BE'
Success parse '-1.000000' in culture 'de-CH'
Failed to parse '-1.000000' in culture 'de-DE'
Failed to parse '-1.000000' in culture 'de-IT'
Success parse '-1.000000' in culture 'de-LI'
Failed to parse '-1.000000' in culture 'de-LU'
Success parse '-1.000000' in culture 'dje'
Success parse '-1.000000' in culture 'dje-NE'
Success parse '-1.000000' in culture 'doi'
Success parse '-1.000000' in culture 'doi-IN'
Failed to parse '-1.000000' in culture 'dsb'
Failed to parse '-1.000000' in culture 'dsb-DE'
Failed to parse '-1.000000' in culture 'dua'
Failed to parse '-1.000000' in culture 'dua-CM'
Success parse '-1.000000' in culture 'dv'
Success parse '-1.000000' in culture 'dv-MV'
Failed to parse '-1.000000' in culture 'dyo'
Failed to parse '-1.000000' in culture 'dyo-SN'
Success parse '-1.000000' in culture 'dz'
Success parse '-1.000000' in culture 'dz-BT'
Success parse '-1.000000' in culture 'ebu'
Success parse '-1.000000' in culture 'ebu-KE'
Success parse '-1.000000' in culture 'ee'
Success parse '-1.000000' in culture 'ee-GH'
Success parse '-1.000000' in culture 'ee-TG'
Failed to parse '-1.000000' in culture 'el'
Failed to parse '-1.000000' in culture 'el-CY'
Failed to parse '-1.000000' in culture 'el-GR'
Success parse '-1.000000' in culture 'en'
Success parse '-1.000000' in culture 'en-001'
Success parse '-1.000000' in culture 'en-029'
Success parse '-1.000000' in culture 'en-150'
Success parse '-1.000000' in culture 'en-AE'
Success parse '-1.000000' in culture 'en-AG'
Success parse '-1.000000' in culture 'en-AI'
Success parse '-1.000000' in culture 'en-AS'
Failed to parse '-1.000000' in culture 'en-AT'
Success parse '-1.000000' in culture 'en-AU'
Success parse '-1.000000' in culture 'en-BB'
Failed to parse '-1.000000' in culture 'en-BE'
Success parse '-1.000000' in culture 'en-BI'
Success parse '-1.000000' in culture 'en-BM'
Success parse '-1.000000' in culture 'en-BS'
Success parse '-1.000000' in culture 'en-BW'
Success parse '-1.000000' in culture 'en-BZ'
Success parse '-1.000000' in culture 'en-CA'
Success parse '-1.000000' in culture 'en-CC'
Success parse '-1.000000' in culture 'en-CH'
Success parse '-1.000000' in culture 'en-CK'
Success parse '-1.000000' in culture 'en-CM'
Success parse '-1.000000' in culture 'en-CX'
Success parse '-1.000000' in culture 'en-CY'
Failed to parse '-1.000000' in culture 'en-DE'
Failed to parse '-1.000000' in culture 'en-DK'
Success parse '-1.000000' in culture 'en-DM'
Success parse '-1.000000' in culture 'en-ER'
Failed to parse '-1.000000' in culture 'en-FI'
Success parse '-1.000000' in culture 'en-FJ'
Success parse '-1.000000' in culture 'en-FK'
Success parse '-1.000000' in culture 'en-FM'
Success parse '-1.000000' in culture 'en-GB'
Success parse '-1.000000' in culture 'en-GD'
Success parse '-1.000000' in culture 'en-GG'
Success parse '-1.000000' in culture 'en-GH'
Success parse '-1.000000' in culture 'en-GI'
Success parse '-1.000000' in culture 'en-GM'
Success parse '-1.000000' in culture 'en-GU'
Success parse '-1.000000' in culture 'en-GY'
Success parse '-1.000000' in culture 'en-HK'
Failed to parse '-1.000000' in culture 'en-ID'
Success parse '-1.000000' in culture 'en-IE'
Success parse '-1.000000' in culture 'en-IL'
Success parse '-1.000000' in culture 'en-IM'
Success parse '-1.000000' in culture 'en-IN'
Success parse '-1.000000' in culture 'en-IO'
Success parse '-1.000000' in culture 'en-JE'
Success parse '-1.000000' in culture 'en-JM'
Success parse '-1.000000' in culture 'en-KE'
Success parse '-1.000000' in culture 'en-KI'
Success parse '-1.000000' in culture 'en-KN'
Success parse '-1.000000' in culture 'en-KY'
Success parse '-1.000000' in culture 'en-LC'
Success parse '-1.000000' in culture 'en-LR'
Success parse '-1.000000' in culture 'en-LS'
Success parse '-1.000000' in culture 'en-MG'
Success parse '-1.000000' in culture 'en-MH'
Success parse '-1.000000' in culture 'en-MO'
Success parse '-1.000000' in culture 'en-MP'
Success parse '-1.000000' in culture 'en-MS'
Success parse '-1.000000' in culture 'en-MT'
Success parse '-1.000000' in culture 'en-MU'
Success parse '-1.000000' in culture 'en-MW'
Success parse '-1.000000' in culture 'en-MY'
Success parse '-1.000000' in culture 'en-NA'
Success parse '-1.000000' in culture 'en-NF'
Success parse '-1.000000' in culture 'en-NG'
Failed to parse '-1.000000' in culture 'en-NL'
Success parse '-1.000000' in culture 'en-NR'
Success parse '-1.000000' in culture 'en-NU'
Success parse '-1.000000' in culture 'en-NZ'
Success parse '-1.000000' in culture 'en-PG'
Success parse '-1.000000' in culture 'en-PH'
Success parse '-1.000000' in culture 'en-PK'
Success parse '-1.000000' in culture 'en-PN'
Success parse '-1.000000' in culture 'en-PR'
Success parse '-1.000000' in culture 'en-PW'
Success parse '-1.000000' in culture 'en-RW'
Success parse '-1.000000' in culture 'en-SB'
Success parse '-1.000000' in culture 'en-SC'
Success parse '-1.000000' in culture 'en-SD'
Failed to parse '-1.000000' in culture 'en-SE'
Success parse '-1.000000' in culture 'en-SG'
Success parse '-1.000000' in culture 'en-SH'
Failed to parse '-1.000000' in culture 'en-SI'
Success parse '-1.000000' in culture 'en-SL'
Success parse '-1.000000' in culture 'en-SS'
Success parse '-1.000000' in culture 'en-SX'
Success parse '-1.000000' in culture 'en-SZ'
Success parse '-1.000000' in culture 'en-TC'
Success parse '-1.000000' in culture 'en-TK'
Success parse '-1.000000' in culture 'en-TO'
Success parse '-1.000000' in culture 'en-TT'
Success parse '-1.000000' in culture 'en-TV'
Success parse '-1.000000' in culture 'en-TZ'
Success parse '-1.000000' in culture 'en-UG'
Success parse '-1.000000' in culture 'en-UM'
Success parse '-1.000000' in culture 'en-US'
Success parse '-1.000000' in culture 'en-US-POSIX'
Success parse '-1.000000' in culture 'en-VC'
Success parse '-1.000000' in culture 'en-VG'
Success parse '-1.000000' in culture 'en-VI'
Success parse '-1.000000' in culture 'en-VU'
Success parse '-1.000000' in culture 'en-WS'
Failed to parse '-1.000000' in culture 'en-ZA'
Success parse '-1.000000' in culture 'en-ZM'
Success parse '-1.000000' in culture 'en-ZW'
Failed to parse '-1.000000' in culture 'eo'
Failed to parse '-1.000000' in culture 'eo-001'
Failed to parse '-1.000000' in culture 'es'
Success parse '-1.000000' in culture 'es-419'
Failed to parse '-1.000000' in culture 'es-AR'
Failed to parse '-1.000000' in culture 'es-BO'
Success parse '-1.000000' in culture 'es-BR'
Success parse '-1.000000' in culture 'es-BZ'
Failed to parse '-1.000000' in culture 'es-CL'
Failed to parse '-1.000000' in culture 'es-CO'
Failed to parse '-1.000000' in culture 'es-CR'
Success parse '-1.000000' in culture 'es-CU'
Success parse '-1.000000' in culture 'es-DO'
Failed to parse '-1.000000' in culture 'es-EC'
Failed to parse '-1.000000' in culture 'es-ES'
Failed to parse '-1.000000' in culture 'es-GQ'
Success parse '-1.000000' in culture 'es-GT'
Success parse '-1.000000' in culture 'es-HN'
Success parse '-1.000000' in culture 'es-MX'
Success parse '-1.000000' in culture 'es-NI'
Success parse '-1.000000' in culture 'es-PA'
Success parse '-1.000000' in culture 'es-PE'
Failed to parse '-1.000000' in culture 'es-PH'
Success parse '-1.000000' in culture 'es-PR'
Failed to parse '-1.000000' in culture 'es-PY'
Success parse '-1.000000' in culture 'es-SV'
Success parse '-1.000000' in culture 'es-US'
Failed to parse '-1.000000' in culture 'es-UY'
Failed to parse '-1.000000' in culture 'es-VE'
Failed to parse '-1.000000' in culture 'et'
Failed to parse '-1.000000' in culture 'et-EE'
Failed to parse '-1.000000' in culture 'eu'
Failed to parse '-1.000000' in culture 'eu-ES'
Failed to parse '-1.000000' in culture 'ewo'
Failed to parse '-1.000000' in culture 'ewo-CM'
Failed to parse '-1.000000' in culture 'fa'
Failed to parse '-1.000000' in culture 'fa-AF'
Failed to parse '-1.000000' in culture 'fa-IR'
Failed to parse '-1.000000' in culture 'ff'
Success parse '-1.000000' in culture 'ff-Adlm'
Success parse '-1.000000' in culture 'ff-Adlm-BF'
Success parse '-1.000000' in culture 'ff-Adlm-CM'
Success parse '-1.000000' in culture 'ff-Adlm-GH'
Success parse '-1.000000' in culture 'ff-Adlm-GM'
Success parse '-1.000000' in culture 'ff-Adlm-GN'
Success parse '-1.000000' in culture 'ff-Adlm-GW'
Success parse '-1.000000' in culture 'ff-Adlm-LR'
Success parse '-1.000000' in culture 'ff-Adlm-MR'
Success parse '-1.000000' in culture 'ff-Adlm-NE'
Success parse '-1.000000' in culture 'ff-Adlm-NG'
Success parse '-1.000000' in culture 'ff-Adlm-SL'
Success parse '-1.000000' in culture 'ff-Adlm-SN'
Failed to parse '-1.000000' in culture 'ff-Latn'
Failed to parse '-1.000000' in culture 'ff-Latn-BF'
Failed to parse '-1.000000' in culture 'ff-Latn-CM'
Failed to parse '-1.000000' in culture 'ff-Latn-GH'
Failed to parse '-1.000000' in culture 'ff-Latn-GM'
Failed to parse '-1.000000' in culture 'ff-Latn-GN'
Failed to parse '-1.000000' in culture 'ff-Latn-GW'
Failed to parse '-1.000000' in culture 'ff-Latn-LR'
Failed to parse '-1.000000' in culture 'ff-Latn-MR'
Failed to parse '-1.000000' in culture 'ff-Latn-NE'
Failed to parse '-1.000000' in culture 'ff-Latn-NG'
Failed to parse '-1.000000' in culture 'ff-Latn-SL'
Failed to parse '-1.000000' in culture 'ff-Latn-SN'
Failed to parse '-1.000000' in culture 'fi'
Failed to parse '-1.000000' in culture 'fi-FI'
Success parse '-1.000000' in culture 'fil'
Success parse '-1.000000' in culture 'fil-PH'
Failed to parse '-1.000000' in culture 'fo'
Failed to parse '-1.000000' in culture 'fo-DK'
Failed to parse '-1.000000' in culture 'fo-FO'
Failed to parse '-1.000000' in culture 'fr'
Failed to parse '-1.000000' in culture 'fr-029'
Failed to parse '-1.000000' in culture 'fr-BE'
Failed to parse '-1.000000' in culture 'fr-BF'
Failed to parse '-1.000000' in culture 'fr-BI'
Failed to parse '-1.000000' in culture 'fr-BJ'
Failed to parse '-1.000000' in culture 'fr-BL'
Failed to parse '-1.000000' in culture 'fr-CA'
Failed to parse '-1.000000' in culture 'fr-CD'
Failed to parse '-1.000000' in culture 'fr-CF'
Failed to parse '-1.000000' in culture 'fr-CG'
Failed to parse '-1.000000' in culture 'fr-CH'
Failed to parse '-1.000000' in culture 'fr-CI'
Failed to parse '-1.000000' in culture 'fr-CM'
Failed to parse '-1.000000' in culture 'fr-DJ'
Failed to parse '-1.000000' in culture 'fr-DZ'
Failed to parse '-1.000000' in culture 'fr-FR'
Failed to parse '-1.000000' in culture 'fr-GA'
Failed to parse '-1.000000' in culture 'fr-GF'
Failed to parse '-1.000000' in culture 'fr-GN'
Failed to parse '-1.000000' in culture 'fr-GP'
Failed to parse '-1.000000' in culture 'fr-GQ'
Failed to parse '-1.000000' in culture 'fr-HT'
Failed to parse '-1.000000' in culture 'fr-KM'
Failed to parse '-1.000000' in culture 'fr-LU'
Failed to parse '-1.000000' in culture 'fr-MA'
Failed to parse '-1.000000' in culture 'fr-MC'
Failed to parse '-1.000000' in culture 'fr-MF'
Failed to parse '-1.000000' in culture 'fr-MG'
Failed to parse '-1.000000' in culture 'fr-ML'
Failed to parse '-1.000000' in culture 'fr-MQ'
Failed to parse '-1.000000' in culture 'fr-MR'
Failed to parse '-1.000000' in culture 'fr-MU'
Failed to parse '-1.000000' in culture 'fr-NC'
Failed to parse '-1.000000' in culture 'fr-NE'
Failed to parse '-1.000000' in culture 'fr-PF'
Failed to parse '-1.000000' in culture 'fr-PM'
Failed to parse '-1.000000' in culture 'fr-RE'
Failed to parse '-1.000000' in culture 'fr-RW'
Failed to parse '-1.000000' in culture 'fr-SC'
Failed to parse '-1.000000' in culture 'fr-SN'
Failed to parse '-1.000000' in culture 'fr-SY'
Failed to parse '-1.000000' in culture 'fr-TD'
Failed to parse '-1.000000' in culture 'fr-TG'
Failed to parse '-1.000000' in culture 'fr-TN'
Failed to parse '-1.000000' in culture 'fr-VU'
Failed to parse '-1.000000' in culture 'fr-WF'
Failed to parse '-1.000000' in culture 'fr-YT'
Failed to parse '-1.000000' in culture 'fur'
Failed to parse '-1.000000' in culture 'fur-IT'
Failed to parse '-1.000000' in culture 'fy'
Failed to parse '-1.000000' in culture 'fy-NL'
Success parse '-1.000000' in culture 'ga'
Success parse '-1.000000' in culture 'ga-GB'
Success parse '-1.000000' in culture 'ga-IE'
Success parse '-1.000000' in culture 'gd'
Success parse '-1.000000' in culture 'gd-GB'
Failed to parse '-1.000000' in culture 'gl'
Failed to parse '-1.000000' in culture 'gl-ES'
Success parse '-1.000000' in culture 'gn'
Success parse '-1.000000' in culture 'gn-PY'
Success parse '-1.000000' in culture 'gsw'
Success parse '-1.000000' in culture 'gsw-CH'
Success parse '-1.000000' in culture 'gsw-FR'
Success parse '-1.000000' in culture 'gsw-LI'
Success parse '-1.000000' in culture 'gu'
Success parse '-1.000000' in culture 'gu-IN'
Success parse '-1.000000' in culture 'guz'
Success parse '-1.000000' in culture 'guz-KE'
Success parse '-1.000000' in culture 'gv'
Success parse '-1.000000' in culture 'gv-IM'
Success parse '-1.000000' in culture 'ha'
Success parse '-1.000000' in culture 'ha-GH'
Success parse '-1.000000' in culture 'ha-NE'
Success parse '-1.000000' in culture 'ha-NG'
Success parse '-1.000000' in culture 'haw'
Success parse '-1.000000' in culture 'haw-US'
Failed to parse '-1.000000' in culture 'he'
Failed to parse '-1.000000' in culture 'he-IL'
Success parse '-1.000000' in culture 'hi'
Success parse '-1.000000' in culture 'hi-IN'
Failed to parse '-1.000000' in culture 'hr'
Failed to parse '-1.000000' in culture 'hr-BA'
Failed to parse '-1.000000' in culture 'hr-HR'
Failed to parse '-1.000000' in culture 'hsb'
Failed to parse '-1.000000' in culture 'hsb-DE'
Failed to parse '-1.000000' in culture 'hu'
Failed to parse '-1.000000' in culture 'hu-HU'
Failed to parse '-1.000000' in culture 'hy'
Failed to parse '-1.000000' in culture 'hy-AM'
Failed to parse '-1.000000' in culture 'ia'
Failed to parse '-1.000000' in culture 'ia-001'
Success parse '-1.000000' in culture 'ibb'
Success parse '-1.000000' in culture 'ibb-NG'
Failed to parse '-1.000000' in culture 'id'
Failed to parse '-1.000000' in culture 'id-ID'
Success parse '-1.000000' in culture 'ig'
Success parse '-1.000000' in culture 'ig-NG'
Success parse '-1.000000' in culture 'ii'
Success parse '-1.000000' in culture 'ii-CN'
Failed to parse '-1.000000' in culture 'is'
Failed to parse '-1.000000' in culture 'is-IS'
Failed to parse '-1.000000' in culture 'it'
Success parse '-1.000000' in culture 'it-CH'
Failed to parse '-1.000000' in culture 'it-IT'
Failed to parse '-1.000000' in culture 'it-SM'
Failed to parse '-1.000000' in culture 'it-VA'
Success parse '-1.000000' in culture 'iu'
Success parse '-1.000000' in culture 'iu-CA'
Success parse '-1.000000' in culture 'iu-Latn'
Success parse '-1.000000' in culture 'iu-Latn-CA'
Success parse '-1.000000' in culture 'ja'
Success parse '-1.000000' in culture 'ja-JP'
Failed to parse '-1.000000' in culture 'jgo'
Failed to parse '-1.000000' in culture 'jgo-CM'
Success parse '-1.000000' in culture 'jmc'
Success parse '-1.000000' in culture 'jmc-TZ'
Failed to parse '-1.000000' in culture 'jv'
Failed to parse '-1.000000' in culture 'jv-ID'
Failed to parse '-1.000000' in culture 'jv-Java'
Failed to parse '-1.000000' in culture 'jv-Java-ID'
Failed to parse '-1.000000' in culture 'ka'
Failed to parse '-1.000000' in culture 'ka-GE'
Failed to parse '-1.000000' in culture 'kab'
Failed to parse '-1.000000' in culture 'kab-DZ'
Success parse '-1.000000' in culture 'kam'
Success parse '-1.000000' in culture 'kam-KE'
Success parse '-1.000000' in culture 'kde'
Success parse '-1.000000' in culture 'kde-TZ'
Failed to parse '-1.000000' in culture 'kea'
Failed to parse '-1.000000' in culture 'kea-CV'
Success parse '-1.000000' in culture 'khq'
Success parse '-1.000000' in culture 'khq-ML'
Success parse '-1.000000' in culture 'ki'
Success parse '-1.000000' in culture 'ki-KE'
Failed to parse '-1.000000' in culture 'kk'
Failed to parse '-1.000000' in culture 'kk-KZ'
Failed to parse '-1.000000' in culture 'kkj'
Failed to parse '-1.000000' in culture 'kkj-CM'
Failed to parse '-1.000000' in culture 'kl'
Failed to parse '-1.000000' in culture 'kl-GL'
Success parse '-1.000000' in culture 'kln'
Success parse '-1.000000' in culture 'kln-KE'
Failed to parse '-1.000000' in culture 'km'
Failed to parse '-1.000000' in culture 'km-KH'
Success parse '-1.000000' in culture 'kn'
Success parse '-1.000000' in culture 'kn-IN'
Success parse '-1.000000' in culture 'ko'
Success parse '-1.000000' in culture 'ko-KP'
Success parse '-1.000000' in culture 'ko-KR'
Success parse '-1.000000' in culture 'kok'
Success parse '-1.000000' in culture 'kok-IN'
Success parse '-1.000000' in culture 'kr'
Success parse '-1.000000' in culture 'kr-Latn'
Success parse '-1.000000' in culture 'kr-Latn-NG'
Failed to parse '-1.000000' in culture 'ks'
Failed to parse '-1.000000' in culture 'ks-Arab'
Failed to parse '-1.000000' in culture 'ks-Arab-IN'
Success parse '-1.000000' in culture 'ks-Deva'
Success parse '-1.000000' in culture 'ks-Deva-IN'
Success parse '-1.000000' in culture 'ksb'
Success parse '-1.000000' in culture 'ksb-TZ'
Failed to parse '-1.000000' in culture 'ksf'
Failed to parse '-1.000000' in culture 'ksf-CM'
Failed to parse '-1.000000' in culture 'ksh'
Failed to parse '-1.000000' in culture 'ksh-DE'
Success parse '-1.000000' in culture 'kw'
Success parse '-1.000000' in culture 'kw-GB'
Failed to parse '-1.000000' in culture 'ky'
Failed to parse '-1.000000' in culture 'ky-KG'
Success parse '-1.000000' in culture 'la'
Success parse '-1.000000' in culture 'la-VA'
Success parse '-1.000000' in culture 'lag'
Success parse '-1.000000' in culture 'lag-TZ'
Failed to parse '-1.000000' in culture 'lb'
Failed to parse '-1.000000' in culture 'lb-LU'
Success parse '-1.000000' in culture 'lg'
Success parse '-1.000000' in culture 'lg-UG'
Success parse '-1.000000' in culture 'lkt'
Success parse '-1.000000' in culture 'lkt-US'
Failed to parse '-1.000000' in culture 'ln'
Failed to parse '-1.000000' in culture 'ln-AO'
Failed to parse '-1.000000' in culture 'ln-CD'
Failed to parse '-1.000000' in culture 'ln-CF'
Failed to parse '-1.000000' in culture 'ln-CG'
Failed to parse '-1.000000' in culture 'lo'
Failed to parse '-1.000000' in culture 'lo-LA'
Failed to parse '-1.000000' in culture 'lrc'
Failed to parse '-1.000000' in culture 'lrc-IQ'
Failed to parse '-1.000000' in culture 'lrc-IR'
Failed to parse '-1.000000' in culture 'lt'
Failed to parse '-1.000000' in culture 'lt-LT'
Failed to parse '-1.000000' in culture 'lu'
Failed to parse '-1.000000' in culture 'lu-CD'
Success parse '-1.000000' in culture 'luo'
Success parse '-1.000000' in culture 'luo-KE'
Success parse '-1.000000' in culture 'luy'
Success parse '-1.000000' in culture 'luy-KE'
Failed to parse '-1.000000' in culture 'lv'
Failed to parse '-1.000000' in culture 'lv-LV'
Success parse '-1.000000' in culture 'mai'
Success parse '-1.000000' in culture 'mai-IN'
Success parse '-1.000000' in culture 'mas'
Success parse '-1.000000' in culture 'mas-KE'
Success parse '-1.000000' in culture 'mas-TZ'
Success parse '-1.000000' in culture 'mer'
Success parse '-1.000000' in culture 'mer-KE'
Success parse '-1.000000' in culture 'mfe'
Success parse '-1.000000' in culture 'mfe-MU'
Success parse '-1.000000' in culture 'mg'
Success parse '-1.000000' in culture 'mg-MG'
Failed to parse '-1.000000' in culture 'mgh'
Failed to parse '-1.000000' in culture 'mgh-MZ'
Success parse '-1.000000' in culture 'mgo'
Success parse '-1.000000' in culture 'mgo-CM'
Success parse '-1.000000' in culture 'mi'
Success parse '-1.000000' in culture 'mi-NZ'
Failed to parse '-1.000000' in culture 'mk'
Failed to parse '-1.000000' in culture 'mk-MK'
Success parse '-1.000000' in culture 'ml'
Success parse '-1.000000' in culture 'ml-IN'
Success parse '-1.000000' in culture 'mn'
Success parse '-1.000000' in culture 'mn-MN'
Success parse '-1.000000' in culture 'mn-Mong'
Success parse '-1.000000' in culture 'mn-Mong-CN'
Failed to parse '-1.000000' in culture 'mn-Mong-MN'
Success parse '-1.000000' in culture 'mni'
Success parse '-1.000000' in culture 'mni-Beng'
Success parse '-1.000000' in culture 'mni-Beng-IN'
Success parse '-1.000000' in culture 'moh'
Success parse '-1.000000' in culture 'moh-CA'
Success parse '-1.000000' in culture 'mr'
Success parse '-1.000000' in culture 'mr-IN'
Success parse '-1.000000' in culture 'ms'
Failed to parse '-1.000000' in culture 'ms-BN'
Failed to parse '-1.000000' in culture 'ms-ID'
Success parse '-1.000000' in culture 'ms-MY'
Success parse '-1.000000' in culture 'ms-SG'
Success parse '-1.000000' in culture 'mt'
Success parse '-1.000000' in culture 'mt-MT'
Failed to parse '-1.000000' in culture 'mua'
Failed to parse '-1.000000' in culture 'mua-CM'
Success parse '-1.000000' in culture 'my'
Success parse '-1.000000' in culture 'my-MM'
Failed to parse '-1.000000' in culture 'mzn'
Failed to parse '-1.000000' in culture 'mzn-IR'
Success parse '-1.000000' in culture 'naq'
Success parse '-1.000000' in culture 'naq-NA'
Failed to parse '-1.000000' in culture 'nb'
Failed to parse '-1.000000' in culture 'nb-NO'
Failed to parse '-1.000000' in culture 'nb-SJ'
Success parse '-1.000000' in culture 'nd'
Success parse '-1.000000' in culture 'nd-ZW'
Success parse '-1.000000' in culture 'nds'
Success parse '-1.000000' in culture 'nds-DE'
Success parse '-1.000000' in culture 'nds-NL'
Success parse '-1.000000' in culture 'ne'
Success parse '-1.000000' in culture 'ne-IN'
Success parse '-1.000000' in culture 'ne-NP'
Failed to parse '-1.000000' in culture 'nl'
Failed to parse '-1.000000' in culture 'nl-AW'
Failed to parse '-1.000000' in culture 'nl-BE'
Failed to parse '-1.000000' in culture 'nl-BQ'
Failed to parse '-1.000000' in culture 'nl-CW'
Failed to parse '-1.000000' in culture 'nl-NL'
Failed to parse '-1.000000' in culture 'nl-SR'
Failed to parse '-1.000000' in culture 'nl-SX'
Failed to parse '-1.000000' in culture 'nmg'
Failed to parse '-1.000000' in culture 'nmg-CM'
Failed to parse '-1.000000' in culture 'nn'
Failed to parse '-1.000000' in culture 'nn-NO'
Failed to parse '-1.000000' in culture 'nnh'
Failed to parse '-1.000000' in culture 'nnh-CM'
Success parse '-1.000000' in culture 'nqo'
Success parse '-1.000000' in culture 'nqo-GN'
Failed to parse '-1.000000' in culture 'nr'
Failed to parse '-1.000000' in culture 'nr-ZA'
Success parse '-1.000000' in culture 'nso'
Success parse '-1.000000' in culture 'nso-ZA'
Success parse '-1.000000' in culture 'nus'
Success parse '-1.000000' in culture 'nus-SS'
Success parse '-1.000000' in culture 'nyn'
Success parse '-1.000000' in culture 'nyn-UG'
Success parse '-1.000000' in culture 'oc'
Success parse '-1.000000' in culture 'oc-FR'
Success parse '-1.000000' in culture 'om'
Success parse '-1.000000' in culture 'om-ET'
Success parse '-1.000000' in culture 'om-KE'
Success parse '-1.000000' in culture 'or'
Success parse '-1.000000' in culture 'or-IN'
Failed to parse '-1.000000' in culture 'os'
Failed to parse '-1.000000' in culture 'os-GE'
Failed to parse '-1.000000' in culture 'os-RU'
Success parse '-1.000000' in culture 'pa'
Failed to parse '-1.000000' in culture 'pa-Arab'
Failed to parse '-1.000000' in culture 'pa-Arab-PK'
Success parse '-1.000000' in culture 'pa-Guru'
Success parse '-1.000000' in culture 'pa-Guru-IN'
Success parse '-1.000000' in culture 'pap'
Success parse '-1.000000' in culture 'pap-029'
Success parse '-1.000000' in culture 'pcm'
Success parse '-1.000000' in culture 'pcm-NG'
Failed to parse '-1.000000' in culture 'pl'
Failed to parse '-1.000000' in culture 'pl-PL'
Success parse '-1.000000' in culture 'prg'
Success parse '-1.000000' in culture 'prg-001'
Failed to parse '-1.000000' in culture 'ps'
Failed to parse '-1.000000' in culture 'ps-AF'
Failed to parse '-1.000000' in culture 'ps-PK'
Failed to parse '-1.000000' in culture 'pt'
Failed to parse '-1.000000' in culture 'pt-AO'
Failed to parse '-1.000000' in culture 'pt-BR'
Failed to parse '-1.000000' in culture 'pt-CH'
Failed to parse '-1.000000' in culture 'pt-CV'
Failed to parse '-1.000000' in culture 'pt-GQ'
Failed to parse '-1.000000' in culture 'pt-GW'
Failed to parse '-1.000000' in culture 'pt-LU'
Failed to parse '-1.000000' in culture 'pt-MO'
Failed to parse '-1.000000' in culture 'pt-MZ'
Failed to parse '-1.000000' in culture 'pt-PT'
Failed to parse '-1.000000' in culture 'pt-ST'
Failed to parse '-1.000000' in culture 'pt-TL'
Success parse '-1.000000' in culture 'qu'
Failed to parse '-1.000000' in culture 'qu-BO'
Success parse '-1.000000' in culture 'qu-EC'
Success parse '-1.000000' in culture 'qu-PE'
Success parse '-1.000000' in culture 'quc'
Success parse '-1.000000' in culture 'quc-GT'
Success parse '-1.000000' in culture 'rm'
Success parse '-1.000000' in culture 'rm-CH'
Failed to parse '-1.000000' in culture 'rn'
Failed to parse '-1.000000' in culture 'rn-BI'
Failed to parse '-1.000000' in culture 'ro'
Failed to parse '-1.000000' in culture 'ro-MD'
Failed to parse '-1.000000' in culture 'ro-RO'
Success parse '-1.000000' in culture 'rof'
Success parse '-1.000000' in culture 'rof-TZ'
Failed to parse '-1.000000' in culture 'ru'
Failed to parse '-1.000000' in culture 'ru-BY'
Failed to parse '-1.000000' in culture 'ru-KG'
Failed to parse '-1.000000' in culture 'ru-KZ'
Failed to parse '-1.000000' in culture 'ru-MD'
Failed to parse '-1.000000' in culture 'ru-RU'
Failed to parse '-1.000000' in culture 'ru-UA'
Failed to parse '-1.000000' in culture 'rw'
Failed to parse '-1.000000' in culture 'rw-RW'
Success parse '-1.000000' in culture 'rwk'
Success parse '-1.000000' in culture 'rwk-TZ'
Success parse '-1.000000' in culture 'sa'
Success parse '-1.000000' in culture 'sa-IN'
Failed to parse '-1.000000' in culture 'sah'
Failed to parse '-1.000000' in culture 'sah-RU'
Success parse '-1.000000' in culture 'saq'
Success parse '-1.000000' in culture 'saq-KE'
Success parse '-1.000000' in culture 'sat'
Success parse '-1.000000' in culture 'sat-Olck'
Success parse '-1.000000' in culture 'sat-Olck-IN'
Success parse '-1.000000' in culture 'sbp'
Success parse '-1.000000' in culture 'sbp-TZ'
Failed to parse '-1.000000' in culture 'sd'
Failed to parse '-1.000000' in culture 'sd-Arab'
Failed to parse '-1.000000' in culture 'sd-Arab-PK'
Success parse '-1.000000' in culture 'sd-Deva'
Success parse '-1.000000' in culture 'sd-Deva-IN'
Failed to parse '-1.000000' in culture 'se'
Failed to parse '-1.000000' in culture 'se-FI'
Failed to parse '-1.000000' in culture 'se-NO'
Failed to parse '-1.000000' in culture 'se-SE'
Failed to parse '-1.000000' in culture 'seh'
Failed to parse '-1.000000' in culture 'seh-MZ'
Success parse '-1.000000' in culture 'ses'
Success parse '-1.000000' in culture 'ses-ML'
Failed to parse '-1.000000' in culture 'sg'
Failed to parse '-1.000000' in culture 'sg-CF'
Failed to parse '-1.000000' in culture 'shi'
Failed to parse '-1.000000' in culture 'shi-Latn'
Failed to parse '-1.000000' in culture 'shi-Latn-MA'
Failed to parse '-1.000000' in culture 'shi-Tfng'
Failed to parse '-1.000000' in culture 'shi-Tfng-MA'
Success parse '-1.000000' in culture 'si'
Success parse '-1.000000' in culture 'si-LK'
Failed to parse '-1.000000' in culture 'sk'
Failed to parse '-1.000000' in culture 'sk-SK'
Failed to parse '-1.000000' in culture 'sl'
Failed to parse '-1.000000' in culture 'sl-SI'
Success parse '-1.000000' in culture 'sma'
Success parse '-1.000000' in culture 'sma-NO'
Success parse '-1.000000' in culture 'sma-SE'
Success parse '-1.000000' in culture 'smj'
Success parse '-1.000000' in culture 'smj-NO'
Success parse '-1.000000' in culture 'smj-SE'
Failed to parse '-1.000000' in culture 'smn'
Failed to parse '-1.000000' in culture 'smn-FI'
Success parse '-1.000000' in culture 'sms'
Success parse '-1.000000' in culture 'sms-FI'
Success parse '-1.000000' in culture 'sn'
Success parse '-1.000000' in culture 'sn-ZW'
Success parse '-1.000000' in culture 'so'
Success parse '-1.000000' in culture 'so-DJ'
Success parse '-1.000000' in culture 'so-ET'
Success parse '-1.000000' in culture 'so-KE'
Success parse '-1.000000' in culture 'so-SO'
Failed to parse '-1.000000' in culture 'sq'
Failed to parse '-1.000000' in culture 'sq-AL'
Failed to parse '-1.000000' in culture 'sq-MK'
Failed to parse '-1.000000' in culture 'sq-XK'
Failed to parse '-1.000000' in culture 'sr'
Failed to parse '-1.000000' in culture 'sr-Cyrl'
Failed to parse '-1.000000' in culture 'sr-Cyrl-BA'
Failed to parse '-1.000000' in culture 'sr-Cyrl-ME'
Failed to parse '-1.000000' in culture 'sr-Cyrl-RS'
Failed to parse '-1.000000' in culture 'sr-Cyrl-XK'
Failed to parse '-1.000000' in culture 'sr-Latn'
Failed to parse '-1.000000' in culture 'sr-Latn-BA'
Failed to parse '-1.000000' in culture 'sr-Latn-ME'
Failed to parse '-1.000000' in culture 'sr-Latn-RS'
Failed to parse '-1.000000' in culture 'sr-Latn-XK'
Failed to parse '-1.000000' in culture 'ss'
Failed to parse '-1.000000' in culture 'ss-SZ'
Failed to parse '-1.000000' in culture 'ss-ZA'
Success parse '-1.000000' in culture 'ssy'
Success parse '-1.000000' in culture 'ssy-ER'
Failed to parse '-1.000000' in culture 'st'
Failed to parse '-1.000000' in culture 'st-LS'
Failed to parse '-1.000000' in culture 'st-ZA'
Failed to parse '-1.000000' in culture 'su'
Failed to parse '-1.000000' in culture 'su-Latn'
Failed to parse '-1.000000' in culture 'su-Latn-ID'
Failed to parse '-1.000000' in culture 'sv'
Failed to parse '-1.000000' in culture 'sv-AX'
Failed to parse '-1.000000' in culture 'sv-FI'
Failed to parse '-1.000000' in culture 'sv-SE'
Success parse '-1.000000' in culture 'sw'
Failed to parse '-1.000000' in culture 'sw-CD'
Success parse '-1.000000' in culture 'sw-KE'
Success parse '-1.000000' in culture 'sw-TZ'
Success parse '-1.000000' in culture 'sw-UG'
Success parse '-1.000000' in culture 'syr'
Success parse '-1.000000' in culture 'syr-SY'
Success parse '-1.000000' in culture 'ta'
Success parse '-1.000000' in culture 'ta-IN'
Success parse '-1.000000' in culture 'ta-LK'
Success parse '-1.000000' in culture 'ta-MY'
Success parse '-1.000000' in culture 'ta-SG'
Success parse '-1.000000' in culture 'te'
Success parse '-1.000000' in culture 'te-IN'
Success parse '-1.000000' in culture 'teo'
Success parse '-1.000000' in culture 'teo-KE'
Success parse '-1.000000' in culture 'teo-UG'
Failed to parse '-1.000000' in culture 'tg'
Failed to parse '-1.000000' in culture 'tg-TJ'
Success parse '-1.000000' in culture 'th'
Success parse '-1.000000' in culture 'th-TH'
Success parse '-1.000000' in culture 'ti'
Success parse '-1.000000' in culture 'ti-ER'
Success parse '-1.000000' in culture 'ti-ET'
Success parse '-1.000000' in culture 'tig'
Success parse '-1.000000' in culture 'tig-ER'
Failed to parse '-1.000000' in culture 'tk'
Failed to parse '-1.000000' in culture 'tk-TM'
Success parse '-1.000000' in culture 'tn'
Success parse '-1.000000' in culture 'tn-BW'
Success parse '-1.000000' in culture 'tn-ZA'
Success parse '-1.000000' in culture 'to'
Success parse '-1.000000' in culture 'to-TO'
Failed to parse '-1.000000' in culture 'tr'
Failed to parse '-1.000000' in culture 'tr-CY'
Failed to parse '-1.000000' in culture 'tr-TR'
Failed to parse '-1.000000' in culture 'ts'
Failed to parse '-1.000000' in culture 'ts-ZA'
Failed to parse '-1.000000' in culture 'tt'
Failed to parse '-1.000000' in culture 'tt-RU'
Success parse '-1.000000' in culture 'twq'
Success parse '-1.000000' in culture 'twq-NE'
Failed to parse '-1.000000' in culture 'tzm'
Failed to parse '-1.000000' in culture 'tzm-Arab'
Failed to parse '-1.000000' in culture 'tzm-Arab-MA'
Failed to parse '-1.000000' in culture 'tzm-DZ'
Failed to parse '-1.000000' in culture 'tzm-MA'
Failed to parse '-1.000000' in culture 'tzm-Tfng'
Failed to parse '-1.000000' in culture 'tzm-Tfng-MA'
Success parse '-1.000000' in culture 'ug'
Success parse '-1.000000' in culture 'ug-CN'
Failed to parse '-1.000000' in culture 'uk'
Failed to parse '-1.000000' in culture 'uk-UA'
Failed to parse '-1.000000' in culture 'ur'
Failed to parse '-1.000000' in culture 'ur-IN'
Failed to parse '-1.000000' in culture 'ur-PK'
Failed to parse '-1.000000' in culture 'uz'
Failed to parse '-1.000000' in culture 'uz-Arab'
Failed to parse '-1.000000' in culture 'uz-Arab-AF'
Failed to parse '-1.000000' in culture 'uz-Cyrl'
Failed to parse '-1.000000' in culture 'uz-Cyrl-UZ'
Failed to parse '-1.000000' in culture 'uz-Latn'
Failed to parse '-1.000000' in culture 'uz-Latn-UZ'
Success parse '-1.000000' in culture 'vai'
Success parse '-1.000000' in culture 'vai-Latn'
Success parse '-1.000000' in culture 'vai-Latn-LR'
Success parse '-1.000000' in culture 'vai-Vaii'
Success parse '-1.000000' in culture 'vai-Vaii-LR'
Failed to parse '-1.000000' in culture 've'
Failed to parse '-1.000000' in culture 've-ZA'
Failed to parse '-1.000000' in culture 'vi'
Failed to parse '-1.000000' in culture 'vi-VN'
Success parse '-1.000000' in culture 'vo'
Success parse '-1.000000' in culture 'vo-001'
Success parse '-1.000000' in culture 'vun'
Success parse '-1.000000' in culture 'vun-TZ'
Failed to parse '-1.000000' in culture 'wae'
Failed to parse '-1.000000' in culture 'wae-CH'
Success parse '-1.000000' in culture 'wal'
Success parse '-1.000000' in culture 'wal-ET'
Failed to parse '-1.000000' in culture 'wo'
Failed to parse '-1.000000' in culture 'wo-SN'
Success parse '-1.000000' in culture 'xh'
Success parse '-1.000000' in culture 'xh-ZA'
Success parse '-1.000000' in culture 'xog'
Success parse '-1.000000' in culture 'xog-UG'
Failed to parse '-1.000000' in culture 'yav'
Failed to parse '-1.000000' in culture 'yav-CM'
Success parse '-1.000000' in culture 'yi'
Success parse '-1.000000' in culture 'yi-001'
Success parse '-1.000000' in culture 'yo'
Success parse '-1.000000' in culture 'yo-BJ'
Success parse '-1.000000' in culture 'yo-NG'
Failed to parse '-1.000000' in culture 'zgh'
Failed to parse '-1.000000' in culture 'zgh-MA'
Success parse '-1.000000' in culture 'zh'
Success parse '-1.000000' in culture 'zh-Hans'
Success parse '-1.000000' in culture 'zh-Hans-CN'
Success parse '-1.000000' in culture 'zh-Hans-HK'
Success parse '-1.000000' in culture 'zh-Hans-MO'
Success parse '-1.000000' in culture 'zh-Hans-SG'
Success parse '-1.000000' in culture 'zh-Hant'
Success parse '-1.000000' in culture 'zh-Hant-HK'
Success parse '-1.000000' in culture 'zh-Hant-MO'
Success parse '-1.000000' in culture 'zh-Hant-TW'
Success parse '-1.000000' in culture 'zu'
Success parse '-1.000000' in culture 'zu-ZA'

I will fix this issue in a subsequent version and will reply to this post again once the new version is ready. Thanks for your feedback.

bodong1987 commented 4 months ago

hello, UnrealSharp.Toolkit v1.2.1 is ready now. You can try updating the nuget package to this version first. If your problem cannot be solved with this version, it is recommended that you find Tools/UnrealSharp.Programs.sln and open it, which contains the configuration for generating C# code.

{
  "profiles": {
    "UnrealSharpTool-NativeBindingGen": {
      "commandName": "Project",
      "commandLineArgs": "-m codegen -t JsonDoc -i $(SolutionDir)../Intermediate/UnrealSharp/NativeTypeDefinition.tdb -p $(SolutionDir)../ -s NativeBinding"
    },
    "UnrealSharpTool-BlueprintBindingGen": {
      "commandName": "Project",
      "commandLineArgs": "-m codegen -t JsonDoc -i $(SolutionDir)../Intermediate/UnrealSharp/BlueprintTypeDefinition.tdb -p $(SolutionDir)../ -s BlueprintBinding"
    },
    "UnrealSharpTool-GameScripts-DefCodeGen": {
      "commandName": "Project",
      "commandLineArgs": "-m codegen -t CSharpCode -i $(SolutionDir)../GameScripts/Game/UnrealSharp.GameScripts -p $(SolutionDir)../ -s CSharpBinding"
    },
    "UnrealSharpTool-GameScripts-TdbGen": {
        "commandName": "Project",
        "commandLineArgs": "-m typegen -a $(SolutionDir)../Managed/Debug-Windows-Editor/UnrealSharp.GameScripts.dll -p $(SolutionDir)../ --sourceDirectory $(SolutionDir)Game/UnrealSharp.GameScripts --sourceFileIgnoreRegex \"[/\\\\]Bindings\\.Defs|obj[/\\\\]\" -o $(SolutionDir)../Managed/UnrealSharp.GameScripts.tdb"
    },
    "UnrealSharpTool-GameContent-DefCodeGen": {
      "commandName": "Project",
      "commandLineArgs": "-m codegen -t CSharpCode -i $(SolutionDir)../GameScripts/Game/UnrealSharp.GameContent/ -p $(SolutionDir)../ -s CSharpBinding" 
    },
    "UnrealSharpTool-GameContent-TdbGen": {
        "commandName": "Project",
        "commandLineArgs": "-m typegen -a $(SolutionDir)../Managed/Debug-Windows-Editor/UnrealSharp.GameContent.dll -p $(SolutionDir)../ --sourceDirectory $(SolutionDir)Game/UnrealSharp.GameContent --sourceFileIgnoreRegex \"[/\\\\]Bindings\\.Defs|obj[/\\\\]\" -o $(SolutionDir)../Managed/UnrealSharp.GameContent.tdb"
    }
  }
}

Select these configuration items to directly debug the corresponding generator code. The code related to the default value of the float function parameter is located in the function DecorateDefaultValueText of Programs/UnrealSharpTool.Core/CodeGen/Processors/NumericPropertyProcessor.cs.

   /// <summary>
    /// Decorates the default value text.
    /// </summary>
    /// <param name="property">The property.</param>
    /// <param name="value">The value.</param>
    /// <param name="usage">The usage.</param>
    /// <returns>System.Nullable&lt;System.String&gt;.</returns>
    public override string? DecorateDefaultValueText(PropertyDefinition property, string value,
        ELocalUsageScenarioType usage)
    {
        if (usage.HasFlag(ELocalUsageScenarioType.Field))
        {
            if (value.All(x => x is '0' or '.'))
            {
                return null;
            }
        }

        switch (property.TypeClass)
        {
            case "IntProperty":
            {
                if (int.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out _))
                {
                    return value.Trim();
                }

                break;
            }
            case "UInt32Property":
            {
                if (uint.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out _))
                {
                    return value.Trim();
                }

                break;
            }
            case "Int64Property":
            {
                if (long.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out _))
                {
                    return value.Trim();
                }

                break;
            }
            case "UInt64Property":
            {
                if (ulong.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out _))
                {
                    return value.Trim();
                }

                break;
            }
            case "Int8Property":
            {
                if (sbyte.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out _))
                {
                    return value.Trim();
                }

                break;
            }
            case "Int16Property":
            {
                if (short.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out _))
                {
                    return value.Trim();
                }

                break;
            }
            case "UInt16Property":
            {
                if (ushort.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out _))
                {
                    return value.Trim();
                }

                break;
            }
            case "FloatProperty":
            {
                if (float.TryParse(value, NumberStyles.Float, CultureInfo.InvariantCulture, out _))
                {
                    return $"{value}f";
                }

                break;
            }
            case "DoubleProperty":
            {
                if (double.TryParse(value, NumberStyles.Float, CultureInfo.InvariantCulture, out _))
                {
                    return $"{value}d";
                }

                break;
            }
            default:
            {
                if (property.IsByteEnum)
                {
                    return value == "(INVALID)" ? null : $"{property.ByteEnumName}.{value}";
                }

                if (property.TypeClass == "ByteProperty")
                {
                    return property.IsByteEnum ? property.ByteEnumName : value;
                }

                break;
            }
        }

        return value;
    }

If you have other questions, please continue to reply.

gillesF78 commented 4 months ago

I have the same output as you.

I added the line code Console.WriteLine($"Current Culture is '{CultureInfo.CurrentCulture.Name}'");

And the output is: ... Failed to parse '-1.000000' in culture 'fr-FR' ... Current Culture is 'fr-FR'

In fr-FR, the decimal separator is a comma ',' ==> value should be "-1,000000";

namespace ConsoleApp22
{
    internal class Program
    {
        static void Main(string[] args)
        {
            string value = "-1,000000";
            foreach (CultureInfo culture in CultureInfo.GetCultures(CultureTypes.AllCultures))
            {
                float result;
                bool success = float.TryParse(value, NumberStyles.Float, culture, out result);
                if (!success)
                {
                    Console.WriteLine($"Failed to parse '{value}' in culture '{culture.Name}'");
                }
                else
                {
                    Console.WriteLine($"Success parse '{value}' in culture '{culture.Name}'");
                }
            }
            Console.WriteLine($"Current Culture is '{CultureInfo.CurrentCulture.Name}'");
        }
    }
}

And the output is: ... Success parse '-1,000000' in culture 'fr-FR' ... Current Culture is 'fr-FR'

I did not find the file named "Programs/UnrealSharpTool.Core/CodeGen/Processors/NumericPropertyProcessor.cs"

I suppose it is a source file of the UnrealSharpTool.Toolkit nuget package.

Could you fix the code to make it work with CultureInfo.CurrentCulture like 'fr-FR' ?

bodong1987 commented 4 months ago

I have the same output as you.

I added the line code Console.WriteLine($"Current Culture is '{CultureInfo.CurrentCulture.Name}'");

And the output is: ... Failed to parse '-1.000000' in culture 'fr-FR' ... Current Culture is 'fr-FR'

In fr-FR, the decimal separator is a comma ',' ==> value should be "-1,000000";

namespace ConsoleApp22
{
    internal class Program
    {
        static void Main(string[] args)
        {
            string value = "-1,000000";
            foreach (CultureInfo culture in CultureInfo.GetCultures(CultureTypes.AllCultures))
            {
                float result;
                bool success = float.TryParse(value, NumberStyles.Float, culture, out result);
                if (!success)
                {
                    Console.WriteLine($"Failed to parse '{value}' in culture '{culture.Name}'");
                }
                else
                {
                    Console.WriteLine($"Success parse '{value}' in culture '{culture.Name}'");
                }
            }
            Console.WriteLine($"Current Culture is '{CultureInfo.CurrentCulture.Name}'");
        }
    }
}

And the output is: ... Success parse '-1,000000' in culture 'fr-FR' ... Current Culture is 'fr-FR'

I did not find the file named "Programs/UnrealSharpTool.Core/CodeGen/Processors/NumericPropertyProcessor.cs"

I suppose it is a source file of the UnrealSharpTool.Toolkit nuget package.

Could you fix the code to make it work with CultureInfo.CurrentCulture like 'fr-FR' ?

You can first try the 1.2.1 version of the toolkit to see if it is useful. Then, the source code for the toolkit has been placed on GitHub, here: https://github.com/bodong1987/UnrealSharp/tree/main/Tools. You may need to update the repository. Additionally, this article explains how to use the generator source code directly instead of the toolkit: https://github.com/bodong1987/UnrealSharp/blob/main/Docs/WorkWithoutToolkit.md. If version 1.2.1 cannot solve your problem, I hope you can try using the generator source code directly and help me solve this issue, because I cannot reproduce it in my local environment, which makes it difficult to test.

gillesF78 commented 4 months ago

You can first try the 1.2.1 version of the toolkit to see if it is useful.

I cannot because I failed to solve the issue : see You are trying to install this package into a project that targets 'native,Version=v0.0'