Show / Hide Table of Contents

Class RuntimeMaterials

Holds a list of archives and records and uses them to assign materials when the prefab is instantiated at runtime. Materials are automatically applied on Awake or, if DaggerfallWorkshop.Utility.AssetInjection.RuntimeMaterials.UseDungeonTextureTable is true, as part of dungeon layout or when requested with an overload of ApplyMaterials().

Inheritance
Object
Object
Component
Behaviour
MonoBehaviour
RuntimeMaterials
Namespace: DaggerfallWorkshop.Utility.AssetInjection
Assembly: Assembly-CSharp.dll
Syntax
[RequireComponent(typeof(MeshRenderer))]
public sealed class RuntimeMaterials : MonoBehaviour

Methods

| Improve this Doc View Source

ApplyMaterials()

Applies materials to MeshRender found on gameobject using existing configuration.

Declaration
[ContextMenu("Reapply Materials")]
public void ApplyMaterials()
| Improve this Doc View Source

ApplyMaterials(RuntimeMaterial[])

Applies materials to MeshRender found on gameobject with the given configuration.

Declaration
public void ApplyMaterials(RuntimeMaterial[] materials)
Parameters
Type Name Description
RuntimeMaterial[] materials
| Improve this Doc View Source

ApplyMaterials(Int32[], RuntimeMaterial[])

Applies materials to MeshRender found on gameobject with the given dungeon texture table and optionally overrides configuration.

Declaration
public void ApplyMaterials(int[] dungeonTextureTable, RuntimeMaterial[] materials = null)
Parameters
Type Name Description
Int32[] dungeonTextureTable

Texture table to be used.

RuntimeMaterial[] materials

Overrides materials configuration if not null.

Extension Methods

MBExtensions.Invoke(MonoBehaviour, Action, Single)
MBExtensions.Invoke<T>(MonoBehaviour, Action<T>, T, Single)
MBExtensions.Invoke<T1, T2>(MonoBehaviour, Action<T1, T2>, T1, T2, Single)
MBExtensions.Invoke<T1, T2, T3>(MonoBehaviour, Action<T1, T2, T3>, T1, T2, T3, Single)
MBExtensions.Invoke<T1, T2, T3, T4>(MonoBehaviour, Action<T1, T2, T3, T4>, T1, T2, T3, T4, Single)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX