private void ConfigureTargetTexture(int width, int height)
{
bool flag = false;
if ((this.m_TargetTexture != null) && (this.m_CurrentColorSpace != QualitySettings.activeColorSpace))
{
Object.DestroyImmediate(this.m_TargetTexture);
}
if (this.m_TargetTexture == null)
{
this.m_CurrentColorSpace = QualitySettings.activeColorSpace;
this.m_TargetTexture = new RenderTexture(0, 0, 0x18, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Default);
this.m_TargetTexture.name = "GameView RT";
this.m_TargetTexture.filterMode = FilterMode.Point;
this.m_TargetTexture.hideFlags = HideFlags.HideAndDontSave;
}
int num = Mathf.Max(1, QualitySettings.antiAliasing);
if (((this.m_TargetTexture.width != width) || (this.m_TargetTexture.height != height)) || (this.m_TargetTexture.antiAliasing != num))
{
this.m_TargetTexture.Release();
this.m_TargetTexture.width = width;
this.m_TargetTexture.height = height;
this.m_TargetTexture.antiAliasing = num;
flag = true;
if (this.m_TargetClamped)
{
object[] args = new object[] { width, height };
Debug.LogWarningFormat("GameView reduced to a reasonable size for this system ({0}x{1})", args);
}
}
this.m_TargetTexture.Create();
if (flag)
{
this.ClearTargetTexture();
}
}