private void OnEnable()
        {
            targetScript = (IL3DN_ColorManagerEffects)target;
            if (targetScript.materials.Count > 0)
            {
                loaded = true;
            }

            IL3DN_EffectsLabel = AssetDatabase.LoadAssetAtPath <Texture2D>("Assets/IL3DN/EditorImages/IL3DN_Label_CM_Effects.png");
        }
 private void OnEnable()
 {
     UnityEditorInternal.ComponentUtility.MoveComponentUp((IL3DN_ColorController)target);
     targetScript   = (IL3DN_ColorController)target;
     effectsScript  = targetScript.GetComponent <IL3DN_ColorManagerEffects>();
     texturesScript = targetScript.GetComponent <IL3DN_ColorManagerTextures>();
     if (texturesScript)
     {
         if (texturesScript.materials.Count > 0)
         {
             targetScript.slot = texturesScript.materials[0].selectedProperty + 1;
         }
     }
     if (effectsScript)
     {
         if (effectsScript.materials.Count > 0)
         {
             targetScript.slot = effectsScript.materials[0].selectedProperty + 1;
         }
     }
 }