-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRefleshProbe.cs
More file actions
38 lines (30 loc) · 764 Bytes
/
Copy pathRefleshProbe.cs
File metadata and controls
38 lines (30 loc) · 764 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
38
using UnityEngine;
using System.Collections;
public class RefleshProbe : MonoBehaviour {
bool isReflesh = false;
bool isButtonActive = true;
public ReflectionProbe probeComponent;
private int renderID;
// Update is called once per frame
void Update ()
{
if (isReflesh){
renderID = probeComponent.RenderProbe();
//isButtonActive = false;
isReflesh = false;
}
if (probeComponent.IsFinishedRendering(renderID)){
isButtonActive = true;
}
}
void OnGUI ()
{
GUI.Box (new Rect (Screen.width - 110, Screen.height - 65, 100, 50), "ReflectionProbe");
if(isButtonActive){
if (GUI.Button (new Rect (Screen.width - 100, Screen.height - 40, 80, 20), "Reflesh")){
isReflesh = true;
isButtonActive = false;
}
}
}
}