Comments (4)
I tried but without success look what I did:
Class: public sealed class FarmerNameManager : MonoBehaviour, IUserBlobCallbacks2, IUserBlobCallbacksBase
Method: public void CreateFarmerName(string farmerName) { }
#if !BNM_DISABLE_NEW_CLASSES
using namespace BNM::Structures::Mono;
using namespace BNM::Operators;
BNM::LoadClass FarmerNameManagerClass{};
BNM::Method<monoString*> CreateFarmerNameMethod{};
void (*old_CreateFarmerNameA)(BNM::UnityEngine::Object*, monoString*);
void NewCreateFarmerName(BNM::UnityEngine::Object* instance, monoString* originalName) {
monoString* newNameA = BNM::CreateMonoString("BILL GATES");
old_CreateFarmerNameA(instance, newNameA);
}
void OnLoaded() {
using namespace BNM;
FarmerNameManagerClass = LoadClass(OBFUSCATE_BNM("Assembly-CSharp"), OBFUSCATE_BNM("FarmerNameManager"));
CreateFarmerNameMethod = FarmerNameManagerClass.GetMethodByName(OBFUSCATE_BNM("CreateFarmerName"), 1);
InvokeHook(CreateFarmerNameMethod, NewCreateFarmerName, old_CreateFarmerNameA);
}
#endif
case 14: {
BNM::AddOnLoadedEvent(OnLoaded);
break;
}
from bnm-android.
You can't just set OrderScore
to 10000.0f;
. You need instance of ProtoPartnerAnimalBreed
from bnm-android.
ProtoPartnerAnimalBreed MyAnimal= new ProtoPartnerAnimalBreed();
MyAnimal.OrderScore = 10000.0f;
I really didn't understand how to use it.
from bnm-android.
BNM has a lot of comments in src code. You can use:
LoadClass::CreateNewInstance
, LoadClass::CreateNewObject
, LoadClass::CreateNewObjectArgs
.
I don't know which one is better for you. Read comments in BNM.h
to find API that will be better for your problem.
from bnm-android.
Related Issues (20)
- There is an error on 64bit when using NewClasses and ModifyClasses HOT 1
- Hook libil2cpp.so but game exit HOT 1
- Zygisk crashing -> Can not start Zygisk while having ByNameModding included as lib HOT 2
- Loading BNM HOT 2
- The application crashes when using NewClasses or ModifyClasses on Unity versions below 212 with BNM version 1.2 HOT 11
- App crash using BNM 1.4 HOT 16
- Custom Attribute for custom class HOT 1
- Request for Action, UnityAction, and UnityEvent support HOT 5
- Call Static Virtual method HOT 1
- Overloaded Method HOT 7
- I tried but without success look what I did: HOT 3
- Создание нового экземпляра класса HOT 1
- Question: How to get value of "int" field of another class? HOT 3
- Question? How to read text from byte array HOT 2
- проблема с инициализацией / troubles with init HOT 2
- Any chance to call Java method of hooked game? HOT 1
- Can load BNM Extenally using KittyMemory instead ? HOT 9
- BNM_NewStaticMethodInit problem HOT 4
- [Need help]What, Hook's the type? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bnm-android.