/// <summary>
 /// Initializes a new instance of the <see cref="EditorGameServiceSettingsProvider"/> class.
 /// </summary>
 /// <param name="path">
 /// The path to the settings.
 /// You SHOULD use <see cref="GenerateProjectSettingsPath"/> to provide it.
 /// </param>
 /// <param name="scopes">
 /// The scope of the provided settings.
 /// </param>
 /// <param name="keywords">
 /// Set of keywords for search purposes.
 /// </param>
 protected EditorGameServiceSettingsProvider(string path, SettingsScope scopes, IEnumerable <string> keywords = null)
     : base(path, scopes, keywords)
 {
     m_ProjectStateRequest = new ProjectStateRequest();
     activateHandler       = (searchContext, rootElement) => {
         m_ParentVisualElement = GenerateParentElement();
         rootElement.Add(m_ParentVisualElement);
         RefreshUI();
     };
     deactivateHandler = () => {};
 }
 internal EditorGameServiceSettingsProvider(string path, SettingsScope scopes, IProjectEditorDrawerFactory projectBindDrawer,
                                            IProjectEditorDrawerFactory projectCoppaDrawer, IProjectStateRequest projectStateRequest = null, IUserRoleHandler userRoleHandler = null, IEnumerable <string> keywords = null)
     : base(path, scopes, keywords)
 {
     m_ProjectStateRequest      = projectStateRequest ?? new ProjectStateRequest();
     m_CurrentProjectState      = m_ProjectStateRequest.GetProjectState();
     m_ProjectBindDrawerFactory = projectBindDrawer;
     m_CoppaDrawerFactory       = projectCoppaDrawer;
     m_UserRoleHandler          = userRoleHandler ?? EditorGameServiceRegistry.Instance.UserRoleHandler;
     activateHandler            = ActivateSettingsProvider;
     deactivateHandler          = DeactivateSettingsProvider;
 }
Пример #3
0
 /// <summary>
 /// Default constructor for the registry.
 /// </summary>
 internal EditorGameServiceRegistry(IProjectStateRequest projectStateRequest = null,
                                    IProjectStateHelper projectStateHelper   = null,
                                    IServiceFlagRequest serviceFlagRequest   = null,
                                    UserRoleHandler userRoleHandler          = null)
 {
     Services = new Dictionary <string, IEditorGameService>();
     m_ProjectStateRequest = projectStateRequest;
     m_CachedProjectState  = m_ProjectStateRequest?.GetProjectState();
     m_ProjectStateHelper  = projectStateHelper;
     m_ServiceFlagRequest  = serviceFlagRequest;
     m_UserRoleHandler     = userRoleHandler;
 }