Skip to main content

class MapLayer

(Niantic.Lightship.Maps.MapLayers.MapLayer)

Overview

This class represents a single MapLayer, which is a group of GameObjects attached to a LightshipMapView. These objects are instantiated and added to the map by one or more MapLayerComponents associated with a given MapLayer instance.

	class MapLayer: MonoBehaviour {
public:
// methods

void Initialize(LightshipMapView lightshipMapView, Transform parent);
void OnMapOriginChanged();
};

Detailed Documentation

This class represents a single MapLayer, which is a group of GameObjects attached to a LightshipMapView. These objects are instantiated and added to the map by one or more MapLayerComponents associated with a given MapLayer instance.

Methods

Initialize

void Initialize(LightshipMapView lightshipMapView, Transform parent)

Called by the parent LightshipMapView at startup

    Parameters:

    lightshipMapView - The map associated with this MapLayer

    parent - The Transform of the parent GameObject that all MapLayer s are children of.

OnMapOriginChanged

void OnMapOriginChanged()

Called by the parent LightshipMapView when it has been repositioned to the scene's origin.