Property | Value |
---|---|
Id | UEA0012 |
Category | GC |
Severity | Warning |
using UnityEngine;
class Example : MonoBehaviour
{
void Update()
{
var orthographicSize = Camera.main.orthographicSize;
}
}
using UnityEngine;
class Example : MonoBehaviour
{
Camera cachedCamera;
void Start()
{
cachedCamera = Camera.main;
}
void Update()
{
var orthographicSize = cachedCamera.orthographicSize;
}
}