Skip to content

Conversation

@seifhassine
Copy link

PFB files have a GameObjectRefInfos table. Each entry has a property_id attribute that references a field in the source object (the field is always of type via.GameObjectRef).

property_id is a 32-bit value encoding:

  • Upper 16 bits: Depth of the type that defines the referenced field (number of types in the inheritance chain to System.Object, including both)
  • Lower 16 bits (relevant here): The source field's order attribute from il2cpp's reflection_properties

To fully rebuild PFB files without hardcoding property_ids, the order attribute must be dumped for all via.GameObjectRef fields. This allows matching the lower 16 bits of property_id to the correct field by its order value.

For this purpose I included a --include_order option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant