Skip to content

An attempt at a tool able to replace/modify text assets in Unity asset files. Tries to be compatible with as many Unity versions as possible by reading in a more generic way.

Notifications You must be signed in to change notification settings

synogen/unitypatcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A quick and dirty command line exporter/importer and patcher for text assets in Unity *.assets files.

Run

unitypatcher requires Java Runtime Environment 8 or higher to run.

Usage

Command line overview:

unitypatcher export <assets-file> <path ID/asset name/*>

unitypatcher import <assets-file> <path ID/asset name> <file to import>

unitypatcher patch <assets-file> <patch file> <more patch files(optional)...>

Examples:

unitypatcher export sharedassets3.assets 530

unitypatcher patch sharedassets2.assets ChangeThis.assetmod ChangeThat.assetmod

Run unitypatcher without arguments to get help.

Patch file format

First line: The text asset name

Second line: The regular expression to search for in the text asset (you can test your regular expressions at Regex101 )

Third line and after: The text found using the regular expression will be replaced by this, group matchers ($1) are supported. Be aware that using backslashes in the replacement string may lead to problems due to way regex replacing works in Java. Either write them as \\ to escape them as literal characters or use forward slashes instead.

Example:

Constants

(<td div="Member">s_maxJobs</td>\s+<td div="Value")>\d+<(/td>)

$1>6<$2

Download

Check the releases

About

An attempt at a tool able to replace/modify text assets in Unity asset files. Tries to be compatible with as many Unity versions as possible by reading in a more generic way.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages