mirror of
https://udrimavric.com/MAVRIC/Stratasys-450mc-VR.git
synced 2025-01-23 07:38:33 -05:00
24 lines
507 B
C#
Executable File
24 lines
507 B
C#
Executable File
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Sirenix.OdinInspector;
|
|
using UnityEngine;
|
|
|
|
public class GameObjectToggler : MonoBehaviour
|
|
{
|
|
[SerializeField] private GameObject goToToggle;
|
|
|
|
[SerializeField] private bool defaultActiveState = true;
|
|
|
|
private void OnEnable()
|
|
{
|
|
goToToggle.SetActive(defaultActiveState);
|
|
}
|
|
|
|
[Button]
|
|
public void Toggle()
|
|
{
|
|
goToToggle.SetActive(!goToToggle.activeSelf);
|
|
}
|
|
}
|