forked from Unity-Technologies/EntityComponentSystemSamples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLoadButton.cs
More file actions
37 lines (32 loc) · 726 Bytes
/
Copy pathLoadButton.cs
File metadata and controls
37 lines (32 loc) · 726 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using UnityEngine;
namespace Streaming.AssetManagement
{
public class LoadButton : MonoBehaviour
{
#if !UNITY_DISABLE_MANAGED_COMPONENTS
public bool Loaded;
public bool Toggle;
public void Start()
{
Loaded = true;
}
void OnGUI()
{
if (Loaded)
{
if (GUI.Button(new Rect(10, 10, 150, 80), "Unload Assets"))
{
Toggle = true;
}
}
else
{
if (GUI.Button(new Rect(10, 10, 150, 80), "Load Assets"))
{
Toggle = true;
}
}
}
#endif
}
}