예제 #1
0
        public virtual IEnvironment Initialize(
            string projectPath,
            string extensionInstallPath,
            string unityVersion = null,
            string EditorApplication_applicationPath         = default,
            string EditorApplication_applicationContentsPath = default
            )
        {
            UserCachePath.EnsureDirectoryExists();
            SystemCachePath.EnsureDirectoryExists();
            LogPath.EnsureDirectoryExists();

            UnityProjectPath     = projectPath.ToSPath();
            ExtensionInstallPath = extensionInstallPath.ToSPath();
            UnityVersion         = unityVersion;
            if (!string.IsNullOrEmpty(EditorApplication_applicationPath))
            {
                UnityApplication = EditorApplication_applicationPath.ToSPath();
            }
            if (!string.IsNullOrEmpty(EditorApplication_applicationContentsPath))
            {
                UnityApplicationContents = EditorApplication_applicationContentsPath.ToSPath();
            }

            UserSettings   = new UserSettings(this);
            LocalSettings  = new LocalSettings(this);
            SystemSettings = new SystemSettings(this);

            return(this);
        }