Files
UmaViewer/Assets/Scripts/UI/UmaUIContainer.cs
T
CroakFang 204752d7d6 Add custom head, live character shader control, and live stage control. (#88)
* 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
2025-07-11 17:23:57 +02:00

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;
}