HKI Core
HKI Core
Misc
CursorEnAndDisabler.cs
Go to the documentation of this file.
1
using
UnityEngine
;
2
using
System
.Collections;
3
4
namespace
HKI
.Core.Misc
5
{
9
public
class
CursorEnAndDisabler
: MonoBehaviour
10
{
11
// Public variables
12
[SerializeField]
bool
DisableCursorOnStart =
true
;
13
14
// Start function
15
void
Start
()
16
{
17
Cursor.visible = !DisableCursorOnStart;
18
}
19
20
// OnDestroy function
21
void
OnDestroy
()
22
{
23
Cursor.visible = !Cursor.visible;
24
}
25
}
26
}
HKI.Core.Misc.CursorEnAndDisabler.OnDestroy
void OnDestroy()
Definition:
CursorEnAndDisabler.cs:21
System
HKI.Core.Misc.CursorEnAndDisabler
This MonoBehaviour disables and endables or the other way around the cursor on start and on destroy...
Definition:
CursorEnAndDisabler.cs:9
HKI.Core.Misc.CursorEnAndDisabler.Start
void Start()
Definition:
CursorEnAndDisabler.cs:15
UnityEngine
HKI
Generated by
1.8.13