Skip to content

Change map style runtime sdk3 #1948

@Ardoos

Description

@Ardoos

What's the propery way to change map style in runtime e.g. from Mapbox Light to Mapbox Dark in sdk3?

StaticApiLayerModuleScript.cs have StaticLayerModuleSettings Settings that contain public ImagerySourceType SourceType;. Changing it when editor is not playing works once game is started. The issue is that changing it in inspector during runtime doesn't do a thing, same while changed in code.

I know this class has method public override ILayerModule ConstructModule(MapService service, IMapInformation mapInformation, UnityContext unityContext). This is invoked on map initialization. I don't know how to "reinitialize" map during runtime once ImagerySourceType is changed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions