Skip to main content

RendererMeshReplacePooledObject

A class in Root.Township, the global namespace.

Pooled object that swaps the mesh and material on a set of renderers when set up.

Constructors​

MemberWhat it is
RendererMeshReplacePooledObject()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

2 private and internal fields
MemberWhat it is
private MeshFilter[] meshFiltersMesh filters that get the mesh.
private MeshRenderer[] renderersRenderers that get the material.

Methods​

MemberWhat it is
override void Setup(Mesh mesh, Material material)Sets the material on each renderer and the mesh on each matching filter.
1 private and internal method
MemberWhat it is
private void OnValidate()Editor: logs an error if the renderer and mesh filter counts differ.