Adventure Creator 1.84.3
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2024
Loading...
Searching...
No Matches
AC.LipSyncTexture Class Reference
Inheritance diagram for AC.LipSyncTexture:

Public Member Functions

void LimitTextureArray ()
void SetFrame (int textureIndex, bool fromLateUpdate=false)
 Sets the material's texture based on the currently-active phoneme.

Public Attributes

MeshRenderer skinnedMeshRenderer
int materialIndex
string propertyName = "_MainTex"
List< Texture2D > textures = new List<Texture2D>()
bool affectInLateUpdate

Protected Member Functions

void Awake ()
void LateUpdate ()

Protected Attributes

int thisFrameIndex = -1

Detailed Description

Animates a MeshRenderer's textures based on lipsync animation

Member Function Documentation

◆ LimitTextureArray()

void AC.LipSyncTexture.LimitTextureArray ( )

Resizes the textures List to match the number of phonemes defined in the Phonemes Editor

◆ SetFrame()

void AC.LipSyncTexture.SetFrame ( int textureIndex,
bool fromLateUpdate = false )

Sets the material's texture based on the currently-active phoneme.

Parameters
textureIndexThe index number of the phoneme
fromLateUpdateIf True, then this function is called from LateUpdate

Member Data Documentation

◆ affectInLateUpdate

bool AC.LipSyncTexture.affectInLateUpdate

If True, then changes to the material will be applied in LateUpdate, as opposed to Update calls

◆ materialIndex

int AC.LipSyncTexture.materialIndex

The index of the material to affect

◆ propertyName

string AC.LipSyncTexture.propertyName = "_MainTex"

The material's property name that will be replaced

◆ skinnedMeshRenderer

MeshRenderer AC.LipSyncTexture.skinnedMeshRenderer

The MeshRenderer to affect

◆ textures

List<Texture2D> AC.LipSyncTexture.textures = new List<Texture2D>()

A List of Texture2Ds that correspond to the phoneme defined in the Phonemes Editor