Renderer

csharp
public class Renderer : Component

Namespace NodeWorld.Flux.

A Renderer of the world: it draws a mesh, a line, a trail, particles. The server has none.

Properties

enabled

csharp
public bool enabled { get; set; }

The renderer draws.

bounds

csharp
public Bounds bounds { get; }

The box around what it draws, in the world.

sharedMaterial

csharp
public Material sharedMaterial { get; set; }

The material of the renderer (its first one): a material of the world, shared by every renderer that uses it.

sharedMaterials

csharp
public Material[] sharedMaterials { get; set; }

Its materials, materials of the world shared by every renderer that uses them; setting it sets each index (SetSharedMaterial).

materialCount

csharp
public int materialCount { get; }

The number of its materials.

Methods

SetSharedMaterial

csharp
public void SetSharedMaterial(int index, Material material)

Changes material index of the renderer to a material of the world.

SetFloat

csharp
public void SetFloat(string name, float value, int materialIndex = 0)

A float property for this renderer alone (a property block): the shared material does not change.

SetVector

csharp
public void SetVector(string name, Vector4 value, int materialIndex = 0)

A vector property for this renderer alone: the shared material does not change.

SetColor

csharp
public void SetColor(string name, Color value, int materialIndex = 0)

A color property for this renderer alone: the shared material does not change.

SetMatrix

csharp
public void SetMatrix(string name, Matrix4x4 value, int materialIndex = 0)

A matrix property for this renderer alone: the shared material does not change.

SetTexture

csharp
public void SetTexture(string name, RenderTexture value, int materialIndex = 0)

A render texture of the scripts as a texture property of this renderer alone: the shared material does not change.