[Unity] Various edits in the Unity code #71
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes automatic pointer path resolution for Unity games by adding 2 features:
caching of resolved offsets
If the code is dealing with Classes that didn't run their cctor, automatic pointer path resolution fails. However, caching the offsets already resolved allows the script to skip over them instead of looking for them again. This greatly improves performance, as some functions, especially the get_class() one, are very intensive and slow, requiring hundredths of memory reads in some games and potentially stalling the execution of the autosplitter
looking for child classes through their vtable
This also fixes automatic pointer path resolution when traversing arrays or standard C# structures the previous implementation of this function was failing on.
Together with its companion PR #69 , this should fix most if not all the outstanding bugs there were left and I could identify so far with this engine.
A couple of additional commits have also been added in roder to have
Copy
on theDeepPointer
struct, as well as adding aread_pointer()
function insideProcess
.