ArabDesert/Assets/ReimajoBoothAssets/AdminTool/Scripts/ResetObjectPositionButton.cs

28 lines
1.2 KiB
C#

using UdonSharp;
using UnityEngine;
/// <summary>
/// Script from Reimajo, purchased at https://reimajo.booth.pm/
/// Join my Discord Server to receive update notifications & support for this asset: https://discord.gg/SWkNA394Mm
/// There is a version of this tool available with advanced protection, see my discord for more details.
/// If you have any issues, please contact me on Discord or Booth or Twitter https://twitter.com/ReimajoChan
/// </summary>
namespace ReimajoBoothAssets
{
/// <summary>
/// Must be placed on an object with a collider on it.
/// Must have the admin panel assigned.
/// Must be assigned to the admin panel to only be enabled for admins.
/// Should be disabled at start, although the admin panel will also disable it at start for non admins.
/// Will be enabled at start for admins.
/// Attached collider should also be disabled at start, will be enabled at start for admins.
/// </summary>
public class ResetObjectPositionButton : UdonSharpBehaviour
{
[SerializeField]
private PickupSync _panel;
public override void Interact()
{
_panel._ResetPosition();
}
}
}