Actual project things
This commit is contained in:
Executable
+15
@@ -0,0 +1,15 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
[RequireComponent(typeof(ViewFrustrumTrigger))]
|
||||
public class EnableOutOfView : MonoBehaviour {
|
||||
public Renderer Renderer;
|
||||
|
||||
void Start () {
|
||||
GetComponent<ViewFrustrumTrigger>().LeaveView += enable;
|
||||
}
|
||||
|
||||
void enable() {
|
||||
this.Renderer.enabled = true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user