BNM-Android: Use the Internal:Load () function to crash.

arch:arm64-v8a android version:12 bnm version:latest(2.1.0) hook libraries:have not stacktrace: Screenshot_20240916_073507_bin mt plus

cpp(jni) Code: Screenshot_20240916_073004_aidepro top

C#Code :

using System;
using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;

public class Player : MonoBehaviour
{
    void Start()
    {

    }
    void Update()
    {

    }
    private Config m_Config;

    public class Config
    {
        string Name;
        int Health;
        int Coins;
        public Config(string name, int health, int coins)
        {
            Name = name;
            Health = health;
            Coins = coins;
        }
        public int getHealth()
        {
            return Health; 
        }
   
    }
    public void OnButtonClick()
    {
        Debug.Log("onclick");
        if (Application.platform == RuntimePlatform.Android)
        {
            AndroidJavaClass clazz = new AndroidJavaClass("android.util.Log");
            clazz.CallStatic<Int32>("i", "TAG", "unitylog");
        }
        Config config = new("il2cpp", 100, 100);
        testPrivate(config);
        testPublic(config);
    }
    private void testPrivate(Config config)
    {
       Debug.Log("TestPrivate:OnInvoke");
    }
    public void testPublic(Config config)
    {
        Debug.Log("TestPublic:OnInvoke");
    }

}

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (2 by maintainers)

Most upvoted comments

Try using normal HOOK instead. As these different hook functions do different things. As described here.

The new function (invoked) of the hook was only executed once, and then it was not executed again. Do you have a discord communication server? Can I join in?

It relates to shadowhook, use unique mode to initialise shadowhook should solve this problem.