class ObjectBuilderBase
(Niantic.Lightship.Maps.Builders.ObjectBuilderBase)
Overview
class ObjectBuilderBase:
Niantic.Lightship.Maps.Builders.FeatureBuilderBase,
Niantic.Lightship.Maps.Builders.IObjectBuilder {
public:
// methods
GameObject CreateParent(IMapTileObject mapTileObject);
virtual abstract void Release(GameObject parent) = 0;
protected:
// methods
virtual abstract void BuildFeature(
IMapTile mapTile,
GameObject parent,
IMapTileFeature feature
) = 0;
};
// direct descendants
class ObjectBuilderAsync;
class ObjectBuilderStandard;
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);
```cs
protected:
// fields
string BuilderName => _builderName.NullIfEmptyOrWhitespace() ?? name;
LayerKind Layer => _mapLayer;
List<FeatureKind> Features => _features;
// properties
Vector3 ZOffset;
Detailed Documentation
Methods
CreateParent
GameObject CreateParent(IMapTileObject mapTileObject)
Creates a GameObject that all Objects instantiated by this builder will be parented to.
Release
virtual abstract void Release(GameObject parent) = 0
Called when a maptile is removed from the scene. This method cleans up objects or other resources created when the maptile is built by this builder.
BuildFeature
virtual abstract void BuildFeature(
IMapTile mapTile,
GameObject parent,
IMapTileFeature feature
) = 0
Called by the Build
method for each IMapTileFeature that matches the builder's LayerKind and FeatureKinds.
Parameters:
mapTile
- The IMapTile containing features to build.
parent
- The GameObject instantiated by CreateParent that this builder's objects will be parented to.
feature
- The IMapTileFeature to build.