Show / Hide Table of Contents

Class TextureUtilities

Contains many utility functions related to textures

Inheritance
object
TextureUtilities
Namespace: WeaverCore.Utilities
Assembly: WeaverCore.dll
Syntax
public static class TextureUtilities

Methods

| Edit this page View Source

Clone(Texture2D)

Clones a texture

Declaration
public static Texture2D Clone(this Texture2D tex)
Parameters
Type Name Description
Texture2D tex

The texture to clone

Returns
Type Description
Texture2D

Returns a clone of the texture

| Edit this page View Source

FlipDiagonally(Texture2D)

Flips a texture across the diagonal (vertically and horizontally)

Declaration
public static void FlipDiagonally(Texture2D texture)
Parameters
Type Name Description
Texture2D texture

The texture to flip

| Edit this page View Source

FlipHorizontally(Texture2D)

Flips a texture horizontally

Declaration
public static void FlipHorizontally(Texture2D texture)
Parameters
Type Name Description
Texture2D texture

The texture to flip

| Edit this page View Source

FlipVertically(Texture2D)

Flips a texture vertically

Declaration
public static void FlipVertically(Texture2D texture)
Parameters
Type Name Description
Texture2D texture

The texture to flip

| Edit this page View Source

Rotate(Texture2D, RotationType)

Applies a rotation to a texture

Declaration
public static void Rotate(this Texture2D texture, RotationType rotation)
Parameters
Type Name Description
Texture2D texture

The texture to rotate

RotationType rotation

The rotation to be applied

| Edit this page View Source

ToTexture2D(RenderTexture)

Converts a RenderTexture into a Texture2D

Declaration
public static Texture2D ToTexture2D(this RenderTexture rTex)
Parameters
Type Name Description
RenderTexture rTex

The render texture to convert

Returns
Type Description
Texture2D

Returns the render texture as a texture 2D

  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Generated by DocFX
☀
☾