204752d7d6
* Bug fix, improved UI layout and live vocals * Bug Fixes, New Live Compatibility * Android build support * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Fix issues with the new version of the game * bug fix * add config button * Improve performance * Sync fork * bug fix, new uma compatibility * Add /UserSettings to gitignore * bug fix, add live characher shader control * fix compilation errors * fix compilation errors 2 * fix the live lighting calculation logic * bug fix, add editor layout settings to gitignore * bug fix, add editor layout settings to gitignore * Add time scale keys for live * live camera bug fix * add live stage control, optimize live performance * fix build error * add uma head custom
72 lines
1.6 KiB
C#
72 lines
1.6 KiB
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class UmaUIContainer : MonoBehaviour
|
|
{
|
|
enum TextType
|
|
{
|
|
Text,
|
|
TextMesh,
|
|
}
|
|
|
|
[SerializeField]TextType TextComponentType = TextType.Text;
|
|
public string Name
|
|
{
|
|
get
|
|
{
|
|
switch (TextComponentType)
|
|
{
|
|
case TextType.Text: return Text.text;
|
|
case TextType.TextMesh: return TextMesh.text;
|
|
default: return TextMesh.text;
|
|
}
|
|
}
|
|
set
|
|
{
|
|
switch (TextComponentType)
|
|
{
|
|
case TextType.Text:
|
|
Text.text = value;
|
|
break;
|
|
case TextType.TextMesh:
|
|
TextMesh.text = value;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
public float FontSize
|
|
{
|
|
get
|
|
{
|
|
switch (TextComponentType)
|
|
{
|
|
case TextType.Text: return Text.fontSize;
|
|
case TextType.TextMesh: return TextMesh.fontSize;
|
|
default: return TextMesh.fontSize;
|
|
}
|
|
}
|
|
set
|
|
{
|
|
switch (TextComponentType)
|
|
{
|
|
case TextType.Text:
|
|
Text.fontSize = (int)value;
|
|
break;
|
|
case TextType.TextMesh:
|
|
TextMesh.fontSize = value;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
public TMPro.TextMeshProUGUI TextMesh;
|
|
public Text Text;
|
|
public Button Button;
|
|
public Slider Slider;
|
|
public Toggle Toggle;
|
|
public Image Image;
|
|
public Image ToggleImage;
|
|
public string Id;
|
|
}
|
|
|