Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ink Story converts floats based on user system regional settings #207

Open
tarnos12 opened this issue Sep 28, 2024 · 6 comments
Open

Ink Story converts floats based on user system regional settings #207

tarnos12 opened this issue Sep 28, 2024 · 6 comments

Comments

@tarnos12
Copy link

I have a problem with Unity reading 0.234 as 0,234 when I parse a tag

This can be fixed by changing system regional format to USA(so it uses a dot instead of a comma)

Problem is that this does not save when the game is compiled, so other users will experience issues if their regional format is not set to something that uses dot for a float.

Is there something that I might need to change in Unity or ink compiler/config?

"audioambient:asset\'ambient_sanctuary_deep\',volume\'0,15\',loop\'0\'"

This is the tag from story.CurrentTags where volume is 0,15 instead of 0.15 which is based on my regional settings.

@tomkail
Copy link
Collaborator

tomkail commented Oct 1, 2024 via email

@tarnos12
Copy link
Author

tarnos12 commented Oct 1, 2024

Hey, I thought it might be related to Unity plugin.
The issue happens after the game is compiled, so the plugin is the one reading the json and converting it into readable format?

story.CurrentTags gives me values with a comma(or a dot based on my system settings)

@tomkail
Copy link
Collaborator

tomkail commented Oct 1, 2024 via email

@tarnos12
Copy link
Author

tarnos12 commented Oct 1, 2024

Sorry for the confusion.
Do you know specific channel to ask this question on the discord?
I found Unity integration, but that's the same as this.
Inky-engine-dev perhaps?

@tomkail
Copy link
Collaborator

tomkail commented Oct 1, 2024 via email

@tarnos12
Copy link
Author

tarnos12 commented Oct 1, 2024

Thanks, I have done what you said.
We have figured out that the issue happens with inky variables converting floats without Invariant Culture.
Probably with .toString()

This issue can be closed.

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

No branches or pull requests

2 participants