Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


How to invoke/call a Mono function with params like window?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
blueBoxDiv
Newbie cheater
Reputation: 0

Joined: 26 Sep 2023
Posts: 13

PostPosted: Tue Sep 26, 2023 11:05 am    Post subject: How to invoke/call a Mono function with params like window? Reply with quote

This question can be for any related function calls that you need to pass parameters to. Here specifically Unity apps.

I am only asking for the correct way on doing what I talk about below.

I take the function "UnityEngine.Screen:SetResolution" as an example, for this universal question (if there's a solution to this question, there can be a solution to other functions).

With Mono features, I mean these Unity things.

It's something Cheat Engine does for you and the tab only shows up if you choose a Unity game, from what I know.

the image urls are like this cuz yes and dnc :shrug: sorry
i.imgur . com /jkQV6IT.png

I added a "Header" with CTRL + Alt + A and typed this (unfinished) thing in there:

Code:

define(screenWidth, 1920)
define(screenHeight, 1080)


[ENABLE]
alloc(changeResolution, 2048)



dealloc(changeResolution)


[DISABLE]



I tried something like

Code:

changeResolution:
call "UnityEngine.Screen:SetResolution"


but with the way I did it, it only crashed the application and I did not even provide parameters to it, nor do I have any clue if this is correct

I think call just jumps to where the function is, but I am unsure how I can find out what I have to do, to pass parameters. I was looking for a Lua function first that would do it all in one call, but I didn't find.


the function is literally here
i.imgur . com /qOFaJeS.png

it's there...

if I right click on it I can open this window


i.imgur . com /ILrQbF0.png

The instance address did not matter.

filling it all out did exactly what I was trying to do, the problem is it's only in this Mono window, I am not sure how I can "convert" this into the Auto Assembler

like just pre-defined parameteres, not the entire nice window with input box



How can I do that, what the Invoke function thing is doing?

I've tried setting a breakpoint, but I haven't even found the "mov" values that add the resolution when using the Invoke function from the thing there.

So it wasn't obvious to me on what I have to do in the Auto Assembler to call a function properly with parameters, just like the invoke function window is doing it for you.
Back to top
View user's profile Send private message
Y.A.K.E
Advanced Cheater
Reputation: 0

Joined: 15 Jul 2019
Posts: 56

PostPosted: Fri Sep 29, 2023 11:24 am    Post subject: Reply with quote

set breakpoint UnityEngine.Screen:get_height

get RSI

use .net from helper or mono_invoke_method



20230930012040.png
 Description:
 Filesize:  187.21 KB
 Viewed:  1655 Time(s)

20230930012040.png


Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites