Extensions for unity renderers
public static class RendererExt
Inheritance System.Object RendererExt
Gives this renderer the default outline for towers, also making them glow white when selected
public static void ApplyOutlineShader(this Renderer renderer);
renderer
UnityEngine.Renderer
public static Mesh BakedMesh(this SkinnedMeshRenderer skinnedMeshRenderer);
skinnedMeshRenderer
UnityEngine.SkinnedMeshRenderer
public static int GetBoneIndex(this SkinnedMeshRenderer skinnedMeshRenderer, string name);
skinnedMeshRenderer
UnityEngine.SkinnedMeshRenderer
name
System.String
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);
skinnedMeshRenderer
UnityEngine.SkinnedMeshRenderer
submesh
System.Int32
System.Collections.Generic.List<System.Int32>
public static System.Collections.Generic.List<int[]> GetTrianglesAsArrays(this SkinnedMeshRenderer skinnedMeshRenderer, int submesh=0);
skinnedMeshRenderer
UnityEngine.SkinnedMeshRenderer
submesh
System.Int32
System.Collections.Generic.List<System.Int32[]>
public static System.Collections.Generic.List<Vector3> GetVertices(this SkinnedMeshRenderer skinnedMeshRenderer);
skinnedMeshRenderer
UnityEngine.SkinnedMeshRenderer
System.Collections.Generic.List<UnityEngine.Vector3>
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);
renderers
Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray
texture2D
UnityEngine.Texture2D
Set the texture for this renderer. Equivalent to "render.material.mainTexture = texture2D"
public static void SetMainTexture(this Renderer renderer, Texture2D texture2D);
renderer
UnityEngine.Renderer
texture2D
UnityEngine.Texture2D
Sets the outline color for this renderer
public static void SetOutlineColor(this Renderer renderer, Color color);
renderer
UnityEngine.Renderer
color
UnityEngine.Color
Unbinds the renderer's sharedMesh, so that changes you make to it don't change the original
public static Mesh UnbindMesh(this SkinnedMeshRenderer skinnedMeshRenderer);
skinnedMeshRenderer
UnityEngine.SkinnedMeshRenderer