mirror of
https://udrimavric.com/MAVRIC/Stratasys-450mc-VR.git
synced 2025-01-23 15:48:33 -05:00
24 lines
507 B
C#
24 lines
507 B
C#
|
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);
|
||
|
}
|
||
|
}
|