예제 #1
0
        internal static string ReferenceManualUrl()
        {
            if (!s_PreferencesLoaded)
            {
                LoadPreferences();
            }

            switch (s_DocumentationSource)
            {
            case DocumentationSource.Local:
                return(new Uri(
                           Path.Combine(Path.Combine(s_DocumentationPath, VersionInfo.version), "index.html")).AbsoluteUri);

            default:
                return(CameraShakeEditorHelpers.ReferenceManualUrl());
            }
        }
예제 #2
0
        internal static string ComponentUrl(Type type)
        {
            if (!s_PreferencesLoaded)
            {
                LoadPreferences();
            }

            switch (s_DocumentationSource)
            {
            case DocumentationSource.Local:
                return(new Uri(
                           Path.Combine(Path.Combine(s_DocumentationPath, VersionInfo.version),
                                        CameraShakeEditorHelpers.ComponentUrl(type, false))).AbsoluteUri);

            default:
                return(CameraShakeEditorHelpers.ComponentUrl(type));
            }
        }
예제 #3
0
        internal static void DownloadDocumentation(bool fromFirstRunWindow = false)
        {
            if (fromFirstRunWindow)
            {
                s_DownloadEveryUpdate = true;
                s_DocumentationSource = DocumentationSource.Local;
                EditorPrefs.SetInt("Thinksquirrel.CShakeEditor.DocumentationSource", (int)s_DocumentationSource);
                EditorPrefs.SetString("Thinksquirrel.CShakeEditor.DocumentationPath", s_DocumentationPath);
                EditorPrefs.SetBool("Thinksquirrel.CShakeEditor.DownloadDocsEveryUpdate", s_DownloadEveryUpdate);
            }

            s_ShowProgress            = true;
            s_FinishedInstall         = false;
            s_Progress                = "Downloading documentation...\n";
            s_ProgressColor           = Color.white;
            s_Www                     = new WWW(CameraShakeEditorHelpers.ArchiveUrl());
            s_Canceled                = false;
            EditorApplication.update += UpdateProgress;
            EditorApplication.update += UpdateProgressBar;
        }