Skip to main content

RendererMaterializer

A class in Root.Township, the global namespace.

Plays a dissolve in or out on a set of renderers. On the server it only calls the finish callback after the duration.

Constructors​

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

Fields​

3 private and internal fields
MemberWhat it is
private Texture dissolveTextureNoise texture used for the dissolve.
private RendererGroup renderersToAddRenderer group added as targets on start.
private Shader shaderDissolve shader.

Properties​

MemberWhat it is
RendererMaterializerHandler Handler { get; private set; }The handler that runs the effect. Null on the server.

Methods​

MemberWhat it is
void DemateralizeRenderers(float duration, Action animationFinishedCallback = null)Dissolves the renderers out over the duration, then calls the callback.
void MaterializeRenderers(float duration, Action animationFinishedCallback = null)Dissolves the renderers in over the duration, then calls the callback.
void SetTargetObject(Transform rendererParent)Client: targets every renderer under the given transform.
void SetTargets(IEnumerable<Renderer> renderers)Client: targets the given renderers.
1 private and internal method
MemberWhat it is
private void Awake()Client: makes the handler and adds the renderers from renderersToAdd.

Used in​

Members of other types that take, return or hold a RendererMaterializer: