public virtual void OnEnable()
{
s_DefaultPlatformName = TextureImporter.defaultPlatformName;
this.m_ShowAdvanced = EditorPrefs.GetBool("TextureImporterShowAdvanced", this.m_ShowAdvanced);
this.CacheSerializedProperties();
this.m_ShowBumpGenerationSettings.valueChanged.AddListener(new UnityAction(this.Repaint));
this.m_ShowCubeMapSettings.valueChanged.AddListener(new UnityAction(this.Repaint));
this.m_ShowCubeMapSettings.value = this.m_TextureShape.intValue == 2;
this.m_ShowGenericSpriteSettings.valueChanged.AddListener(new UnityAction(this.Repaint));
this.m_ShowGenericSpriteSettings.value = this.m_SpriteMode.intValue != 0;
this.m_ShowMipMapSettings.valueChanged.AddListener(new UnityAction(this.Repaint));
this.m_ShowMipMapSettings.value = this.m_EnableMipMap.boolValue;
this.InitializeGUI();
TextureImporter target = base.target as TextureImporter;
if (target != null)
{
target.GetWidthAndHeight(ref this.m_TextureWidth, ref this.m_TextureHeight);
this.m_IsPOT = IsPowerOfTwo(this.m_TextureWidth) && IsPowerOfTwo(this.m_TextureHeight);
if (s_TextureFormatStringsApplePVR == null)
{
s_TextureFormatStringsApplePVR = BuildTextureStrings(TextureImportPlatformSettings.kTextureFormatsValueApplePVR);
}
if (s_TextureFormatStringsAndroid == null)
{
s_TextureFormatStringsAndroid = BuildTextureStrings(TextureImportPlatformSettings.kTextureFormatsValueAndroid);
}
if (s_TextureFormatStringsTizen == null)
{
s_TextureFormatStringsTizen = BuildTextureStrings(TextureImportPlatformSettings.kTextureFormatsValueTizen);
}
if (s_TextureFormatStringsSTV == null)
{
s_TextureFormatStringsSTV = BuildTextureStrings(TextureImportPlatformSettings.kTextureFormatsValueSTV);
}
if (s_TextureFormatStringsWebGL == null)
{
s_TextureFormatStringsWebGL = BuildTextureStrings(TextureImportPlatformSettings.kTextureFormatsValueWebGL);
}
if (s_TextureFormatStringsWiiU == null)
{
s_TextureFormatStringsWiiU = BuildTextureStrings(TextureImportPlatformSettings.kTextureFormatsValueWiiU);
}
if (s_TextureFormatStringsDefault == null)
{
s_TextureFormatStringsDefault = BuildTextureStrings(TextureImportPlatformSettings.kTextureFormatsValueDefault);
}
if (s_NormalFormatStringsDefault == null)
{
s_NormalFormatStringsDefault = BuildTextureStrings(TextureImportPlatformSettings.kNormalFormatsValueDefault);
}
if (s_TextureFormatStringsSingleChannel == null)
{
s_TextureFormatStringsSingleChannel = BuildTextureStrings(TextureImportPlatformSettings.kTextureFormatsValueSingleChannel);
}
}
}