Skip to content

Project settings UI#23

Merged
mark-beiline merged 2 commits into
devfrom
mark/project-settings-ui
Apr 4, 2023
Merged

Project settings UI#23
mark-beiline merged 2 commits into
devfrom
mark/project-settings-ui

Conversation

@mark-beiline
Copy link
Copy Markdown
Collaborator

image

DisguiseRenderStreamSettingsEditor.cs is shared for both the the Inspector and Project Settings windows. The uxml and uss files are assigned as default references in DisguiseRenderStreamSettingsEditor.cs.meta.

The DisguiseRenderStreamSettingsProvider.cs code is copied from Cluster Display with minor changes.

Also added a few missing .meta files from the last 2 PRs.

@@ -0,0 +1,4 @@
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements">
<uie:PropertyField label="Scene Control" binding-path="sceneControl" />
Copy link
Copy Markdown
Owner

@wenzhang-unity wenzhang-unity Apr 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: In code, I've started using L10.Tr() for strings, because this was the recommendation I got on the UIToolkit slack. Unfortunately, they don't have a good answer for strings in UXML. Figures 😞

static SettingsProvider CreateSettingsProvider() =>
new (k_SettingsPath, SettingsScope.Project)
{
label = Contents.SettingsName,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Food for thoughts: I noticed that when the Cluster Display package looks like is present settings looks like this:
image

I wonder, is it what we want? Because there are a lot of settings in there that are not for Disguise RenderStream and could potentially confuse the user (and cause trouble if wrongly configured). In fact, when Cluster Display is working with Disguise I'd be tempted to have the following settings:
Disguise RenderStream:

  • Scene Control
  • Unity Debug Window Presenter
  • Cluster Synchronization (as a "sub section", like Cluster Render and Mission Control is to Cluster Display)
    • Multicast Address
    • Port
    • Handhsake Timeout
    • Communication Timeout
    • Adapter Name

But I guess this cannot be achieved only in this package, we also need a way for the ClusterDisplay package to stop providing its own settings when "requested" (or maybe we simply want to hardcode checking for the DisguiseRenderStream package)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few thoughts:

  1. Importing the Cluster Graphics package is a mistake for RenderStream projects (the "Cluster Rendering" section should not be present)
  2. I don't like the idea of hardcoding a check for the presence of DisguiseRenderStream in the Cluster Display logic. We can provide a link in the Disguise RenderStream settings page to the Cluster Display settings. Or we can expose some of the Cluster Display fields in the RenderStream settings, but this might add confusion.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oups, my bad.

Yeah, I must admit I'm not a big fan of Cluster Display knowing about Disguise RenderStream package either. What about Cluster Display only adds its setting pages if Cluster Graphics package is present? Not perfect but "less worst"?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's interesting. I rather like the idea of making Cluster Display (core) a "hidden" dependency of other packages (e.g. Graphics, RenderStream), kind of similar to Core SRP. Let's take a look at how Core SRP settings are exposed for inspiration.

@mark-beiline mark-beiline merged commit 0f601af into dev Apr 4, 2023
@mark-beiline mark-beiline deleted the mark/project-settings-ui branch April 4, 2023 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants