-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
Description
I encountered a runtime error when building for Android.
The issue is caused by BuildGameplayTagSource.cs trying to access Application.streamingAssetsPath using System.IO.File.OpenRead.
On Android, StreamingAssets are contained within the APK (compressed), so standard System.IO methods cannot access them directly. This results in a "Could not find a part of the path" error.
Error Log
Error Unity Failed to load gameplay tags from StreamingAssets: Could not find a part of the path "/file:/data/data/com.KimBopHeaven_UniJam.KimBopHeaven_UniJam/pram-shadow-files/assets/GameplayTags".
Error Unity BandoWare.GameplayTags.BuildGameplayTagSource:RegisterTags(GameplayTagRegistrationContext)
Error Unity BandoWare.GameplayTags.GameplayTagManager:InitializeIfNeeded()
Problematic Code (BuildGameplayTagSource.cs)
The current implementation uses File.OpenRead which is not compatible with Android's StreamingAssets path format (jar:file://...).
// Current Code
using FileStream file = File.OpenRead(Path.Combine(Application.streamingAssetsPath, "GameplayTags"));Environment
- Unity Version: 6000.3.4
- Platform: Android
Metadata
Metadata
Assignees
Labels
No labels