---
title: "Renderer.OnBecameVisible"
author: "whuthj"
date: "2011-05-11T18:42:39Z"
tags: []
categories: ["互联网"]
slug: "renderer-onbecamevisible"
draft: false
lastmod: "2011-05-11T18:42:39Z"
id: 1040390
url: "https://whuthj.iteye.com/blog/1040390"
---

Renderer.OnBecameVisible  
Renderer.OnBecameInvisible

容易遗忘的两事件

例子：

```
// Enables the behaviour when it is visible
function OnBecameVisible() {
enabled = true;
}
```

   
当在摄影机视线内/视线外 时候触发此事件