aha
This commit is contained in:
15
Assets/Mirror/Components/Profiling/ToggleHotkey.cs
Normal file
15
Assets/Mirror/Components/Profiling/ToggleHotkey.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using UnityEngine;
|
||||
namespace Mirror
|
||||
{
|
||||
public class ToggleHotkey : MonoBehaviour
|
||||
{
|
||||
public KeyCode Key = KeyCode.F10;
|
||||
public GameObject ToToggle;
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (Input.GetKeyDown(Key))
|
||||
ToToggle.SetActive(!ToToggle.activeSelf);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user