Wanzyee Studio
CodePatcher

Patch source code when double click this asset, or autorun when imported. More...

Inherits ScriptableObject.

Public Member Functions

void Patch ()
 Replace the code block in the specified script file. More...
 

Public Attributes

bool autorun = true
 Auto start the patch process when imported, this'll be disabled when patch done. More...
 
string file = ""
 Script file path, or find the same name text asset in the project. More...
 
string[] matches = {}
 Extra code snippets to recognize the file. More...
 
string oldCode = ""
 Old code to remove, which must be in the file. More...
 
string newCode = ""
 New code to patch, which mustn't be in the file. More...
 
string description = ""
 The patch description to show when start processing. More...
 

Detailed Description

Patch source code when double click this asset, or autorun when imported.

It's recommended to set the code block more to find the file more precisely. And to test the settings with a script put outside the project.

Member Function Documentation

void Patch ( )

Replace the code block in the specified script file.

Member Data Documentation

bool autorun = true

Auto start the patch process when imported, this'll be disabled when patch done.

string file = ""

Script file path, or find the same name text asset in the project.

string [] matches = {}

Extra code snippets to recognize the file.

string oldCode = ""

Old code to remove, which must be in the file.

string newCode = ""

New code to patch, which mustn't be in the file.

string description = ""

The patch description to show when start processing.