IIndoorMapMaterial (Interface)

Namespace: Wrld.Resources.IndoorMaps

This interface is used to apply materials to Indoor Maps. Implement it in your own classes to provide custom material rendering functionality. A default implementation is available in DefaultIndoorMapMaterial.cs.

Methods

void AssignToMeshRenderer (MeshRenderer renderer)

This function controls how the material is applied to the MeshRenderer’s material or sharedMaterial properties. Note: this is called automatically when a renderable has streamed in and the Material is applied to it.

Argument Type Description
renderer MeshRenderer The target MeshRenderer.

void PrepareToRender (IndoorMapRenderable renderable)

Called just before rendering an associated IndoorMapRenderable.

Argument Type Description
renderable IndoorMapRenderable The IndoorMapRenderable about to be rendered with this material.

void PrepareToRender (IndoorMapHighlightRenderable renderable)

Called just before rendering an associated IndoorMapRenderable.

Argument Type Description
renderable IndoorMapHighlightRenderable The IndoorMapRenderable about to be rendered with this material.

void PrepareToRender (InstancedIndoorMapRenderable renderable)

Called just before rendering an associated IndoorMapRenderable.

Argument Type Description
renderable InstancedIndoorMapRenderable The IndoorMapRenderable about to be rendered with this material.

IIndoorMapMaterial CreateCopy ()

Called when materials are instantiated; provides a copy of this material.

Properties

Material MaterialInstance

The Unity Material instance associated with this IIndoorMapMaterial.

Material MaterialInstance { get; private set; } 

Action<​String, Texture​> OnStreamingTextureReceived

This is called when a streaming texture has been fetched for the renderable that this material is associated with. The string argument is the texture key for the streaming texture associated with the renderable. The Texture argument is the Unity Texture which holds the streaming texture itself.

Action<String, Texture> OnStreamingTextureReceived { get; set; } 
v0.8.17