18 lines
406 B
C#
18 lines
406 B
C#
|
using UnityEngine;
|
|||
|
|
|||
|
public class MainCamera : MonoBehaviour {
|
|||
|
|
|||
|
public Camera ourCamera;
|
|||
|
public WorkingPortal portal;
|
|||
|
public WorkingPortal viewportal;
|
|||
|
|
|||
|
void OnPreCull () {
|
|||
|
if(portal.myGameObject.activeInHierarchy){
|
|||
|
portal.Render (ourCamera);
|
|||
|
}
|
|||
|
if(viewportal.myGameObject.activeInHierarchy){
|
|||
|
viewportal.Render (ourCamera);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
}
|