class MeshBuilderBase
(Niantic.Lightship.Maps.Builders.MeshBuilderBase)
Overview
class MeshBuilderBase:
Niantic.Lightship.Maps.Builders.FeatureBuilderBase,
Niantic.Lightship.Maps.Builders.IMeshBuilder {
public:
// methods
MeshFilter CreateMeshComponents(IMapTileObject mapTileObject);
virtual void Release(MeshFilter meshFilter);
protected:
// fields
Material[] _materials;
// methods
static void SetMeshForFilter(Mesh mesh, MeshFilter meshFilter);
};
// direct descendants
class MeshBuilderAsync;
class MeshBuilderStandard;
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);
MeshFilter CreateMeshComponents(IMapTileObject mapTileObject);
void Release(MeshFilter meshFilter);
```cs
protected:
// fields
string BuilderName => _builderName.NullIfEmptyOrWhitespace() ?? name;
LayerKind Layer => _mapLayer;
List<FeatureKind> Features => _features;
// properties
Vector3 ZOffset;
Detailed Documentation
Methods
CreateMeshComponents
MeshFilter CreateMeshComponents(IMapTileObject mapTileObject)
Creates MeshRenderer and MeshFilter components on a new GameObject that are used to render generated meshes.
Release
virtual void Release(MeshFilter meshFilter)
Called when a maptile is removed from the scene. This method cleans up meshes or other resources created when the maptile is built by this builder.
SetMeshForFilter
static void SetMeshForFilter(Mesh mesh, MeshFilter meshFilter)
Assigns a generated Mesh to a MeshFilter for rendering.
Parameters:
mesh
- The mesh generated by the Build
method.
meshFilter
- The MeshFilter created by the call to the builder's CreateMeshComponents method.