InjectFix icon indicating copy to clipboard operation
InjectFix copied to clipboard

Exception: cat not find id field: OpenURLOnClick-OnClick0, for Void OnClick()

Open zsy5882-hub opened this issue 8 months ago • 1 comments

Exception: cat not find id field: OpenURLOnClick-OnClick0, for Void OnClick() IFix.Core.PatchManager.getMapId (System.Collections.Generic.List`1[T] idMapArray, System.Reflection.MethodBase method) (at <26c690fe63344b5a836052ca10646f38>:0) IFix.Core.PatchManager.Load (System.IO.Stream stream, System.Boolean checkNew) (at <26c690fe63344b5a836052ca10646f38>:0) MYCSPatchManager.DoPatch () (at :0) UnityEngine.Debug:LogException(Exception) MYLogger:LogException(Exception) (at Assets/Plugins/MYLogger.cs:216) MYCSPatchManager:DoPatch() MYGameStartUp:StartGame() MYUIUpdater:enterGame(Event) Horizon.EventMgr:HandleEvent(Event) Horizon.EventMgr:Update() MYGameStartUp:Update()

zsy5882-hub avatar Apr 21 '25 03:04 zsy5882-hub

public class OpenURLOnClick : MonoBehaviour { void OnClick() { UILabel lbl = GetComponent<UILabel>();

    if (lbl != null)
    {
        string url = lbl.GetUrlAtPosition(UICamera.lastWorldPosition);
        if (!string.IsNullOrEmpty(url)) IOSUrlNew.OpenURL(url);
    }
}

}

原来在这个OnClick加了[IFix.Patch],现在想把这个取消,但是一直报这个错,导致代码热更一直不生效

zsy5882-hub avatar Apr 21 '25 03:04 zsy5882-hub