void OnEnable()
        {
            m_FilterMode      = serializedObject.FindProperty("m_EditorData.textureSettings.filterMode");
            m_AnisoLevel      = serializedObject.FindProperty("m_EditorData.textureSettings.anisoLevel");
            m_GenerateMipMaps = serializedObject.FindProperty("m_EditorData.textureSettings.generateMipMaps");
            m_Readable        = serializedObject.FindProperty("m_EditorData.textureSettings.readable");
            m_UseSRGB         = serializedObject.FindProperty("m_EditorData.textureSettings.sRGB");

            m_EnableTightPacking = serializedObject.FindProperty("m_EditorData.packingSettings.enableTightPacking");
            m_EnableRotation     = serializedObject.FindProperty("m_EditorData.packingSettings.enableRotation");
            m_Padding            = serializedObject.FindProperty("m_EditorData.packingSettings.padding");

            m_MasterAtlas   = serializedObject.FindProperty("m_MasterAtlas");
            m_BindAsDefault = serializedObject.FindProperty("m_EditorData.bindAsDefault");
            m_VariantScale  = serializedObject.FindProperty("m_EditorData.variantMultiplier");

            m_Packables    = serializedObject.FindProperty("m_EditorData.packables");
            m_PackableList = new ReorderableList(serializedObject, m_Packables, true, true, true, true);
            m_PackableList.onAddCallback       = AddPackable;
            m_PackableList.onRemoveCallback    = RemovePackable;
            m_PackableList.drawElementCallback = DrawPackableElement;
            m_PackableList.elementHeight       = EditorGUIUtility.singleLineHeight;
            m_PackableList.headerHeight        = 0f;

            SyncPlatformSettings();

            // Initialise texture importer's texture format strings
            TextureImporterInspector.InitializeTextureFormatStrings();

            m_TexturePlatformSettingsView         = new SpriteAtlasInspectorPlatformSettingView(AllTargetsAreMaster());
            m_TexturePlatformSettingTextureHelper = new TexturePlatformSettingsFormatHelper();
            m_TexturePlatformSettingsController   = new TexturePlatformSettingsViewController();
        }
예제 #2
0
 private void OnEnable()
 {
     this.m_MaxTextureSize         = base.serializedObject.FindProperty("m_EditorData.textureSettings.maxTextureSize");
     this.m_TextureCompression     = base.serializedObject.FindProperty("m_EditorData.textureSettings.textureCompression");
     this.m_UseCrunchedCompression = base.serializedObject.FindProperty("m_EditorData.textureSettings.crunchedCompression");
     this.m_CompressionQuality     = base.serializedObject.FindProperty("m_EditorData.textureSettings.compressionQuality");
     this.m_FilterMode             = base.serializedObject.FindProperty("m_EditorData.textureSettings.filterMode");
     this.m_AnisoLevel             = base.serializedObject.FindProperty("m_EditorData.textureSettings.anisoLevel");
     this.m_GenerateMipMaps        = base.serializedObject.FindProperty("m_EditorData.textureSettings.generateMipMaps");
     this.m_Readable                         = base.serializedObject.FindProperty("m_EditorData.textureSettings.readable");
     this.m_UseSRGB                          = base.serializedObject.FindProperty("m_EditorData.textureSettings.sRGB");
     this.m_EnableTightPacking               = base.serializedObject.FindProperty("m_EditorData.packingParameters.enableTightPacking");
     this.m_EnableRotation                   = base.serializedObject.FindProperty("m_EditorData.packingParameters.enableRotation");
     this.m_Padding                          = base.serializedObject.FindProperty("m_EditorData.packingParameters.padding");
     this.m_MasterAtlas                      = base.serializedObject.FindProperty("m_MasterAtlas");
     this.m_BindAsDefault                    = base.serializedObject.FindProperty("m_EditorData.bindAsDefault");
     this.m_VariantMultiplier                = base.serializedObject.FindProperty("m_EditorData.variantMultiplier");
     this.m_Packables                        = base.serializedObject.FindProperty("m_EditorData.packables");
     this.m_PackableList                     = new ReorderableList(base.serializedObject, this.m_Packables, true, true, true, true);
     this.m_PackableList.onAddCallback       = new ReorderableList.AddCallbackDelegate(this.AddPackable);
     this.m_PackableList.onRemoveCallback    = new ReorderableList.RemoveCallbackDelegate(this.RemovePackable);
     this.m_PackableList.drawElementCallback = new ReorderableList.ElementCallbackDelegate(this.DrawPackableElement);
     this.m_PackableList.elementHeight       = EditorGUIUtility.singleLineHeight;
     this.m_PackableList.headerHeight        = 0f;
     this.SyncPlatformSettings();
     TextureImporterInspector.InitializeTextureFormatStrings();
     this.m_TexturePlatformSettingsView         = new SpriteAtlasInspector.SpriteAtlasInspectorPlatformSettingView(this.AllTargetsAreMaster());
     this.m_TexturePlatformSettingTextureHelper = new TexturePlatformSettingsFormatHelper();
     this.m_TexturePlatformSettingsController   = new TexturePlatformSettingsViewController();
 }