Initial commit

This commit is contained in:
2025-12-10 21:06:22 +01:00
commit cc9190b9ce
476 changed files with 320218 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
using UnityEngine;
using VRC.SDK3.Components;
namespace UdonSharp.Examples.Utilities
{
/// <summary>
/// A Basic example class that demonstrates how to toggle a list of object on and off when someone interacts with the UdonBehaviour
/// This toggle only works locally
/// </summary>
[AddComponentMenu("Udon Sharp/Utilities/Interact Toggle")]
[UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)]
public class InteractToggle : UdonSharpBehaviour
{
[Tooltip("List of objects to toggle on and off")]
public GameObject[] toggleObjects;
public override void Interact()
{
foreach (GameObject toggleObject in toggleObjects)
{
if (toggleObject != null) {
toggleObject.SetActive(!toggleObject.activeSelf);
}
}
}
}
}