Quickly detect if a .unitypackage file contains C# scripts and any [InitializeOnLoad]
functions.
- Python 3.12.8
- Poetry (suggested for venv)
Add your target .unitypackage to unitypackages/
directory.
The script can also detect C# scripts in zipped packages (.zip containing ONLY one .unitypackage file) which are common on asset sharing sites.
git clone https://github.com/vile/unityproject-csharp-detector.git
cd unityproject-csharp-detector
poetry install --no-root # or `pip install -r requirements.txt`
poetry run python3 main.py ./unitypackages/sus.unitypackage.zip # or python3 main.py [package]
Check other options using --help
usage: main.py [-h] [--show-all] [--show-dirs] package
Basic CLI to check whether or not a .unitypackage or zipped .unitypackage contains any C# files.
positional arguments:
package A required string path to a .unitypackage or a zipped .unitypackage.
options:
-h, --help show this help message and exit
--show-all Show all files and directories.
--show-dirs Show all directories.