Ejemplo n.º 1
0
 public static FSettings GetSettings()
 {
     if (_settings == null)
     {
         _settings = (FSettings)AssetDatabase.LoadAssetAtPath(GetFluxEditorPath() + "FluxSettings.asset", typeof(FSettings));
     }
     return(_settings);
 }
Ejemplo n.º 2
0
        public static void CreateColorSettings()
        {
            string settingsPath = FluxEditor.FUtility.GetFluxEditorPath() + "FluxSettings.asset";

            if (AssetDatabase.LoadMainAssetAtPath(settingsPath) != null)
            {
                if (!EditorUtility.DisplayDialog("Warning", "Flux Settings already exist, are you sure you want to replace them?", "Replace", "Cancel"))
                {
                    return;
                }
            }

            FSettings settings = CreateInstance <FSettings>();

            AssetDatabase.CreateAsset(settings, settingsPath);
        }
Ejemplo n.º 3
0
        protected override void OnHeaderInput(Rect labelRect, Rect iconRect)
        {
            if (Event.current.type == EventType.MouseDown && Event.current.clickCount > 1 && labelRect.Contains(Event.current.mousePosition))
            {
                Selection.activeTransform = Container.Owner;
                Event.current.Use();
            }
            base.OnHeaderInput(labelRect, iconRect);

            if (Event.current.type == EventType.MouseDown && iconRect.Contains(Event.current.mousePosition))
            {
                FSettings         fSettings = FUtility.GetSettings();
                FContainerSetting setting   = fSettings.ContainerType.Find(c => c._type == Container.ConatinerType);
                if (setting == null)
                {
                    ShowAddTrackMenu();
                }
                else
                {
                    ShowAddTrackMenuBaseOnType(setting);
                }
            }
        }
Ejemplo n.º 4
0
 void OnEnable()
 {
     _fluxSettings = (FSettings)target;
     _plusTexture  = FUtility.GetFluxTexture("Plus.png");
     _minusTexture = FUtility.GetFluxTexture("Minus.png");
 }
Ejemplo n.º 5
0
 void OnEnable()
 {
     _fluxSettings = (FSettings)target;
 }