FiE-Game/Assets/Scripts/Fie/UI/FieUICameraCapture.cs

26 lines
497 B
C#
Raw Normal View History

2018-11-20 20:10:49 +01:00
using Fie.Manager;
using UnityEngine;
namespace Fie.UI
{
public class FieUICameraCapture : MonoBehaviour
{
private Canvas selfCanvas;
private bool isInitialized;
private void Start()
{
selfCanvas = base.gameObject.GetComponent<Canvas>();
}
private void Update()
{
if (!isInitialized && !(selfCanvas == null) && !(FieManagerBehaviour<FieGUIManager>.I.uiCamera == null))
{
selfCanvas.worldCamera = FieManagerBehaviour<FieGUIManager>.I.uiCamera.camera;
}
}
}
}