9. Cross-platform support
The DialogueStreamingAssets class is divided by compilation:
#if UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL
private const bool StreamingPlatform = true;
#else
private const bool StreamingPlatform = false;
#endif
public static bool RequiresAsync => ForceAsync || (!Application.isEditor && StreamingPlatform);
| Platform | File access | Notes |
|---|---|---|
| Windows / Linux / macOS standalone | direct File / Directory | the manifest.txt files are ignored |
| Android / iOS | UnityWebRequest with URL jar:file://…!/assets/… | mandatory indices, asynchronous init |
| WebGL | UnityWebRequest with http URL | mandatory indices, no writing to disk |
Since the constant is declared const, the compiler eliminates the useless branch: a desktop build does not contain the jar:/http: code, while a mobile build does not contain the direct I/O. Application.isEditor keeps the play mode in Unity on the direct access path even with an Android build target.
The following consequences arise:
- on mobile folders cannot be enumerated: everything passes through the indices;
DialoguePaths.EnsureLayout()does not create folders when the platform is not writable;
- the restoration of the dialogue in mid-course (
RestorePosition) must be managed by the game.
12. Build process
- Deployment:
Injectfrom the Java editor (ordeployfrom the CLI).
- Indices:
MySys22 ▸ Dialogue ▸ Generate Index Manifests(mandatory before a mobile build,
optional on desktop).
- AOT:
Generate AOT link.xmlif IL2CPP is used.
- Build: Unity Build Settings according to the usual procedure.
With regard to distribution, the engine is a folder inside Assets and does not require packaging; the editor is distributed by means of --release (portable) or by means of app-image / deb / dmg / msi.