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

Float values limited? #2

Closed
SilentGamzee opened this issue May 18, 2022 · 12 comments
Closed

Float values limited? #2

SilentGamzee opened this issue May 18, 2022 · 12 comments
Labels

Comments

@SilentGamzee
Copy link

Changing float values ​​seems to be limited to [-0.02f; 0.02f] when changing by holding down the mouse button.
Unity 2021.3.2f1
Rosetta UI 0.0.2 (last version from Package Manager)

P.s. In general, the framework looks very good, thank you very much)

@fuqunaga
Copy link
Owner

Is it the action of dragging a label?
It is UIToolkit's FloatField and behaves similarly to the Unity Inspector.
You can also change the step width by holding down Shift/Ctrl.

Thank you for your report😀

@SilentGamzee
Copy link
Author

Example. I increase the float value to the right, but the value does not become more than 0.2f. Looks weird and uncomfortable.
Is this a UIToolkit problem? Everything is fine with int fields
https://user-images.githubusercontent.com/25285476/169289915-68ea6be9-a9b6-468a-868c-32fcd9be1d37.mp4

@fuqunaga
Copy link
Owner

Thank you for the movie.

I could not reproduce it in my environment.
check2

I don't know the cause of the problem, so I need some information.
If possible, please try the latest version (RosettaUI 0.2.2) or another environment.
If you always have the same problem, please send me a sample project and I will try to reproduce it.

@SilentGamzee
Copy link
Author

I downloaded the project from git (version 0.2.2), launched it in Unity 2021.2.8f, the problem remained

@fuqunaga
Copy link
Owner

Try a different PC or OS if possible.
I tried it on my M1 Macbook Air and the UIToolkit dragging did not work correctly (but it seems not the same issue).
It worked correctly on Windows.

@SilentGamzee
Copy link
Author

I made a build (version 0.2.2. Unity version 2021.2.8f), tried to run it on two more PCs, the bug remained. Tried only Windows

@fuqunaga
Copy link
Owner

I'm sorry, but I can't figure out what's causing this.
If you have any information to reproduce it on my end, please let me know.

@SilentGamzee
Copy link
Author

Later, when I finish the tasks for my project, I will try to find the causes of this problem and fix it locally. I'll post here if I find a solution.

@juh9870
Copy link
Contributor

juh9870 commented Sep 28, 2022

I have the same issueI have the same issue
I was going through all the examples one by one, and first noticed this at MethodExample, came back to older ones and error is still here
https://user-images.githubusercontent.com/15922601/192898528-cae4756f-d170-4fe3-bad1-9e40636f9440.mp4

@juh9870
Copy link
Contributor

juh9870 commented Sep 29, 2022

I've figured out this issue. The cause is that StringToValue method uses EditorGUI.StringToDouble, which in turn uses double.TryParse without specifying explicit culture, so if default system culture formats floats not like 9.5, but for example 9,5 it bugs out

@juh9870
Copy link
Contributor

juh9870 commented Sep 29, 2022

The same issue causes #4

github-actions bot pushed a commit that referenced this issue Nov 22, 2022
# [ga.fuquna.rosettaui.uitoolkit-v1.0.1](ga.fuquna.rosettaui.uitoolkit-v1.0.0...ga.fuquna.rosettaui.uitoolkit-v1.0.1) (2022-11-22)

### Bug Fixes

* [#2](#2), [#4](#4) Decimal points are not entered correctly when mouse dragging in some cultures ([17f7f7a](17f7f7a))

### Performance Improvements

* Window now fixes style.width after initial layout to improve layout performance. [#5](#5) [#9](#9) [#13](#13) ([27564e1](27564e1))
@github-actions
Copy link

🎉 This issue has been resolved in version ga.fuquna.rosettaui.uitoolkit-v1.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

fuqunaga pushed a commit that referenced this issue Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants