26 lines
544 B
C#
26 lines
544 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using VRC.Udon;
|
|
using UnityEngine.UI;
|
|
|
|
public class but : MonoBehaviour
|
|
{
|
|
private Button _button;
|
|
public GameObject Object;
|
|
public Color acctive;
|
|
public Color unacctive;
|
|
void Start()
|
|
{
|
|
_button = transform.GetComponent<Button>();
|
|
}
|
|
public void ObjectToggle()
|
|
{
|
|
Object.SetActive(!Object.activeSelf);
|
|
|
|
ColorBlock cb = _button.colors;
|
|
cb.normalColor = acctive;
|
|
_button.colors = cb;
|
|
}
|
|
}
|