PixelCrushers.DialogueSystem.UITools Class Reference

Static Public Member Functions

static void RequireEventSystem ()
 Ensures that the scene has an EventSystem. More...
 
static int GetAnimatorNameHash (AnimatorStateInfo animatorStateInfo)
 
static void ClearSpriteCache ()
 
static Sprite CreateSprite (Texture2D texture)
 
static string GetUIFormattedText (FormattedText formattedText)
 
static void SendTextChangeMessage (UnityEngine.UI.Text text)
 Sends "OnTextChange(text)" to the dialogue UI GameObject. More...
 
static void Select (UnityEngine.UI.Selectable selectable, bool allowStealFocus=true)
 

Static Public Attributes

static Dictionary< Texture2D, Sprite > spriteCache = new Dictionary<Texture2D, Sprite>()
 Dialogue databases use Texture2D for actor portraits. More...
 

Member Function Documentation

◆ ClearSpriteCache()

static void PixelCrushers.DialogueSystem.UITools.ClearSpriteCache ( )
static

◆ CreateSprite()

static Sprite PixelCrushers.DialogueSystem.UITools.CreateSprite ( Texture2D  texture)
static

◆ GetAnimatorNameHash()

static int PixelCrushers.DialogueSystem.UITools.GetAnimatorNameHash ( AnimatorStateInfo  animatorStateInfo)
static

◆ GetUIFormattedText()

static string PixelCrushers.DialogueSystem.UITools.GetUIFormattedText ( FormattedText  formattedText)
static

◆ RequireEventSystem()

static void PixelCrushers.DialogueSystem.UITools.RequireEventSystem ( )
static

Ensures that the scene has an EventSystem.

◆ Select()

static void PixelCrushers.DialogueSystem.UITools.Select ( UnityEngine.UI.Selectable  selectable,
bool  allowStealFocus = true 
)
static

◆ SendTextChangeMessage()

static void PixelCrushers.DialogueSystem.UITools.SendTextChangeMessage ( UnityEngine.UI.Text  text)
static

Sends "OnTextChange(text)" to the dialogue UI GameObject.

Parameters
text

Member Data Documentation

◆ spriteCache

Dictionary<Texture2D, Sprite> PixelCrushers.DialogueSystem.UITools.spriteCache = new Dictionary<Texture2D, Sprite>()
static

Dialogue databases use Texture2D for actor portraits.

Unity UI uses sprites. UnityUIDialogueUI converts textures to sprites. This dictionary contains converted sprites so we don't need to reconvert them every single time we want to show an actor's portrait.


The documentation for this class was generated from the following file: