class ObjectBuilderStandard
(Niantic.Lightship.Maps.Builders.Standard.ObjectBuilderStandard)
Overview
class ObjectBuilderStandard:
Niantic.Lightship.Maps.Builders.ObjectBuilderBase,
Niantic.Lightship.Maps.Builders.Standard.IObjectBuilderStandard {
public:
// methods
virtual void Build(IMapTile mapTile, GameObject parent);
protected:
// methods
virtual Vector3 GetObjectPosition(IMapTileFeature feature);
virtual Quaternion GetObjectRotation(IMapTileFeature feature);
virtual Vector3 GetObjectScale(IMapTileFeature feature);
};
// direct descendants
class AreaObjectBuilder;
Inherited Members
public:
// fields
int MinLOD => _minLOD;
int MaxLOD => _maxLOD;
// properties
Guid Id;
int MinLOD;
int MaxLOD;
Guid Id;
// methods
virtual void Initialize(ILightshipMapView lightshipMapView);
GameObject CreateParent(IMapTileObject mapTileObject);
void Release(GameObject parent);
GameObject CreateParent(IMapTileObject mapTileObject);
virtual abstract void Release(GameObject parent) = 0;
void Build(IMapTile mapTile, GameObject parent);
```cs
protected:
// fields
string BuilderName => _builderName.NullIfEmptyOrWhitespace() ?? name;
LayerKind Layer => _mapLayer;
List<FeatureKind> Features => _features;
// properties
Vector3 ZOffset;
// methods
virtual abstract void BuildFeature(
IMapTile mapTile,
GameObject parent,
IMapTileFeature feature
) = 0;
Detailed Documentation
Methods
Build
virtual void Build(IMapTile mapTile, GameObject parent)
Called when a maptile is added to the scene. This method instantiates objects for a specific set of maptile features.
GetObjectPosition
virtual Vector3 GetObjectPosition(IMapTileFeature feature)
Gets an instantiated object's local position. This method should be overridden when customizing the position of placed object instances.
Parameters:
feature
- The maptile feature being built
Returns:
The local position applied to placed objects
GetObjectRotation
virtual Quaternion GetObjectRotation(IMapTileFeature feature)
Gets an instantiated object's local rotation. This method should be overridden when customizing the orientation of placed object instances.
Parameters:
feature
- The maptile feature being built
Returns:
A local rotation that will be applied to placed objects
GetObjectScale
virtual Vector3 GetObjectScale(IMapTileFeature feature)
Gets an instantiated object's local scale. This method should be overridden when customizing the scale of placed object instances.
Parameters:
feature
- The maptile feature being built
Returns:
A local scale that will be applied to placed objects