Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save peroon/fc2c5cdaeb542d8cec5a to your computer and use it in GitHub Desktop.

Select an option

Save peroon/fc2c5cdaeb542d8cec5a to your computer and use it in GitHub Desktop.
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