提交捏脸插件

This commit is contained in:
2025-09-18 00:07:48 +08:00
parent cde46100ff
commit aba294e510
1676 changed files with 295391 additions and 4 deletions

View File

@@ -0,0 +1,37 @@
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;
namespace CC
{
public class InputFieldHandler : MonoBehaviour, ICustomizerUI
{
private TMPro.TMP_InputField inputField;
private CC_UI_Util script;
private void Awake()
{
inputField = GetComponent<TMPro.TMP_InputField>();
}
public void InitializeUIElement(CharacterCustomization customizerScript, CC_UI_Util parentUI)
{
script = parentUI;
}
public void RefreshUIElement()
{
}
public void InvokeMethod(string methodName)
{
// Get the method from CC_UI_Util that matches the name
var method = typeof(CC_UI_Util).GetMethod(methodName);
if (method != null && method.GetParameters().Length == 1 &&
method.GetParameters()[0].ParameterType == typeof(string))
{
method.Invoke(script, new object[] { inputField.text });
}
}
}
}