Solved Using functions from other classes

Status
Not open for further replies.

AZFernandez

Platinian
Original poster
Dec 8, 2023
19
3
3
Greetings. Please tell me how can I connect a function from another class? I spent some time searching, but could only find how to connect a field from another class
I have the following:

Code:
public class CSUser // TypeDefIndex: 560

//Fields
private int <Rating>k__BackingField; // 0x50
Code:
public class DataManager : MonoBehaviour //

//Fields
public CSUser CurrentUser; // 0x18

// RVA: 0xDB8278 Offset: 0xDB8278 VA: 0xDB8278 public void Update() { }
I want to use the update function from the DataManager class for a field from the CSUser class, but unfortunately I lack the skills and knowledge
 

mIsmanXP

Approved Modder
Approved Modder
Feb 20, 2022
204
8,698
193
Republic of Indonesia
you can get the field like how you get the field normally
void Update(void* dataManager){
void* csuser = dataManager + offset;
void* field = csuser + offset;
}
 

AZFernandez

Platinian
Original poster
Dec 8, 2023
19
3
3
you can get the field like how you get the field normally
void Update(void* dataManager){
void* csuser = dataManager + offset;
void* field = csuser + offset;
}
To work with fields, I usually use examples from the template from lgl 3.2. Sorry, but your code is not very clear to me, it doesn't look like what I usually work with... maybe it's not compatible with lgl. Could you provide more detailed explanations?
 

AZFernandez

Platinian
Original poster
Dec 8, 2023
19
3
3
I literally gave you everything you need
Yes, this is probably true, but it didn’t lead me anywhere, unfortunately. This may seem very stupid, but it is true. Thank you for your time, I will continue to analyze the information received from you, hopefully one day I will succeed
 
  • Like
Reactions: DR_eslam

DR_eslam

Awesome Active Platinian
May 20, 2022
110
24
18
21
Egypt
you can get the field like how you get the field normally
void Update(void* dataManager){
void* csuser = dataManager + offset;
void* field = csuser + offset;
}
I didn't face that before but That's really cool and creative
 

DaRealPanDa

Co-Administrator
Staff member
Supporting-Team
Global Moderator
Social Media
Mar 12, 2018
6,771
15,625
2,120
27
Skyrim
Thread will be set to "solved" and closed.
When you're not happy with that just send me a message and i will re-open the thread for you.

Thanks.
 
Status
Not open for further replies.