private void Awake()
 {
     // Try to set as main pixel camera
     if (main == null)
     {
         main = this;
     }
 }
Example #2
0
    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();
        }
    }