Version: 2020.2
LanguageEnglish
  • C#

ImageConversion.EnableLegacyPngGammaRuntimeLoadBehavior

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public static bool EnableLegacyPngGammaRuntimeLoadBehavior;

Description

Enables legacy PNG runtime import behavior.

In previous versions of Unity, texture data from all PNG textures containing a gAMA block was returned in gamma 2.0 space. If you want to retain this old behavior, for example when working with older projects that dynamically load textures using ImageConversion.LoadImage or Texture2D.Texture2D, set this flag to true.