Skip to content

MapboxAccess does not work on Android #22

@wilhelmberg

Description

@wilhelmberg

@david-rhodes

Problem 1

https://docs.unity3d.com/Manual/StreamingAssets.html

On Android, the files are contained within a compressed .jar file (which is essentially the same format as standard zip-compressed files). This means that if you do not use Unity’s WWW class to retrieve the file, you need to use additional software to see inside the .jar archive and obtain the file.

Currently ValidateMapboxAccessFile() does not use WWW to check if the token file exists

if (!Directory.Exists(Application.streamingAssetsPath) || !File.Exists(_accessPath)) {
    throw new InvalidTokenException("Please configure your access token in the menu!");
}

and fails, even if it is there, and LoadAccessToken() never gets called.

Problem 2

LoadMapboxAccess() is "async" and by the time the token has been retrieved all tile requests (18 in my test app, based on example MeshGenerationStyles) have already been fired (without a token) and fail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions