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

[Bug?] Building Repair system by menu / "_repairDataForMenu.HasValue" always false #2384

Closed dglee2592 closed 6 months ago

dglee2592 commented 6 months ago

Hello, I'm now trying the building repair system with 1.86d fresh kit. However when I tried it, "_repairDataForMenu" variable always empty so "_repairDataForMenu.HasValue" returns false everywhere in the code so repair button in "UICurrentBuilding" is not shown and cannot repair

I asked this to discord but nobody answered me... Can you check this?

insthync commented 6 months ago

Did you turn canRepairFromMenu on?

dglee2592 commented 6 months ago

Yes sure. I did double check

insthync commented 6 months ago

I try to reproduce it around 4 hours, but it has no problem

insthync commented 6 months ago

Try replace the function in building entity

        public bool CanRepairByMenu()
        {
            if (CacheRepairs.Count <= 0)
                return false;
            return _repairDataForMenu.HasValue;
        }