Skip to main content

class LayerGameObjectPlacement

(Niantic.Lightship.Maps.MapLayers.Components.LayerGameObjectPlacement)

This MapLayerComponent instantiates GameObjects from a given prefab.

	class LayerGameObjectPlacement: Niantic.Lightship.Maps.MapLayers.Components.BaseTypes.LayerPrefabPlacementBase {
protected:
// methods

override Transform GetTransform(GameObject instance);
override GameObject GetGameObject(GameObject instance);
};

Inherited Members

public:
// methods

virtual void Initialize(LightshipMapView lightshipMapView, GameObject parent);
virtual abstract void OnMapOriginChanged() = 0;
PooledObject<T> PlaceInstance(in LatLng position, string instanceName = null);

virtual PooledObject<T> PlaceInstance(
in LatLng position,
in Quaternion rotation,
string instanceName = null
);

PooledObject<T> PlaceInstance(in Vector3 position, string instanceName = null);

PooledObject<T> PlaceInstance(
in Vector3 position,
in Quaternion rotation,
string instanceName = null
);

virtual override void Initialize(
LightshipMapView lightshipMapView,
GameObject parent
);

virtual override void OnMapOriginChanged();

```cs
protected:
// fields

LightshipMapView LightshipMapView;
GameObject ParentMapLayer;

// methods

virtual abstract Transform GetTransform(T instance) = 0;
virtual abstract GameObject GetGameObject(T instance) = 0;
virtual void OnObjectPoolAcquire(PooledObject<T> pooledObject);
virtual void OnObjectPoolRelease(T instance);
virtual Vector3 GetObjectScale(double mapRadius);
virtual Quaternion GetObjectRotation(in Quaternion rotation);
virtual Vector3 GetObjectPosition(in LatLng location);