Use when working with StreamingAssets Loader tools — sync reading of StreamingAssets files, especially on Android in F8Framework.
// Sync read all lines from StreamingAssets/config/
string[] files = SyncStreamingAssetsLoader.Instance.ReadAllLines("config/fileindex.txt");
// Release resources after use
SyncStreamingAssetsLoader.Instance.Close();
SyncStreamingAssetsLoader for reading StreamingAssets files.Close() after reading to release resources.| Error | Cause | Solution |
|---|---|---|
| File not found on Android | Path case sensitivity | Ensure exact case match |
| Resource leak | Not calling Close() | Always call Close() after reading |
| Read fail on WebGL | Different file access model | Use UnityWebRequest for WebGL |