Ejemplo n.º 1
0
    void OnEnable()
    {
        currentModules    = new List <AutoSyncModule>();
        serializedModules = new List <Editor>();

        clips = new List <AudioClip>();

        autoSyncModuleTypes = AutoSyncUtility.GetModuleTypes();
        presets             = AutoSyncUtility.GetPresets();

        moduleInfos = new Dictionary <Type, AutoSyncModuleInfoAttribute>();
        for (int i = 0; i < autoSyncModuleTypes.Count; i++)
        {
            moduleInfos.Add(autoSyncModuleTypes[i], AutoSyncUtility.GetModuleInfo(autoSyncModuleTypes[i]));
        }

        infoIcon = EditorGUIUtility.FindTexture("console.infoicon.sml");

        if (EditorGUIUtility.isProSkin)
        {
            upIcon    = (Texture2D)EditorGUIUtility.Load("Rogo Digital/LipSync/Dark/up.png");
            downIcon  = (Texture2D)EditorGUIUtility.Load("Rogo Digital/LipSync/Dark/down.png");
            plusIcon  = (Texture2D)EditorGUIUtility.Load("Rogo Digital/LipSync/Dark/plus.png");
            minusIcon = (Texture2D)EditorGUIUtility.Load("Rogo Digital/LipSync/Dark/minus.png");
            saveIcon  = (Texture2D)EditorGUIUtility.Load("Rogo Digital/LipSync/Dark/save.png");
        }
        else
        {
            upIcon    = (Texture2D)EditorGUIUtility.Load("Rogo Digital/LipSync/Light/up.png");
            downIcon  = (Texture2D)EditorGUIUtility.Load("Rogo Digital/LipSync/Light/down.png");
            plusIcon  = (Texture2D)EditorGUIUtility.Load("Rogo Digital/LipSync/Light/plus.png");
            minusIcon = (Texture2D)EditorGUIUtility.Load("Rogo Digital/LipSync/Light/minus.png");
            saveIcon  = (Texture2D)EditorGUIUtility.Load("Rogo Digital/LipSync/Light/save.png");
        }
    }
        new private void OnEnable()
        {
            base.OnEnable();

            installedModules = AutoSyncUtility.GetModuleTypes();
            moduleInfos      = new List <AutoSyncModuleInfoAttribute>(installedModules.Count);
            settingsObjects  = new List <AutoSyncModuleSettings>(installedModules.Count);
            locked           = false;
            canContinue      = true;

            for (int i = 0; i < installedModules.Count; i++)
            {
                moduleInfos.Add(AutoSyncUtility.GetModuleInfo(installedModules[i]));

                if (moduleInfos[i].moduleSettingsType != null)
                {
                    var settings = (AutoSyncModuleSettings)CreateInstance(moduleInfos[i].moduleSettingsType);
                    settings.InitSetupWizardValues();
                    settingsObjects.Add(settings);
                }
                else
                {
                    settingsObjects.Add(null);
                }

                if (installedModules[i].Name == "ASMontrealPhonemeDetectionModule")
                {
                    mfaFound = true;
                }
            }
        }