"Working Dir Rework" has landed in the private repo (also submitted to the Asset Store). You are now able to keep all your scripts under `{ProjectDir}/OneJS`. And the scripts will be automatically bundled into`{persistentDataPath}/OneJS` for Standalone builds. Docs here have been updated accordingly.

New features and bug fixes will land in the private github repo before becoming available on the Asset Store. To request access, please send an email or pm Singtaa#4915 on Discord with your Github username and OneJS Order/INV number.

Live Reload

Live Reload requires Run in Backgorund to be turned ON in Player settings (under Resolution and Presentation).

The LiveReload MonoBehaviour component watches your {ProjectDir}/OneJS directory and will reload the ScriptEngine (and your entry script) when code changes are detected. Settings:

  • Run On Start (default On):
  • Entry Script (default "index.js"): Which file to run on ScriptEngine reload. Note this should always be a .js file.
  • Watch Filter (default "*.js"): What type of files to watch

Multi-Device Live Reload


There is a 4th setting (Net Sync) that you can set to enable Live Reload across different devices. For example, you can make code changes in VSCode on your Desktop and have the change live reloaded on your deployed mobile app. Devices will self discover as long as they are on the same network (i.e. same wifi or lan).

After toggling on Net Sync, you can pick 3 modes:

  • Auto defaults to Server for Desktop, and Client for Mobile
  • Server will be responsible for broadcasting code changes to clients
  • Client will be listening for code changes from Server

Janitor

A JanitorSpawner should be used along side LiveReload. It'll spawn a Janitor GameObject that will help cleaning up previous GameObjects and Console logs upon every Reload.