class MapLayerComponent
(Niantic.Lightship.Maps.MapLayers.Components.BaseTypes.MapLayerComponent)
Overview
The base class for components that can be added to a MapLayer
class MapLayerComponent: MonoBehaviour {
public:
// methods
virtual void Initialize(LightshipMapView lightshipMapView, GameObject parent);
virtual abstract void OnMapOriginChanged() = 0;
protected:
// fields
LightshipMapView LightshipMapView;
GameObject ParentMapLayer;
};
// direct descendants
template <T>
class LayerPrefabPlacementBase;
class LayerGameObjectInstance;
class LayerLineRenderer;
class LayerPolygonRenderer;
Detailed Documentation
The base class for components that can be added to a MapLayer
Fields
LightshipMapView
LightshipMapView LightshipMapView
The LightshipMapView to which this component's MapLayer belongs.
ParentMapLayer
GameObject ParentMapLayer
A GameObject for this component's MapLayer. All instances of objects created by this component will be parented to this GameObject.
Methods
Initialize
virtual void Initialize(LightshipMapView lightshipMapView, GameObject parent)
Called from the LightshipMapView associated with this component's MapLayer at startup.
Parameters:
lightshipMapView
- The map associated with this component
parent
- The GameObject created for instances of objects created by this component (which is assigned to ParentMapLayer
OnMapOriginChanged
virtual abstract void OnMapOriginChanged() = 0
Called from this component's MapLayer when its LightshipMapView has been repositioned to the scene's origin.