Skip to Main Content

BTD_Mod_Helper.Extensions.RendererExt


BloonsTD6 Mod Helper

BTD_Mod_Helper.Extensions

RendererExt Class

Extensions for unity renderers

public static class RendererExt

Inheritance System.Object  RendererExt

Methods

RendererExt.ApplyOutlineShader(this Renderer) Method

Gives this renderer the default outline for towers, also making them glow white when selected

public static void ApplyOutlineShader(this Renderer renderer);

Parameters

renderer UnityEngine.Renderer

RendererExt.BakedMesh(this SkinnedMeshRenderer) Method

public static Mesh BakedMesh(this SkinnedMeshRenderer skinnedMeshRenderer);

Parameters

skinnedMeshRenderer UnityEngine.SkinnedMeshRenderer

Returns

UnityEngine.Mesh

RendererExt.GetBoneIndex(this SkinnedMeshRenderer, string) Method

public static int GetBoneIndex(this SkinnedMeshRenderer skinnedMeshRenderer, string name);

Parameters

skinnedMeshRenderer UnityEngine.SkinnedMeshRenderer

name System.String

Returns

System.Int32

RendererExt.GetTriangles(this SkinnedMeshRenderer, int) Method

Gets the list of triangles for a Mesh, even if its not marked as isReadable


Each "triangle" is a set of 3 consecutive ints in the list, where the number is the index in the vertices

public static System.Collections.Generic.List<int> GetTriangles(this SkinnedMeshRenderer skinnedMeshRenderer, int submesh=0);

Parameters

skinnedMeshRenderer UnityEngine.SkinnedMeshRenderer

submesh System.Int32

Returns

System.Collections.Generic.List<System.Int32>

RendererExt.GetTrianglesAsArrays(this SkinnedMeshRenderer, int) Method

public static System.Collections.Generic.List<int[]> GetTrianglesAsArrays(this SkinnedMeshRenderer skinnedMeshRenderer, int submesh=0);

Parameters

skinnedMeshRenderer UnityEngine.SkinnedMeshRenderer

submesh System.Int32

Returns

System.Collections.Generic.List<System.Int32[]>

RendererExt.GetVertices(this SkinnedMeshRenderer) Method

public static System.Collections.Generic.List<Vector3> GetVertices(this SkinnedMeshRenderer skinnedMeshRenderer);

Parameters

skinnedMeshRenderer UnityEngine.SkinnedMeshRenderer

Returns

System.Collections.Generic.List<UnityEngine.Vector3>

RendererExt.SetMainTexture(this Il2CppReferenceArray, Texture2D) Method

Set the texture for all renderers in this collection. Equivalent to a "ForEach(render.material.mainTexture =
texture2D)"

public static void SetMainTexture(this Il2CppReferenceArray<Renderer> renderers, Texture2D texture2D);

Parameters

renderers Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray

texture2D UnityEngine.Texture2D

RendererExt.SetMainTexture(this Renderer, Texture2D) Method

Set the texture for this renderer. Equivalent to "render.material.mainTexture = texture2D"

public static void SetMainTexture(this Renderer renderer, Texture2D texture2D);

Parameters

renderer UnityEngine.Renderer

texture2D UnityEngine.Texture2D

RendererExt.SetOutlineColor(this Renderer, Color) Method

Sets the outline color for this renderer

public static void SetOutlineColor(this Renderer renderer, Color color);

Parameters

renderer UnityEngine.Renderer

color UnityEngine.Color

RendererExt.UnbindMesh(this SkinnedMeshRenderer) Method

Unbinds the renderer's sharedMesh, so that changes you make to it don't change the original

public static Mesh UnbindMesh(this SkinnedMeshRenderer skinnedMeshRenderer);

Parameters

skinnedMeshRenderer UnityEngine.SkinnedMeshRenderer

Returns

UnityEngine.Mesh

To learn how to download BTD Mod Helper and install mods, click here