Answers for "Unity gameobject visible to specific camera"

C#
0

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");
	}
}
Posted by: Guest on July-30-2021

C# Answers by Framework

Browse Popular Code Answers by Language