コード例 #1
0
        // Streaming Events
        public void OpenProject(Project project)
        {
            if (m_AuthClient == null)
            {
                Debug.LogError("Unable to open project without a Authentication Client.");
                return;
            }

            if (m_SelectedProject != null)
            {
                Debug.LogError("Only one project can be opened at a time.");
                return;
            }

            m_SelectedProject = project;

            m_Client = new ReflectClient(this, m_AuthClient.user, m_AuthClient.storage, m_SelectedProject);
            m_Client.manifestUpdated += OnManifestUpdated;
            m_IsManifestDirty         = false;

            m_ReflectPipeline.InitializeAndRefreshPipeline(m_Client);

            // TODO : SaveProjectData(project) saves "project.data" for the offline project.
            // Maybe we need to move/remove this code depends on the design.
            // "project.data" file is using to get "Offline Project List" and "Enable Delete Button" in the project option dialog now
            var storage = new PlayerStorage();

            storage.SetEnvironment(ProjectServer.ProjectDataPath, true, false);
            storage.SaveProjectData(project);
        }
コード例 #2
0
        public void SetUser(UnityUser user)
        {
            if (user == null || string.IsNullOrEmpty(user.UserId))
            {
                Debug.LogError("Invalid User");
            }

            // Storage
            var storage = new PlayerStorage();

            storage.SetEnvironment(ProjectServer.ProjectDataPath, true, false);

            // Client
            m_AuthClient = new AuthClient(user, storage);

            ReflectPipelineFactory.SetUser(user, this, m_AuthClient, storage);
        }
コード例 #3
0
#pragma warning restore CS0649

        public void Awake()
        {
            m_PlayerStorage.SetEnvironment(UnityEngine.Reflect.ProjectServer.ProjectDataPath, true, false);
        }