Table of Contents

Class MaterialStreamViewExtensions

Namespace
Stride.CommunityToolkit.Rendering
Assembly
Stride.CommunityToolkit.dll

Adds Game Studio's material view modes to a game.

public static class MaterialStreamViewExtensions
Inheritance
MaterialStreamViewExtensions

Methods

AddMaterialStreamView(Game)

Adds a material stream view: set its Stream and every mesh draws that stream as its colour instead of the lit result, the way the editor's toolbar view modes do. Call once, after the compositor exists.

public static MaterialStreamView AddMaterialStreamView(this Game game)

Parameters

game Game

The game whose compositor draws the meshes.

Returns

MaterialStreamView

The view, showing lit shading until a stream is set. Dispose it to take the feature out again.

Remarks

Behind the call: a MaterialStreamRenderFeature on the compositor's MeshRenderFeature, which sets the forward effect's surface-filter permutation on every effect drawn while a stream is chosen. Nothing is drawn differently until then.

Exceptions

InvalidOperationException

The game has no compositor or no mesh render feature.