Skip to content

Conversation

@RamiAhmed
Copy link

@RamiAhmed RamiAhmed commented Dec 19, 2025

As explained in #266, the package does not compile in Unity 6.3 LTS due to SceneHandle.ToString(CultureInfo.InvariantCulture) no longer being valid.

However, the proposed fix in #266 is incorrect. It passes CultureInfo.InvariantCulture.ToString() (which returns a string like "Invariant Language (Invariant Country)") as a parameter to SceneHandle.ToString(). This compiles but is semantically wrong - it's not actually using the culture for formatting.

The correct fix is to call SceneHandle.ToString() without parameters, as SceneHandle does not implement IFormattable and does not support culture-specific formatting. I've used preprocessor directives to apply this fix only to Unity 6000.3+ to maintain backwards compatibility with the existing implementation.

Tested on Unity 6.3 LTS.

@RamiAhmed RamiAhmed changed the title Fix Argument 1: cannot convert 'System.Globalization.CultureIn… for Unity 600.3+ Fix Argument 1: cannot convert 'System.Globalization.CultureIn… for Unity 6000.3+ Dec 19, 2025
@RamiAhmed RamiAhmed marked this pull request as ready for review December 19, 2025 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant