private void Awake() { // Try to set as main pixel camera if (main == null) { main = this; } }
public override void OnInspectorGUI() { PixelatedCamera pc = (PixelatedCamera)target; // When the inspector is drawn (or any values are changed) re-initialize the render texture if (DrawDefaultInspector() || pc.CheckScreenResize()) { pc.Init(); } }