suriyun-production / mmorpg-kit-docs

This is document for MMORPG KIT project (https://www.assetstore.unity3d.com/#!/content/110188?aid=1100lGeN)
https://suriyun-production.github.io/mmorpg-kit-docs
49 stars 11 forks source link

(Integration) UIGageValue #2451

Closed Eniotnacram closed 2 months ago

Eniotnacram commented 2 months ago

Hi, I modified the UIGageValue to add the option to make the gages smooth. I added a bool (false by default) so it doesnt break customers projects. Simple bool to activate it, and a float to set the smoothness speed. The user need to make sure to set the "Update UI Repeat Rate" lower to make the transition smooth.

There is the modified code: UIGageValue.zip

Note that I tried to make a merge request but it seems that I dont have access to the core repo anymore.

insthync commented 2 months ago

Thank you, I will check it later

On Sat, Apr 13, 2024, 11:10 PM Influency @.***> wrote:

Hi, I modified the UIGageValue to add the option to make the gages smooth. I added a bool (false by default) so it doesnt break customers projects. Simple bool to activate it, and a float to set the smoothness speed. The user need to make sure to set the "Update UI Repeat Rate" lower to make the transition smooth.

There is the modified code: UIGageValue.zip https://github.com/suriyun-production/mmorpg-kit-docs/files/14967999/UIGageValue.zip

Note that I tried to make a merge request but it seems that I dont have access to the core repo anymore.

— Reply to this email directly, view it on GitHub https://github.com/suriyun-production/mmorpg-kit-docs/issues/2451, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUSSTW6K3DTNJPI7NJKXDLY5FKG3AVCNFSM6AAAAABGFSG4BWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI2DCNRTHEYDINA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Eniotnacram commented 2 months ago

Hello,

For some reason it's not working properly on the Monster Character UI, it works perfectly fine for the Gameplay UI. Maybe some sort of entity sync problem, I'm not sure. The "Update UI Repeat Rate" is set to 0.05 on them. I will investigate

insthync commented 2 months ago

Try my commit: feat: smooth gage updating

Eniotnacram commented 2 months ago

Nice! I was wondering about using coroutines! Going to bed now, I will test tomorow!

Thanks suri

Eniotnacram commented 2 months ago

Hello,

A little error was triggering "NullReferenceException"

Line 117: (!Mathf.Approximately(imageGage.fillAmount, targetRate))

Fix: It should be "sliderGage.value" instead of "imageGage.fillAmount"

With that simple fix, it works PERFECTLY! thank you.