Files
Simulation/Assets/Scripts/UI/TransformToolbarScript.cs

31 lines
854 B
C#
Raw Normal View History

2025-07-07 09:57:13 +09:00
using UnityEngine;
using Octopus.Simulator;
using UnityEngine.UI;
public class TransformToolbarScript : MonoBehaviour
{
Button Button_Hand;
Button Button_Move;
Button Button_Rotate;
private void Awake()
{
Button_Hand = transform.Find(nameof(Button_Hand)).GetComponent<Button>();
Button_Move = transform.Find(nameof(Button_Move)).GetComponent<Button>();
Button_Rotate = transform.Find(nameof(Button_Rotate)).GetComponent<Button>();
}
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
FindAnyObjectByType<Panel_SimulationUI>().onPlaying += OnPlay;
}
void OnPlay(bool flag)
{
2025-07-14 09:35:27 +09:00
Button_Hand.interactable = false;
Button_Move.interactable = false;
Button_Rotate.interactable = false;
2025-07-07 09:57:13 +09:00
}
}