Table of Contents

Class MapModeSwitcher

Namespace
LansMap.Map.Views
[DefaultExecutionOrder(140)]
public sealed class MapModeSwitcher : MonoBehaviour
Inheritance
object
Object
Component
Behaviour
MonoBehaviour
MapModeSwitcher

Fields

FullscreenMap

[Tooltip("The fullscreen 2D map.")]
public ScreenMapView FullscreenMap

Field Value

ScreenMapView

FullscreenRoot

[Tooltip("Root object enabled in fullscreen mode; usually the map camera rig. Optional - the map component's own object is used when empty.")]
public GameObject FullscreenRoot

Field Value

GameObject

Prefabs

[Tooltip("Prefab markers that travel with the switch. Leave empty if each map has its own.")]
public WorldMarkerManager Prefabs

Field Value

WorldMarkerManager

StartInTabletop

[Tooltip("Start in tabletop mode instead of fullscreen.")]
public bool StartInTabletop

Field Value

bool

TabletopRoot

[Tooltip("Root object enabled in tabletop mode; usually the table plane. Optional - the surface's own object is used when empty.")]
public GameObject TabletopRoot

Field Value

GameObject

TabletopSurface

[Tooltip("The tabletop surface (with its TabletopContentView beside it).")]
public SurfaceMapView TabletopSurface

Field Value

SurfaceMapView

Properties

InTabletop

public bool InTabletop { get; }

Property Value

bool

Methods

CopyView(BaseMapView, BaseMapView)

Copies the shared view state (center, zoom, bearing, altitude scale) between any two views.

public static void CopyView(BaseMapView from, BaseMapView to)

Parameters

from BaseMapView
to BaseMapView

Remarks

Pitch is not part of BaseMapView - a tabletop has none - so a ScreenMapView keeps its own pitch across a round trip.

SwitchToFullscreen()

public void SwitchToFullscreen()

SwitchToTabletop()

public void SwitchToTabletop()

Toggle()

public void Toggle()