This commit is contained in:
2025-05-10 18:06:44 +08:00
parent e010759358
commit dea9a4f58e
47 changed files with 421 additions and 359 deletions

View File

@@ -126,10 +126,10 @@ namespace Rewired.Demos {
// Delete placeholders
foreach(Transform t in actionGroupTransform) {
Destroy(t.gameObject);
Object.Destroy(t.gameObject);
}
foreach(Transform t in fieldGroupTransform) {
Destroy(t.gameObject);
Object.Destroy(t.gameObject);
}
// Create Action fields and input field buttons
@@ -150,13 +150,13 @@ namespace Rewired.Demos {
private void CreateUIRow(InputAction action, AxisRange actionRange, string label) {
// Create the Action label
GameObject labelGo = Instantiate<GameObject>(textPrefab);
GameObject labelGo = Object.Instantiate<GameObject>(textPrefab);
labelGo.transform.SetParent(actionGroupTransform);
labelGo.transform.SetAsLastSibling();
labelGo.GetComponent<Text>().text = label;
// Create the input field button
GameObject buttonGo = Instantiate<GameObject>(buttonPrefab);
GameObject buttonGo = Object.Instantiate<GameObject>(buttonPrefab);
buttonGo.transform.SetParent(fieldGroupTransform);
buttonGo.transform.SetAsLastSibling();