Ejemplo n.º 1
0
        private void SetActive_Replace(bool value)
        {
            GameObject gameObject = (this as object) as GameObject;

            if (HookedGameObject.Equals(gameObject))
            {
                HookLog.LogFormat($" SetActive \"{gameObject}\", old:{gameObject.activeSelf} , new:{value}");
            }

            SetActive_Proxy(value);
        }
        private void Position_Replace(Vector3 vec)
        {
            var transform = (this as object) as Transform;

            var gameObject = transform.gameObject;

            if (HookedGameObject.Equals((gameObject)))
            {
                HookLog.LogFormat($"Position \"{gameObject.name}\", position:{vec.ToString("f3")}");
            }

            Position_Proxy(vec);
        }
Ejemplo n.º 3
0
        public void Install()
        {
            if (LDasm.IsiOS()) // iOS 不支持修改 code 所在区域 page
            {
                return;
            }

            if (isHooked)
            {
                return;
            }

            HookPool.AddHooker(_targetMethod, this);

            InitProxyBuff();
            BackupHeader();
            PatchTargetMethod();
            PatchProxyMethod();

            HookLog.LogFormat($"hook \"{_targetMethod.Name}\" success!!!");

            isHooked = true;
        }
 private void Position_Proxy(Vector3 vec)
 {
     HookLog.LogFormat("Dummy");
 }
Ejemplo n.º 5
0
 private void SetActive_Proxy(bool value)
 {
     HookLog.LogFormat("Dummy");
 }