RosettaUI icon indicating copy to clipboard operation
RosettaUI copied to clipboard

Float values limited?

Open SilentGamzee opened this issue 2 years ago • 11 comments

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)

SilentGamzee avatar May 18 '22 20:05 SilentGamzee

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😀

fuqunaga avatar May 19 '22 08:05 fuqunaga

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

SilentGamzee avatar May 19 '22 12:05 SilentGamzee

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.

fuqunaga avatar May 20 '22 05:05 fuqunaga

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

SilentGamzee avatar May 20 '22 08:05 SilentGamzee

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.

fuqunaga avatar May 20 '22 13:05 fuqunaga

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

SilentGamzee avatar May 20 '22 20:05 SilentGamzee

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.

fuqunaga avatar May 21 '22 02:05 fuqunaga

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.

SilentGamzee avatar May 21 '22 14:05 SilentGamzee

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 avatar Sep 28 '22 22:09 juh9870

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 avatar Sep 29 '22 16:09 juh9870

The same issue causes #4

juh9870 avatar Sep 29 '22 17:09 juh9870

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

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Nov 22 '22 08:11 github-actions[bot]