public void Dispose() { if (tex != null) { tex.Dispose(); tex = null; } }
public LODRenderTexture(FormatRT format) { tex = new ResizableRenderTexture(format); tex.AfterCreateTexture += t => NotifyAfterCreateTexture(); tex.BeforeDestroyTexture += t => NotifyBeforeDestroyTexture(); validator.Validation += () => { tex.Size = LodSize; }; }