-
Notifications
You must be signed in to change notification settings - Fork 12
Refactor SceneManager / Transform; fix a number of bugs in scene/game object traversal #133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
mitchell-merry
wants to merge
27
commits into
LiveSplit:master
Choose a base branch
from
mitchell-merry:transform-refactor
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
6c56fed
Separate the concept of Transform and GameObject; separate the concep…
mitchell-merry 958fbd8
Add isSelf function, add / update more comments
mitchell-merry f575ae4
Create get_class_mono/il2cpp which should fix the klass_name discrepa…
mitchell-merry 0152784
come on now
mitchell-merry 25d397b
remove todo comments
mitchell-merry d078723
tweak
mitchell-merry c974ef2
Revert changes for scene name and path as string
mitchell-merry e964365
tmp
mitchell-merry 5ab8c87
add new sig, add offsets
mitchell-merry 135f371
update project settings
mitchell-merry 305c1c5
add cheat table
mitchell-merry 440ec35
add to todo
mitchell-merry 25f596a
latest unity version etc
mitchell-merry 5df5ac0
create mono::Object and clarify everything
mitchell-merry 822dac3
comments
mitchell-merry 1b3ed11
update todo
mitchell-merry 50be285
Start cleaning
mitchell-merry 1cb0786
remove more
mitchell-merry 03646e0
more cleaning + formatting
mitchell-merry b54ef8e
Allow manually overriding the scene manager offsets
mitchell-merry 8679e33
Merge branch 'master' into transform-refactor-tweaks
mitchell-merry a24f19e
Add another fixme
mitchell-merry 63776b0
Revert changes to offsets, leave note
mitchell-merry 972bb5e
Add get_component_mono_object to streamline
mitchell-merry 1a29b00
Support older Unity versions by splitting on Mono version when readin…
mitchell-merry 6657b25
Couple doc improvements
mitchell-merry f323316
Some more documentation
mitchell-merry File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| /target | ||
| /Cargo.lock | ||
| .idea | ||
| **/.DS_Store |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -241,118 +241,126 @@ impl MonoOffsets { | |
| }, | ||
| v_table: MonoVTableOffsets { vtable: 0x28 }, | ||
| }), | ||
| (BinaryFormat::ELF | BinaryFormat::MachO, Version::V3, PointerSize::Bit64) => Some(&Self { | ||
| assembly: AssemblyOffsets { | ||
| aname: 0x10, | ||
| image: 0x60, | ||
| }, | ||
| image: ImageOffsets { class_cache: 0x4D0 }, | ||
| hash_table: HashTableOffsets { | ||
| size: 0x18, | ||
| table: 0x20, | ||
| }, | ||
| class: ClassOffsets { | ||
| parent: 0x28, | ||
| image: 0x38, | ||
| name: 0x40, | ||
| namespace: 0x48, | ||
| vtable_size: 0x54, | ||
| fields: 0x90, | ||
| runtime_info: 0xC8, | ||
| field_count: 0xF8, | ||
| next_class_cache: 0x100, | ||
| }, | ||
| field: FieldInfoOffsets { | ||
| name: 0x8, | ||
| offset: 0x18, | ||
| alignment: 0x20, | ||
| }, | ||
| v_table: MonoVTableOffsets { vtable: 0x48 }, | ||
| }), | ||
| (BinaryFormat::ELF | BinaryFormat::MachO, Version::V2, PointerSize::Bit64) => Some(&Self { | ||
| assembly: AssemblyOffsets { | ||
| aname: 0x10, | ||
| image: 0x60, | ||
| }, | ||
| image: ImageOffsets { class_cache: 0x4C0 }, | ||
| hash_table: HashTableOffsets { | ||
| size: 0x18, | ||
| table: 0x20, | ||
| }, | ||
| class: ClassOffsets { | ||
| parent: 0x28, | ||
| image: 0x38, | ||
| name: 0x40, | ||
| namespace: 0x48, | ||
| vtable_size: 0x54, | ||
| fields: 0x90, | ||
| runtime_info: 0xC8, | ||
| field_count: 0xF8, | ||
| next_class_cache: 0x100, | ||
| }, | ||
| field: FieldInfoOffsets { | ||
| name: 0x8, | ||
| offset: 0x18, | ||
| alignment: 0x20, | ||
| }, | ||
| v_table: MonoVTableOffsets { vtable: 0x40 }, | ||
| }), | ||
| (BinaryFormat::ELF | BinaryFormat::MachO, Version::V1Cattrs, PointerSize::Bit64) => Some(&Self { | ||
| assembly: AssemblyOffsets { | ||
| aname: 0x10, | ||
| image: 0x58, | ||
| }, | ||
| image: ImageOffsets { class_cache: 0x3D0 }, | ||
| hash_table: HashTableOffsets { | ||
| size: 0x18, | ||
| table: 0x20, | ||
| }, | ||
| class: ClassOffsets { | ||
| parent: 0x28, | ||
| image: 0x40, | ||
| name: 0x48, | ||
| namespace: 0x50, | ||
| vtable_size: 0x18, | ||
| fields: 0xA8, | ||
| runtime_info: 0xF8, | ||
| field_count: 0x94, | ||
| next_class_cache: 0x100, | ||
| }, | ||
| field: FieldInfoOffsets { | ||
| name: 0x8, | ||
| offset: 0x18, | ||
| alignment: 0x20, | ||
| }, | ||
| v_table: MonoVTableOffsets { vtable: 0x48 }, | ||
| }), | ||
| (BinaryFormat::ELF | BinaryFormat::MachO, Version::V1, PointerSize::Bit64) => Some(&Self { | ||
| assembly: AssemblyOffsets { | ||
| aname: 0x10, | ||
| image: 0x58, | ||
| }, | ||
| image: ImageOffsets { class_cache: 0x3D0 }, | ||
| hash_table: HashTableOffsets { | ||
| size: 0x18, | ||
| table: 0x20, | ||
| }, | ||
| class: ClassOffsets { | ||
| parent: 0x28, | ||
| image: 0x38, | ||
| name: 0x40, | ||
| namespace: 0x48, | ||
| vtable_size: 0x18, | ||
| fields: 0xA0, | ||
| runtime_info: 0xF0, | ||
| field_count: 0x8C, | ||
| next_class_cache: 0xF8, | ||
| }, | ||
| field: FieldInfoOffsets { | ||
| name: 0x8, | ||
| offset: 0x18, | ||
| alignment: 0x20, | ||
| }, | ||
| v_table: MonoVTableOffsets { vtable: 0x48 }, | ||
| }), | ||
| (BinaryFormat::ELF | BinaryFormat::MachO, Version::V3, PointerSize::Bit64) => { | ||
| Some(&Self { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure why this indented a level... I didn't change any offsets here. |
||
| assembly: AssemblyOffsets { | ||
| aname: 0x10, | ||
| image: 0x60, | ||
| }, | ||
| image: ImageOffsets { class_cache: 0x4D0 }, | ||
| hash_table: HashTableOffsets { | ||
| size: 0x18, | ||
| table: 0x20, | ||
| }, | ||
| class: ClassOffsets { | ||
| parent: 0x28, | ||
| image: 0x38, | ||
| name: 0x40, | ||
| namespace: 0x48, | ||
| vtable_size: 0x54, | ||
| fields: 0x90, | ||
| runtime_info: 0xC8, | ||
| field_count: 0xF8, | ||
| next_class_cache: 0x100, | ||
| }, | ||
| field: FieldInfoOffsets { | ||
| name: 0x8, | ||
| offset: 0x18, | ||
| alignment: 0x20, | ||
| }, | ||
| v_table: MonoVTableOffsets { vtable: 0x48 }, | ||
| }) | ||
| } | ||
| (BinaryFormat::ELF | BinaryFormat::MachO, Version::V2, PointerSize::Bit64) => { | ||
| Some(&Self { | ||
| assembly: AssemblyOffsets { | ||
| aname: 0x10, | ||
| image: 0x60, | ||
| }, | ||
| image: ImageOffsets { class_cache: 0x4C0 }, | ||
| hash_table: HashTableOffsets { | ||
| size: 0x18, | ||
| table: 0x20, | ||
| }, | ||
| class: ClassOffsets { | ||
| parent: 0x28, | ||
| image: 0x38, | ||
| name: 0x40, | ||
| namespace: 0x48, | ||
| vtable_size: 0x54, | ||
| fields: 0x90, | ||
| runtime_info: 0xC8, | ||
| field_count: 0xF8, | ||
| next_class_cache: 0x100, | ||
| }, | ||
| field: FieldInfoOffsets { | ||
| name: 0x8, | ||
| offset: 0x18, | ||
| alignment: 0x20, | ||
| }, | ||
| v_table: MonoVTableOffsets { vtable: 0x40 }, | ||
| }) | ||
| } | ||
| (BinaryFormat::ELF | BinaryFormat::MachO, Version::V1Cattrs, PointerSize::Bit64) => { | ||
| Some(&Self { | ||
| assembly: AssemblyOffsets { | ||
| aname: 0x10, | ||
| image: 0x58, | ||
| }, | ||
| image: ImageOffsets { class_cache: 0x3D0 }, | ||
| hash_table: HashTableOffsets { | ||
| size: 0x18, | ||
| table: 0x20, | ||
| }, | ||
| class: ClassOffsets { | ||
| parent: 0x28, | ||
| image: 0x40, | ||
| name: 0x48, | ||
| namespace: 0x50, | ||
| vtable_size: 0x18, | ||
| fields: 0xA8, | ||
| runtime_info: 0xF8, | ||
| field_count: 0x94, | ||
| next_class_cache: 0x100, | ||
| }, | ||
| field: FieldInfoOffsets { | ||
| name: 0x8, | ||
| offset: 0x18, | ||
| alignment: 0x20, | ||
| }, | ||
| v_table: MonoVTableOffsets { vtable: 0x48 }, | ||
| }) | ||
| } | ||
| (BinaryFormat::ELF | BinaryFormat::MachO, Version::V1, PointerSize::Bit64) => { | ||
| Some(&Self { | ||
| assembly: AssemblyOffsets { | ||
| aname: 0x10, | ||
| image: 0x58, | ||
| }, | ||
| image: ImageOffsets { class_cache: 0x3D0 }, | ||
| hash_table: HashTableOffsets { | ||
| size: 0x18, | ||
| table: 0x20, | ||
| }, | ||
| class: ClassOffsets { | ||
| parent: 0x28, | ||
| image: 0x38, | ||
| name: 0x40, | ||
| namespace: 0x48, | ||
| vtable_size: 0x18, | ||
| fields: 0xA0, | ||
| runtime_info: 0xF0, | ||
| field_count: 0x8C, | ||
| next_class_cache: 0xF8, | ||
| }, | ||
| field: FieldInfoOffsets { | ||
| name: 0x8, | ||
| offset: 0x18, | ||
| alignment: 0x20, | ||
| }, | ||
| v_table: MonoVTableOffsets { vtable: 0x48 }, | ||
| }) | ||
| } | ||
| _ => None, | ||
| } | ||
| } | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"component" isn't accurate here, but there's something in between the component and the class. not exactly sure what it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[ ] TODO: figure out what it is