Solved Ortographic & Ortographic Size - Android, Unity Game

Status
Not open for further replies.

Geno Modz

Platinian
Original poster
Aug 16, 2023
11
2
3
23
your moms house
Hello, I am using LGL Mod Menu, on a unity game and want to make, as a camera setting, ortographic mode and ortographic size.

Altough, i am having trouble hooking the two offsets:


public void set_orthographic(bool value) { }

public void set_orthographicSize(float value) { }



From what i understand i need to use the camera get_main offset as an instance.
 

libModz

Awesome Active Platinian
Jun 2, 2022
163
29
28
UK
Is there an update function in the same class? Then you could do it like this...

C++:
void (*set_orthographic)(void *instance, bool value);
void (*setorthographicSize)(void *instance, float value);

void (*old_Update)(void *instance);
void Update(void *instance) {
    if(instance!=NULL) {
        set_orthographic(instance, true);
        set_orthographicSize(instance, 1.0); // Type desired size here
    }
    old_Update(instance);
}

Then this under hackthread...

C++:
set_orthographic = (void(*)(void*, bool)) getAbsoluteAddress(targetLibName, 0xOFFSET);

set_orthographicSize = (void(*)(void*, float)) getAbsoluteAddress(targetLibName, 0xOFFSET);




HOOK("0xOFFSET", Update, old_Update);
 

DaRealPanDa

Co-Administrator
Staff member
Supporting-Team
Global Moderator
Social Media
Mar 12, 2018
6,771
15,627
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.