edit

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeNameEntryHashesUE56

func ComputeNameEntryHashesUE56(value string) (nonCaseHash uint16, casePreservingHash uint16)

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

func RewriteNameMap(asset *uasset.Asset, names []uasset.NameEntry) ([]byte, error)

RewriteNameMap replaces the serialized NameMap with the provided entries and updates dependent offsets/count fields.

func RewriteRawRange

func RewriteRawRange(asset *uasset.Asset, start, end int64, replacement []byte) ([]byte, error)

RewriteRawRange replaces one non-export byte range and updates summary/export offsets. The range must not overlap export serial payloads.

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`.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL