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 


CREATETHREAD just crashes unity game
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
BigCrock5
How do I cheat?
Reputation: 0

Joined: 26 Apr 2022
Posts: 9

PostPosted: Mon May 02, 2022 1:32 pm    Post subject: Reply with quote

Oh, so this function returns the actual vector and not a pointer to the vector?

That makes sense.

I'm not entirely sure how I'd be able to tell the difference from my external software POV.
Back to top
View user's profile Send private message
Bloodybone
Newbie cheater
Reputation: 0

Joined: 07 Dec 2016
Posts: 20
Location: Germany

PostPosted: Sat May 07, 2022 4:14 pm    Post subject: Reply with quote

Sorry for the late reply...

I don't know if it is a C# thing or a mono or unity thing but I've found out in multiple Unity games so far that Structures for example Vector3 seem to always work kind of weird.

I've actually had it once where a function that whould take a Structure as its argument didn't just pass one argument in Assembly, it actually passed each field in the structure individually.

So when I see a function that takes/returns a structure I always try to find out what the function does with it Parameters to find out how it handles it. Using the Transform:get_position function as an example, you can see down below what it does with the first parameter and see what I mean.

It first of makes eax/rax 0 and then writes rax to [rcx] clearing the first 8 bytes of the first parameter and then writes eax to [rcx+8] clearing another 4 bytes in the first argument.

So from that you can already guess that the function passes the returned Vector3 as the first argument and that it has to be a memory location that can store 3 Floats.

I haven't found a easier method to finding out how to handle functions that return or take structres, other than looking a the function itself unfortunately..



Screenshot 2022-05-08 000327.png
 Description:
UnityEngine.Transform:get_position function
 Filesize:  71.37 KB
 Viewed:  904 Time(s)

Screenshot 2022-05-08 000327.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 -> General Gamehacking All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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