Documentation
¶
Index ¶
- func ComputeNameEntryHashesUE56(value string) (nonCaseHash uint16, casePreservingHash uint16)
- func RewriteAsset(asset *uasset.Asset, mutations []ExportMutation) ([]byte, error)
- func RewriteNameMap(asset *uasset.Asset, names []uasset.NameEntry) ([]byte, error)
- func RewriteRawRange(asset *uasset.Asset, start, end int64, replacement []byte) ([]byte, error)
- type ExportMutation
- type PropertyAddResult
- type PropertyRemoveResult
- type PropertySetResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeNameEntryHashesUE56 ¶
ComputeNameEntryHashesUE56 computes FNameEntrySerialized hash fields following UE's FCrc::StrCrc32 / FCrc::Strihash_DEPRECATED behavior.
func RewriteAsset ¶
func RewriteAsset(asset *uasset.Asset, mutations []ExportMutation) ([]byte, error)
RewriteAsset rewrites the .uasset bytes with optional export payload mutations. It recalculates export serial offsets/sizes and applies summary offset translation.
func RewriteNameMap ¶
RewriteNameMap replaces the serialized NameMap with the provided entries and updates dependent offsets/count fields.
Types ¶
type ExportMutation ¶
type ExportMutation struct {
ExportIndex int
Payload []byte
UpdateScript bool
ScriptStartRel int64
ScriptEndRel int64
}
ExportMutation describes one replacement for an export payload.
type PropertyAddResult ¶
type PropertyAddResult struct {
Mutation ExportMutation
ExportIndex int
PropertyName string
PropertyType string
ArrayIndex int32
NewValue any
NewSize int32
ByteDelta int
}
PropertyAddResult is the computed mutation for one prop add operation.
func BuildPropertyAddMutation ¶
func BuildPropertyAddMutation(asset *uasset.Asset, exportIndex int, specJSON string) (*PropertyAddResult, error)
BuildPropertyAddMutation builds one export mutation for `bpx prop add`.
type PropertyRemoveResult ¶
type PropertyRemoveResult struct {
Mutation ExportMutation
ExportIndex int
PropertyName string
ArrayIndex int32
OldValue any
OldSize int32
ByteDelta int
}
PropertyRemoveResult is the computed mutation for one prop remove operation.
func BuildPropertyRemoveMutation ¶
func BuildPropertyRemoveMutation(asset *uasset.Asset, exportIndex int, path string) (*PropertyRemoveResult, error)
BuildPropertyRemoveMutation builds one export mutation for `bpx prop remove`.
type PropertySetResult ¶
type PropertySetResult struct {
Mutation ExportMutation
ExportIndex int
PropertyName string
Path string
OldValue any
NewValue any
OldSize int32
NewSize int32
ByteDelta int
}
PropertySetResult is the computed mutation for one prop set operation.
func BuildPropertySetMutation ¶
func BuildPropertySetMutation(asset *uasset.Asset, exportIndex int, path string, valueJSON string) (*PropertySetResult, error)
BuildPropertySetMutation builds one export mutation for `bpx prop set`.