Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

Unity gameobject visible to specific camera

using UnityEngine;
 
public class TestRendered : MonoBehaviour
{	
	void Update()
	{
		if (renderer.IsVisibleFrom(Camera.main)) Debug.Log("Visible");
		else Debug.Log("Not visible");
	}
}
Source by wiki.unity3d.com #
 
PREVIOUS NEXT
Tagged: #Unity #gameobject #visible #specific #camera
ADD COMMENT
Topic
Name
6+9 =