Created
December 11, 2015 09:06
-
-
Save peroon/fc2c5cdaeb542d8cec5a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using System.Collections; | |
| public class ReflectionProbeScript : MonoBehaviour { | |
| public int perFrame = 3; | |
| ReflectionProbe reflectionProbe; | |
| void Start () { | |
| reflectionProbe = this.GetComponent<ReflectionProbe> (); | |
| } | |
| int counter = 0; | |
| void Update () { | |
| if(counter == 0){ | |
| this.reflectionProbe.RenderProbe(); | |
| } | |
| counter++; | |
| if (counter >= perFrame) { | |
| counter = 0; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment