Esempio n. 1
0
    private static void EditProfile(int index)
    {
        if (!DevProfiles.ExistDevIndex(index))
        {
            Debug.LogWarningFormat("Profile {0} is empty!", index);
            return;
        }

        string path = EditorUtility.OpenFolderPanel("Select GTA instalation Path", DevProfiles.GetPathFromProfileAt(index), "");

        DevProfiles.EditPath(index, path);
        DevProfiles.SaveChanges();
    }
Esempio n. 2
0
    private static void SwitchTo(int index)
    {
        if (!DevProfiles.ExistDevIndex(index))
        {
            Debug.LogWarningFormat("Profile {0} is empty!", index);
            menus[index].PerformAction(false, false);
            return;
        }

        // Disable everything and then re-enable
        menus.ForEach(x => x.Value.PerformAction(false, false));
        menus[index].PerformAction(true, false);

        JObject obj = DevProfiles.obj;

        DevProfiles.SetDevActiveIndex(ref obj, index);
        DevProfiles.SaveChanges(obj);
    }
Esempio n. 3
0
 static DevIdManager()
 {
     DevProfiles.CheckDevProfiles(() => EditorUtility.OpenFolderPanel("Select GTA instalation Path", "", ""));
 }
Esempio n. 4
0
 private static void AddWorkstation()
 {
     DevProfiles.AddNewPath(EditorUtility.OpenFolderPanel("Select GTA instalation Path", Path.GetDirectoryName(DevProfiles.LastDevProfilePath), ""));
     DevProfiles.SaveChanges();
 }