浏览代码

Merge pull request #180 from Unity-Technologies/blackboard

Blackboard
/main
GitHub 7 年前
当前提交
927b9dac
共有 64 个文件被更改,包括 2915 次插入49 次删除
  1. 8
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Controls/PropertyControl.cs
  2. 6
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/MaterialGraphEditWindow.cs
  3. 90
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/GraphEditorView.cs
  4. 22
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/MaterialGraphView.cs
  5. 8
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Blackboard.meta
  6. 8
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView.meta
  7. 329
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/Styles/Blackboard.uss
  8. 7
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/Styles/Blackboard.uss.meta
  9. 8
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/UXML.meta
  10. 11
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Blackboard/Blackboard.cs.meta
  11. 11
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Blackboard/BlackboardField.cs.meta
  12. 125
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Blackboard/BlackboardFieldPropertyView.cs
  13. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Blackboard/BlackboardFieldPropertyView.cs.meta
  14. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Blackboard/BlackboardProvider.cs.meta
  15. 65
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Blackboard/BlackboardRow.cs
  16. 11
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Blackboard/BlackboardRow.cs.meta
  17. 297
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Blackboard/BlackboardSection.cs
  18. 11
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Blackboard/BlackboardSection.cs.meta
  19. 168
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Blackboard/BlackboardField.cs
  20. 133
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Blackboard/Blackboard.cs
  21. 128
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Blackboard/BlackboardProvider.cs
  22. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes.meta
  23. 6
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/BlackboardFieldExposed.png
  24. 83
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/BlackboardFieldExposed.png.meta
  25. 8
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/BlackboardFieldPillBackground.png
  26. 83
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/BlackboardFieldPillBackground.png.meta
  27. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronDown.png
  28. 105
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronDown.png.meta
  29. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronDown@2x.png
  30. 99
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronDown@2x.png.meta
  31. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronLeft.png
  32. 99
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronLeft.png.meta
  33. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronLeft@2x.png
  34. 99
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronLeft@2x.png.meta
  35. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronRight.png
  36. 99
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronRight.png.meta
  37. 5
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronRight@2x.png
  38. 99
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronRight@2x.png.meta
  39. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronUp.png
  40. 105
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronUp.png.meta
  41. 5
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronUp@2x.png
  42. 99
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronUp@2x.png.meta
  43. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/PreviewCollapse.png
  44. 105
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/PreviewCollapse.png.meta
  45. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/PreviewCollapse@2x.png
  46. 99
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/PreviewCollapse@2x.png.meta
  47. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/PreviewExpand.png
  48. 99
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/PreviewExpand.png.meta
  49. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/PreviewExpand@2x.png
  50. 99
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/PreviewExpand@2x.png.meta
  51. 8
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/UXML/GraphView.meta
  52. 12
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/UXML/GraphView/Blackboard.uxml
  53. 7
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/UXML/GraphView/Blackboard.uxml.meta
  54. 12
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/UXML/GraphView/BlackboardField.uxml
  55. 7
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/UXML/GraphView/BlackboardField.uxml.meta
  56. 13
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/UXML/GraphView/BlackboardRow.uxml
  57. 7
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/UXML/GraphView/BlackboardRow.uxml.meta
  58. 7
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/UXML/GraphView/BlackboardSection.uxml
  59. 7
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/UXML/GraphView/BlackboardSection.uxml.meta

8
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Controls/PropertyControl.cs


using System;
using System.Linq;
using System.Reflection;
using UnityEditor.Graphing;
using UnityEngine.Experimental.UIElements;
using UnityEditor.ShaderGraph;

}
}
public class PropertyControlView : VisualElement
public class PropertyControlView : VisualElement, INodeModificationListener
{
PropertyNode m_Node;

m_Node.propertyGuid = propertiesGUID[value];
}
}
}
public void OnNodeModified(ModificationScope scope)
{
Dirty(ChangeType.Repaint);
}
}
}

6
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/MaterialGraphEditWindow.cs


m_GraphEditorView = value;
if (m_GraphEditorView != null)
{
m_GraphEditorView.onUpdateAssetClick += UpdateAsset;
m_GraphEditorView.onConvertToSubgraphClick += ToSubGraph;
m_GraphEditorView.onShowInProjectClick += PingAsset;
m_GraphEditorView.saveRequested += UpdateAsset;
m_GraphEditorView.convertToSubgraphRequested += ToSubGraph;
m_GraphEditorView.showInProjectRequested += PingAsset;
this.GetRootVisualContainer().Add(graphEditorView);
}
}

90
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/GraphEditorView.cs


[Serializable]
class FloatingWindowsLayout
{
public Rect inspectorLayout;
public Rect blackboardLayout;
GraphInspectorView m_GraphInspectorView;
MasterPreviewView m_MasterPreviewView;
private EditorWindow m_EditorWindow;

SearchWindowProvider m_SearchWindowProvider;
EdgeConnectorListener m_EdgeConnectorListener;
BlackboardProvider m_BlackboardProvider;
FloatingWindowsLayout m_FLoatingWindowsLayout;
FloatingWindowsLayout m_FloatingWindowsLayout;
public Action onUpdateAssetClick
{
get { return m_GraphInspectorView.onUpdateAssetClick; }
set { m_GraphInspectorView.onUpdateAssetClick = value; }
}
public Action saveRequested { get; set; }
public Action onConvertToSubgraphClick
public Action convertToSubgraphRequested
public Action onShowInProjectClick
{
get { return m_GraphInspectorView.onShowInProjectClick; }
set { m_GraphInspectorView.onShowInProjectClick = value; }
}
public Action showInProjectRequested { get; set; }
public MaterialGraphView graphView
{

set { m_PreviewManager = value; }
}
GraphInspectorView inspectorView
{
get { return m_GraphInspectorView; }
}
public GraphEditorView(EditorWindow editorWindow, AbstractMaterialGraph graph, string assetName)
{
m_Graph = graph;

var toolbar = new IMGUIContainer(() =>
{
GUILayout.BeginHorizontal(EditorStyles.toolbar);
if (GUILayout.Button("Save Asset", EditorStyles.toolbarButton))
{
if (saveRequested != null)
saveRequested();
}
GUILayout.Space(6);
if (GUILayout.Button("Show In Project", EditorStyles.toolbarButton))
{
if (showInProjectRequested != null)
showInProjectRequested();
}
GUILayout.FlexibleSpace();
GUILayout.EndHorizontal();
});
Add(toolbar);
m_GraphView.SetupZoom(ContentZoomer.DefaultMinScale, ContentZoomer.DefaultMaxScale);
m_GraphView.SetupZoom(0.05f, ContentZoomer.DefaultMaxScale);
m_GraphView.RegisterCallback<KeyDownEvent>(OnSpaceDown);
m_GraphInspectorView = new GraphInspectorView(assetName, previewManager, graph) { name = "inspector" };
m_GraphView.RegisterCallback<KeyDownEvent>(OnSpaceDown);
m_GraphView.Add(m_GraphInspectorView);
m_BlackboardProvider = new BlackboardProvider(assetName, graph);
m_GraphView.Add(m_BlackboardProvider.blackboard);
m_BlackboardProvider.blackboard.layout = new Rect(new Vector2(10f, 10f), m_BlackboardProvider.blackboard.layout.size);
masterPreviewViewDraggable.OnDragFinished += UpdateSerializedWindowLayout;
masterPreviewResizeBorderFrame.OnResizeFinished += UpdateSerializedWindowLayout;
m_BlackboardProvider.onDragFinished += UpdateSerializedWindowLayout;
m_BlackboardProvider.onResizeFinished += UpdateSerializedWindowLayout;
masterPreviewViewDraggable.OnDragFinished += UpdateSerializedWindowLayout;
masterPreviewResizeBorderFrame.OnResizeFinished += UpdateSerializedWindowLayout;
m_GraphView.graphViewChanged = GraphViewChanged;
m_FloatingWindowsLayoutKey = "UnityEditor.ShaderGraph.FloatingWindowsLayout";

{
m_FLoatingWindowsLayout = JsonUtility.FromJson<FloatingWindowsLayout>(serializedWindowLayout);
m_GraphInspectorView.layout = m_FLoatingWindowsLayout.inspectorLayout;
m_MasterPreviewView.layout = m_FLoatingWindowsLayout.previewLayout;
m_FloatingWindowsLayout = JsonUtility.FromJson<FloatingWindowsLayout>(serializedWindowLayout);
m_MasterPreviewView.layout = m_FloatingWindowsLayout.previewLayout;
if (m_FloatingWindowsLayout.blackboardLayout.width > 0)
m_BlackboardProvider.blackboard.layout = m_FloatingWindowsLayout.blackboardLayout;
m_FLoatingWindowsLayout = new FloatingWindowsLayout();
m_FloatingWindowsLayout = new FloatingWindowsLayout();
}
}

void OnSpaceDown(KeyDownEvent evt)
{
if( evt.keyCode == KeyCode.Space)
if(evt.keyCode == KeyCode.Space && !evt.shiftKey && !evt.altKey && !evt.ctrlKey && !evt.commandKey)
{
if (graphView.nodeCreationRequest == null)
return;

{
previewManager.HandleGraphChanges();
previewManager.RenderPreviews();
inspectorView.HandleGraphChanges();
m_BlackboardProvider.HandleGraphChanges();
foreach (var node in m_Graph.removedNodes)
{

void UpdateSerializedWindowLayout()
{
m_FLoatingWindowsLayout.inspectorLayout = m_GraphInspectorView.layout;
m_FLoatingWindowsLayout.previewLayout = m_MasterPreviewView.layout;
m_FloatingWindowsLayout.previewLayout = m_MasterPreviewView.layout;
m_FloatingWindowsLayout.blackboardLayout = m_BlackboardProvider.blackboard.layout;
string serializedWindowLayout = JsonUtility.ToJson(m_FLoatingWindowsLayout);
string serializedWindowLayout = JsonUtility.ToJson(m_FloatingWindowsLayout);
onUpdateAssetClick = null;
onConvertToSubgraphClick = null;
onShowInProjectClick = null;
saveRequested = null;
convertToSubgraphRequested = null;
showInProjectRequested = null;
if (m_GraphView != null)
{
foreach (var node in m_GraphView.Children().OfType<MaterialNodeView>())

if (m_GraphInspectorView != null) m_GraphInspectorView.Dispose();
if (previewManager != null)
{
previewManager.Dispose();

22
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/MaterialGraphView.cs


public override void BuildContextualMenu(ContextualMenuPopulateEvent evt)
{
base.BuildContextualMenu(evt);
evt.menu.AppendAction("Convert To Sub-graph", ConvertToSubgraph, ConvertToSubgraphStatus);
evt.menu.AppendAction("Convert To Inline Node", ConvertToInlineNode, ConvertToInlineNodeStatus);
evt.menu.AppendAction("Convert To Property", ConvertToProperty, ConvertToPropertyStatus);
if (evt.target is GraphView || evt.target is Node)
{
evt.menu.AppendAction("Convert To Sub-graph", ConvertToSubgraph, ConvertToSubgraphStatus);
evt.menu.AppendAction("Convert To Inline Node", ConvertToInlineNode, ConvertToInlineNodeStatus);
evt.menu.AppendAction("Convert To Property", ConvertToProperty, ConvertToPropertyStatus);
}
else if (evt.target is BlackboardField)
{
evt.menu.AppendAction("Delete", (e) => DeleteSelectionImplementation("Delete", AskUser.DontAskUser), (e) => canDeleteSelection ? ContextualMenu.MenuAction.StatusFlags.Normal : ContextualMenu.MenuAction.StatusFlags.Disabled);
}
}
ContextualMenu.MenuAction.StatusFlags ConvertToPropertyStatus(EventBase eventBase)

{
graph.owner.RegisterCompleteObjectUndo(operationName);
graph.RemoveElements(selection.OfType<MaterialNodeView>().Select(x => (INode)x.node), selection.OfType<Edge>().Select(x => x.userData).OfType<IEdge>());
foreach (var selectable in selection)
{
var field = selectable as BlackboardField;
if (field != null && field.userData != null)
{
var property = (IShaderProperty)field.userData;
graph.RemoveShaderProperty(property.guid);
}
}
}
}

8
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Blackboard.meta


fileFormatVersion: 2
guid: 465f456071d65c648a34adddf33057f7
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView.meta


fileFormatVersion: 2
guid: 80f811e405d64564b1c671c9813ea9a9
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

329
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/Styles/Blackboard.uss


.sgblackboard {
position-type:absolute;
border-left-width: 1;
border-top-width: 1;
border-right-width: 1;
border-bottom-width: 1;
border-radius: 5;
flex-direction: column;
background-color: #2b2b2b;
border-color: #191919;
min-width: 100;
min-height: 100;
}
.sgblackboard * {
font-size: 12;
}
.sgblackboard.scrollable {
position-type: manual;
}
.sgblackboard.selected {
border-color: #44C0FF;
}
.sgblackboard > .mainContainer {
flex-direction: column;
align-items: stretch;
}
.sgblackboard.scrollable > .mainContainer {
position-type: absolute;
position-top:0;
position-left:0;
position-right:0;
position-bottom:0;
}
.sgblackboard > .mainContainer > #content {
flex-direction: column;
align-items: stretch;
}
.sgblackboard.scrollable > .mainContainer > #content {
position-type: absolute;
position-top:0;
position-left:0;
position-right:0;
position-bottom:0;
flex-direction: column;
align-items: stretch;
}
.sgblackboard > .mainContainer > #content > ScrollView {
flex: 1;
}
.sgblackboard > .mainContainer > #content > ScrollView #ContentView {
position-left:0;
position-right:0;
}
.sgblackboard > .mainContainer > #content > #contentContainer {
min-height: 50;
padding-left: 0;
padding-top: 0;
padding-right: 0;
padding-bottom: 6;
flex-direction: column;
align-items: stretch;
}
.sgblackboard > .mainContainer > #content > #header {
flex-direction: row;
align-items: stretch;
background-color: #393939;
border-bottom-width: 1;
border-color: #212121;
border-top-right-radius: 4;
border-top-left-radius: 4;
padding-left: 1;
padding-top: 4;
padding-bottom: 2;
}
.sgblackboard > .mainContainer > #content > #header > #labelContainer {
flex: 1;
flex-direction: column;
align-items: stretch;
}
.sgblackboard > .mainContainer > #content > #header > #addButton {
align-self:center;
font-size: 20px;
background-image: none;
padding-left: 0;
padding-top: 0;
padding-right: 0;
padding-bottom: 0;
}
.sgblackboard > .mainContainer > #content > #header > #addButton:hover {
background-image: resource("Builtin Skins/DarkSkin/Images/btn.png");
}
.sgblackboard > .mainContainer > #content > #header > #addButton:hover:active {
background-image: resource("Builtin Skins/DarkSkin/Images/btn act.png");
}
.sgblackboard > .mainContainer > #content > #header > #labelContainer > #titleLabel {
font-size : 14;
text-color: #c1c1c1;
}
.sgblackboard > .mainContainer > #content > #header > #labelContainer > #subTitleLabel {
font-size: 11;
text-color: #606060;
}
.sgblackboardSection {
padding-left: 0;
padding-right: 0;
padding-bottom: 0;
padding-top: 0;
}
.sgblackboardSection > .mainContainer > #sectionHeader {
flex-direction: row;
align-items: stretch;
}
.sgblackboardSection > .mainContainer > #sectionHeader > #sectionTitleLabel {
text-color: #606060;
font-size: 11;
}
.sgblackboardSection > #dragIndicator {
background-color: #44C0FF;
min-height: 2;
}
.sgblackboardRow {
padding-left: 4;
padding-right: 8;
}
.sgblackboardRow > .mainContainer > #root > #itemRow {
flex-direction: row;
}
.sgblackboardRow > .mainContainer > #root > #itemRow > #itemRowContentContainer {
flex: 1;
align-items: stretch;
}
.sgblackboardRow > .mainContainer > #root > #itemRow > #itemRowContentContainer > #itemContainer {
flex-direction: row;
align-items: stretch;
}
.sgblackboardRow > .mainContainer > #root > #itemRow > #expandButton {
align-self: center;
background-image: none;
border-left: 0;
border-top: 0;
border-right: 0;
border-bottom: 0;
margin-left: 0;
margin-top: 0;
margin-right: 0;
margin-bottom: 0;
padding-left: 0;
padding-top: 0;
padding-right: 0;
padding-bottom: 0;
}
.sgblackboardRow > .mainContainer > #root > #itemRow > #expandButton > #buttonImage {
image : resource("GraphView/Nodes/NodeChevronRight");
width: 12;
height: 12;
}
.sgblackboardRow.expanded > .mainContainer > #root > #itemRow > #expandButton > #buttonImage {
image : resource("GraphView/Nodes/NodeChevronDown");
}
.sgblackboardRow > .mainContainer > #root > #itemRow > #expandButton:hover > #buttonImage {
background-color: #212121;
border-radius: 1;
}
.sgblackboardRow > .mainContainer > #root > #propertyViewContainer {
}
.sgblackboardField {
flex: 1;
flex-direction: row;
align-items: stretch;
}
.sgblackboardField > .mainContainer {
flex: 1;
flex-direction: row;
align-items: stretch;
}
.sgblackboardField > .mainContainer > #contentItem {
flex: 1;
flex-direction: row;
align-items: stretch;
}
.sgblackboardField > .mainContainer > #textField {
position-type: absolute;
position-top:0;
position-left:0;
position-right:0;
position-bottom:0;
text-alignment:middle-left;
font-size:11;
}
.sgblackboardField > .mainContainer > #contentItem > #typeLabel {
flex: 1;
flex: 1;
text-align: right;
text-alignment:middle-right;
text-color: #808080;
font-size:11;
}
.sgblackboardField > .mainContainer > #contentItem > #pill {
flex-direction: row;
align-items: stretch;
background-color: #252525;
border-radius:40;
border-color: #272727;
padding-left: 8;
padding-top: 3;
padding-bottom: 3;
padding-right: 8;
border-bottom-width: 1;
margin-left: 4;
margin-top: 2;
margin-bottom: 2;
}
.sgblackboardField:hover > .mainContainer > #contentItem > #pill {
border-color: rgba(68, 192, 255, 0.5);
border-left-width: 1;
border-top-width: 1;
border-right-width: 1;
border-bottom-width: 1;
padding-left: 7;
padding-top: 2;
padding-bottom: 3;
padding-right: 7;
}
.sgblackboardField.selected > .mainContainer > #contentItem > #pill {
border-color: #44C0FF;
border-left-width: 2;
border-top-width: 2;
border-right-width: 2;
border-bottom-width: 2;
padding-left: 6;
padding-top: 1;
padding-bottom: 2;
padding-right: 7;
}
.sgblackboardField > .mainContainer > #contentItem > #pill > #borderItem {
position-type: absolute;
position-top: 0;
position-left: 1;
position-right: 1;
position-bottom: 1;
border-radius: 40;
background-color: #606061;
border-color: #252525;
border-left-width: 1;
border-top-width: 1;
border-right-width: 1;
border-bottom-width: 1;
}
.sgblackboardField > .mainContainer > #contentItem > #pill > #backgroundItem {
position-type: absolute;
position-top:2;
position-left: 1;
position-right: 1;
position-bottom: 1;
border-radius: 40;
background-image: resource("GraphView/Nodes/BlackboardFieldPillBackground");
}
.sgblackboardField > .mainContainer > #contentItem > #pill > #iconItem {
align-self: center;
width: 6;
height: 6;
}
.sgblackboardField.noIcon > .mainContainer > #contentItem > #pill > #iconItem {
width: 0;
height: 0;
}
.sgblackboardField > .mainContainer > #contentItem > #pill > #textLabel {
font-size: 11;
}
.sgblackboardFieldPropertyView > .rowView {
flex-direction: row;
padding-left: 10;
padding-right: 2;
padding-top: 2;
padding-bottom: 2;
}
.sgblackboardFieldPropertyView > .rowView > .rowViewLabel {
min-width: 50;
font-size: 11;
}
.sgblackboardFieldPropertyView > .rowView > .rowViewControl {
flex: 1;
}

7
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/Styles/Blackboard.uss.meta


fileFormatVersion: 2
guid: 4f42f44b7f2b460c8df9259abc33d3cf
ScriptedImporter:
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0}

8
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/UXML.meta


fileFormatVersion: 2
guid: e14441797a82fb84fb4e43064342bcb5
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

11
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Blackboard/Blackboard.cs.meta


fileFormatVersion: 2
guid: 4312a96008ca8754593210fc93a4575d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

11
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Blackboard/BlackboardField.cs.meta


fileFormatVersion: 2
guid: 353b195797b2ff24092e20c643077f2f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

125
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Blackboard/BlackboardFieldPropertyView.cs


using System;
using UnityEditor.Experimental.UIElements;
using UnityEditor.Graphing;
using UnityEngine;
using UnityEngine.Experimental.UIElements;
namespace UnityEditor.ShaderGraph.Drawing
{
class BlackboardFieldPropertyView : VisualElement
{
readonly AbstractMaterialGraph m_Graph;
public BlackboardFieldPropertyView(AbstractMaterialGraph graph, IShaderProperty property)
{
m_Graph = graph;
if (property is FloatShaderProperty)
{
var floatProperty = (FloatShaderProperty)property;
var field = new FloatField { value = floatProperty.value };
field.OnValueChanged(evt =>
{
floatProperty.value = (float)evt.newValue;
DirtyNodes();
});
AddRow("Default", field);
}
else if (property is Vector2ShaderProperty)
{
var vectorProperty = (Vector2ShaderProperty)property;
var field = new Vector2Field { value = vectorProperty.value };
field.OnValueChanged(evt =>
{
vectorProperty.value = evt.newValue;
DirtyNodes();
});
AddRow("Default", field);
}
else if (property is Vector3ShaderProperty)
{
var vectorProperty = (Vector3ShaderProperty)property;
var field = new Vector3Field { value = vectorProperty.value };
field.OnValueChanged(evt =>
{
vectorProperty.value = evt.newValue;
DirtyNodes();
});
AddRow("Default", field);
}
else if (property is Vector4ShaderProperty)
{
var vectorProperty = (Vector4ShaderProperty)property;
var field = new Vector4Field { value = vectorProperty.value };
field.OnValueChanged(evt =>
{
vectorProperty.value = evt.newValue;
DirtyNodes();
});
AddRow("Default", field);
}
else if (property is ColorShaderProperty)
{
var colorProperty = (ColorShaderProperty)property;
var field = new ColorField { value = property.defaultValue, hdr = colorProperty.HDR };
field.OnValueChanged(evt =>
{
colorProperty.value = evt.newValue;
DirtyNodes();
});
AddRow("Default", field);
}
else if (property is TextureShaderProperty)
{
var textureProperty = (TextureShaderProperty)property;
var field = new ObjectField { value = textureProperty.value.texture, objectType = typeof(Texture) };
field.OnValueChanged(evt =>
{
textureProperty.value.texture = (Texture)evt.newValue;
DirtyNodes();
});
AddRow("Default", field);
}
else if (property is CubemapShaderProperty)
{
var cubemapProperty = (CubemapShaderProperty)property;
var field = new ObjectField { value = cubemapProperty.value.cubemap, objectType = typeof(Cubemap) };
field.OnValueChanged(evt =>
{
cubemapProperty.value.cubemap = (Cubemap)evt.newValue;
DirtyNodes();
});
AddRow("Default", field);
}
// AddRow("Type", new TextField());
// AddRow("Exposed", new Toggle(null));
// AddRow("Range", new Toggle(null));
// AddRow("Default", new TextField());
// AddRow("Tooltip", new TextField());
AddToClassList("sgblackboardFieldPropertyView");
}
void AddRow(string labelText, VisualElement control)
{
VisualElement rowView = new VisualElement();
rowView.AddToClassList("rowView");
Label label = new Label(labelText);
label.AddToClassList("rowViewLabel");
rowView.Add(label);
control.AddToClassList("rowViewControl");
rowView.Add(control);
Add(rowView);
}
void DirtyNodes()
{
foreach (var node in m_Graph.GetNodes<PropertyNode>())
node.Dirty(ModificationScope.Node);
}
}
}

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Blackboard/BlackboardFieldPropertyView.cs.meta


fileFormatVersion: 2
guid: d71f7c86172344198783dacd26515c28
timeCreated: 1516704904

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Blackboard/BlackboardProvider.cs.meta


fileFormatVersion: 2
guid: 4bfb865d7a5e403682e681321336d241
timeCreated: 1516713025

65
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Blackboard/BlackboardRow.cs


using System;
using UnityEditor.Experimental.UIElements.GraphView;
using UnityEngine;
using UnityEngine.Experimental.UIElements;
namespace UnityEditor.ShaderGraph.Drawing
{
class BlackboardRow : GraphElement
{
private VisualElement m_Root;
private Button m_ExpandButton;
private VisualElement m_ItemContainer;
private VisualElement m_PropertyViewContainer;
private bool m_Expanded = true;
public bool expanded
{
get { return m_Expanded; }
set
{
if (m_Expanded == value)
{
return;
}
m_Expanded = value;
if (m_Expanded)
{
m_Root.Add(m_PropertyViewContainer);
AddToClassList("expanded");
}
else
{
m_Root.Remove(m_PropertyViewContainer);
RemoveFromClassList("expanded");
}
}
}
public BlackboardRow(VisualElement item, VisualElement propertyView)
{
var tpl = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>("Assets/UnityShaderEditor/Editor/Resources/UXML/GraphView/BlackboardRow.uxml") as VisualTreeAsset;
VisualElement mainContainer = tpl.CloneTree(null);
mainContainer.AddToClassList("mainContainer");
m_Root = mainContainer.Q<VisualElement>("root");
m_ItemContainer = mainContainer.Q<VisualElement>("itemContainer");
m_PropertyViewContainer = mainContainer.Q<VisualElement>("propertyViewContainer");
m_ExpandButton = mainContainer.Q<Button>("expandButton");
m_ExpandButton.clickable.clicked += () => expanded = !expanded;
Add(mainContainer);
ClearClassList();
AddToClassList("sgblackboardRow");
m_ItemContainer.Add(item);
m_PropertyViewContainer.Add(propertyView);
expanded = false;
}
}
}

11
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Blackboard/BlackboardRow.cs.meta


fileFormatVersion: 2
guid: 7532a1da2f917d54c800efef4149ae69
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

297
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Blackboard/BlackboardSection.cs


using System;
using System.Collections.Generic;
using System.Linq;
using UnityEditor.Experimental.UIElements.GraphView;
using UnityEngine;
using UnityEngine.Experimental.UIElements;
using UnityEngine.Experimental.UIElements.StyleEnums;
namespace UnityEditor.ShaderGraph.Drawing
{
class BlackboardSection : GraphElement, IDropTarget
{
private VisualElement m_DragIndicator;
private VisualElement m_MainContainer;
private VisualElement m_Header;
private Label m_TitleLabel;
private VisualElement m_RowsContainer;
private int m_InsertIndex;
int InsertionIndex(Vector2 pos)
{
int index = -1;
VisualElement owner = contentContainer != null ? contentContainer : this;
Vector2 localPos = this.ChangeCoordinatesTo(owner, pos);
if (owner.ContainsPoint(localPos))
{
index = 0;
foreach (VisualElement child in Children())
{
Rect rect = child.layout;
if (localPos.y > (rect.y + rect.height / 2))
{
++index;
}
else
{
break;
}
}
}
return index;
}
VisualElement FindSectionDirectChild(VisualElement element)
{
VisualElement directChild = element;
while ((directChild != null) && (directChild != this))
{
if (directChild.parent == this)
{
return directChild;
}
directChild = directChild.parent;
}
return null;
}
public BlackboardSection()
{
var tpl = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>("Assets/UnityShaderEditor/Editor/Resources/UXML/GraphView/BlackboardSection.uxml") as VisualTreeAsset;
m_MainContainer = tpl.CloneTree(null);
m_MainContainer.AddToClassList("mainContainer");
m_Header = m_MainContainer.Q<VisualElement>("sectionHeader");
m_TitleLabel = m_MainContainer.Q<Label>("sectionTitleLabel");
m_RowsContainer = m_MainContainer.Q<VisualElement>("rowsContainer");
shadow.Add(m_MainContainer);
m_DragIndicator = new VisualElement();
m_DragIndicator.name = "dragIndicator";
m_DragIndicator.style.positionType = PositionType.Absolute;
shadow.Add(m_DragIndicator);
ClearClassList();
AddToClassList("sgblackboardSection");
m_InsertIndex = -1;
}
public override VisualElement contentContainer { get { return m_RowsContainer; } }
public string title
{
get { return m_TitleLabel.text; }
set { m_TitleLabel.text = value; }
}
public bool headerVisible
{
get { return m_Header.parent != null; }
set
{
if (value == (m_Header.parent != null))
return;
if (value)
{
m_MainContainer.Add(m_Header);
}
else
{
m_MainContainer.Remove(m_Header);
}
}
}
private void SetDragIndicatorVisible(bool visible)
{
if (visible && (m_DragIndicator.parent == null))
{
shadow.Add(m_DragIndicator);
m_DragIndicator.visible = true;
}
else if ((visible == false) && (m_DragIndicator.parent != null))
{
shadow.Remove(m_DragIndicator);
}
}
public bool CanAcceptDrop(List<ISelectable> selection)
{
// Look for at least one selected element in this section to accept drop
foreach (ISelectable selected in selection)
{
VisualElement selectedElement = selected as VisualElement;
if (selected != null && Contains(selectedElement))
{
return true;
}
}
return false;
}
// public bool DragUpdated(DragUpdatedEvent evt, IEnumerable<ISelectable> selection, IDropTarget dropTarget)
public EventPropagation DragUpdated(IMGUIEvent evt, IEnumerable<ISelectable> selection, IDropTarget dropTarget)
{
VisualElement sourceItem = null;
foreach (ISelectable selectedElement in selection)
{
sourceItem = selectedElement as VisualElement;
if (sourceItem == null)
continue;
}
if (!Contains(sourceItem))
{
SetDragIndicatorVisible(false);
return EventPropagation.Continue;
}
var target = evt.target as VisualElement;
// Vector2 localPosition = target.ChangeCoordinatesTo(this, evt.localMousePosition);
Vector2 localPosition = target.ChangeCoordinatesTo(this, evt.imguiEvent.mousePosition);
m_InsertIndex = InsertionIndex(localPosition);
if (m_InsertIndex != -1)
{
float indicatorY = 0;
if (m_InsertIndex == childCount)
{
VisualElement lastChild = this[childCount - 1];
indicatorY = lastChild.ChangeCoordinatesTo(this, new Vector2(0, lastChild.layout.height + lastChild.style.marginBottom)).y;
}
else
{
VisualElement childAtInsertIndex = this[m_InsertIndex];
indicatorY = childAtInsertIndex.ChangeCoordinatesTo(this, new Vector2(0, -childAtInsertIndex.style.marginTop)).y;
}
SetDragIndicatorVisible(true);
m_DragIndicator.layout = new Rect(0, indicatorY - m_DragIndicator.layout.height / 2, layout.width, m_DragIndicator.layout.height);
}
else
{
SetDragIndicatorVisible(false);
m_InsertIndex = -1;
}
return EventPropagation.Stop;
}
int IndexOf(VisualElement element)
{
var index = 0;
foreach (var childElement in Children())
{
if (childElement == element)
return index;
index++;
}
return -1;
}
struct VisualElementPair
{
public VisualElement Item1;
public VisualElement Item2;
public VisualElementPair(VisualElement item1, VisualElement item2)
{
Item1 = item1;
Item2 = item2;
}
}
// public bool DragPerform(DragPerformEvent evt, IEnumerable<ISelectable> selection, IDropTarget dropTarget)
public EventPropagation DragPerform(IMGUIEvent evt, IEnumerable<ISelectable> selection, IDropTarget dropTarget)
{
if (m_InsertIndex != -1)
{
List<VisualElementPair> draggedElements = new List<VisualElementPair>();
foreach (ISelectable selectedElement in selection)
{
var draggedElement = selectedElement as VisualElement;
if (draggedElement != null && Contains(draggedElement))
{
draggedElements.Add(new VisualElementPair(FindSectionDirectChild(draggedElement), draggedElement));
}
}
if (draggedElements.Count == 0)
{
SetDragIndicatorVisible(false);
return EventPropagation.Continue;
}
// Sorts the dragged elements from their relative order in their parent
draggedElements.Sort((pair1, pair2) => { return IndexOf(pair1.Item1).CompareTo(IndexOf(pair2.Item1)); });
int insertIndex = m_InsertIndex;
foreach (var draggedElement in draggedElements)
{
VisualElement sectionDirectChild = draggedElement.Item1;
int indexOfDraggedElement = IndexOf(sectionDirectChild);
if (!((indexOfDraggedElement == insertIndex) || ((insertIndex - 1) == indexOfDraggedElement)))
{
Blackboard blackboard = GetFirstAncestorOfType<Blackboard>();
if (blackboard.moveItemRequested != null)
{
blackboard.moveItemRequested(blackboard, m_InsertIndex, draggedElement.Item2);
}
else
{
if (insertIndex == contentContainer.childCount)
{
sectionDirectChild.BringToFront();
}
else
{
sectionDirectChild.PlaceBehind(this[insertIndex]);
}
}
}
if (insertIndex > indexOfDraggedElement) // No need to increment the insert index for the next dragged element if the current dragged element is above the current insert location.
continue;
insertIndex++;
}
}
SetDragIndicatorVisible(false);
return EventPropagation.Stop;
}
EventPropagation IDropTarget.DragExited()
{
SetDragIndicatorVisible(false);
return EventPropagation.Stop;
}
}
}

11
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Blackboard/BlackboardSection.cs.meta


fileFormatVersion: 2
guid: f7dcab10210c08a488ac46fee4811efd
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

168
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Blackboard/BlackboardField.cs


using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using UnityEditor.Experimental.UIElements.GraphView;
using UnityEngine;
using UnityEngine.Experimental.UIElements;
using Debug = System.Diagnostics.Debug;
namespace UnityEditor.ShaderGraph.Drawing
{
class BlackboardField : GraphElement
{
private VisualElement m_ContentItem;
private Image m_Icon;
private Label m_TextLabel;
private TextField m_TextField;
private Label m_TypeLabel;
private bool m_EditTitleCancelled = false;
SelectionDropper m_SelectionDropper;
public string text
{
get { return m_TextLabel.text; }
set { m_TextLabel.text = value; }
}
public string typeText
{
get { return m_TypeLabel.text; }
set { m_TypeLabel.text = value; }
}
public Texture icon
{
get { return m_Icon.image; }
set
{
m_Icon.image = value;
if (value == null)
{
AddToClassList("noIcon");
m_Icon.visible = false;
}
else
{
RemoveFromClassList("noIcon");
m_Icon.visible = true;
}
}
}
public BlackboardField()
: this(null, "", "") { }
static Type s_ContextualMenuManipulator = AppDomain.CurrentDomain.GetAssemblies().SelectMany(x => x.GetTypes()).FirstOrDefault(t => t.FullName == "UnityEngine.Experimental.UIElements.ContextualMenuManipulator");
public BlackboardField(Texture icon, string text, string typeText)
{
var tpl = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>("Assets/UnityShaderEditor/Editor/Resources/UXML/GraphView/BlackboardField.uxml");
VisualElement mainContainer = tpl.CloneTree(null);
mainContainer.AddToClassList("mainContainer");
mainContainer.pickingMode = PickingMode.Ignore;
m_ContentItem = mainContainer.Q("contentItem");
m_TextLabel = mainContainer.Q<Label>("textLabel");
m_Icon = mainContainer.Q<Image>("iconItem");
m_TypeLabel = mainContainer.Q<Label>("typeLabel");
m_TextField = mainContainer.Q<TextField>("textField");
m_TextField.visible = false;
m_TextField.RegisterCallback<FocusOutEvent>(e => { OnEditTextFinished(); });
m_TextField.RegisterCallback<KeyDownEvent>(OnTextFieldKeyPressed);
Add(mainContainer);
RegisterCallback<MouseDownEvent>(OnMouseDownEvent);
capabilities |= Capabilities.Selectable | Capabilities.Droppable | Capabilities.Deletable;
ClearClassList();
AddToClassList("sgblackboardField");
this.text = text;
this.icon = icon;
this.typeText = typeText;
m_SelectionDropper = new SelectionDropper(Handler);
// Workaround bug causing SelectionDropper to not work (m_Active should be initialized to false rather than true)
var activeFieldInfo = typeof(SelectionDropper).GetFields(BindingFlags.NonPublic | BindingFlags.Instance).FirstOrDefault(f => f.Name == "m_Active");
Debug.Assert(activeFieldInfo != null, "activeFieldInfo != null");
activeFieldInfo.SetValue(m_SelectionDropper, false);
this.AddManipulator(m_SelectionDropper);
var contextualMenuManipulator = (IManipulator)Activator.CreateInstance(s_ContextualMenuManipulator, (Action<ContextualMenuPopulateEvent>)BuildContextualMenu);
this.AddManipulator(contextualMenuManipulator);
}
void BuildContextualMenu(ContextualMenuPopulateEvent evt)
{
evt.menu.AppendAction("Rename", e => RenameGo(), ContextualMenu.MenuAction.AlwaysEnabled);
}
void Handler(IMGUIEvent evt, List<ISelectable> selection, IDropTarget dropTarget)
{
}
private void OnTextFieldKeyPressed(KeyDownEvent e)
{
switch (e.keyCode)
{
case KeyCode.Escape:
m_EditTitleCancelled = true;
m_TextField.Blur();
break;
case KeyCode.Return:
case KeyCode.KeypadEnter:
m_TextField.Blur();
break;
default:
break;
}
}
private void OnEditTextFinished()
{
m_ContentItem.visible = true;
m_TextField.visible = false;
if (!m_EditTitleCancelled && (text != m_TextField.text))
{
Blackboard blackboard = GetFirstAncestorOfType<Blackboard>();
if (blackboard.editTextRequested != null)
{
blackboard.editTextRequested(blackboard, this, m_TextField.text);
}
else
{
text = m_TextField.text;
}
}
m_EditTitleCancelled = false;
}
private void OnMouseDownEvent(MouseDownEvent e)
{
if ((e.clickCount == 2) && e.button == (int)MouseButton.LeftMouse)
{
RenameGo();
e.PreventDefault();
}
}
internal void RenameGo()
{
m_TextField.text = text;
m_TextField.visible = true;
m_ContentItem.visible = false;
m_TextField.Focus();
m_TextField.SelectAll();
}
}
}

133
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Blackboard/Blackboard.cs


using System;
using System.Collections.Generic;
using UnityEditor.Experimental.UIElements.GraphView;
using UnityEngine;
using UnityEngine.Experimental.UIElements;
using UnityEngine.Experimental.UIElements.StyleEnums;
namespace UnityEditor.ShaderGraph.Drawing
{
class Blackboard : GraphElement
{
private const int k_DefaultWidth = 200;
private const float k_DefaultHeight = 400;
private VisualElement m_MainContainer;
private VisualElement m_Root;
private Label m_TitleLabel;
private Label m_SubTitleLabel;
private ScrollView m_ScrollView;
private VisualElement m_ContentContainer;
private VisualElement m_HeaderItem;
private Button m_AddButton;
private bool m_Scrollable = true;
public Action<Blackboard> addItemRequested { get; set; }
public Action<Blackboard, int, VisualElement> moveItemRequested { get; set; }
public Action<Blackboard, VisualElement, string> editTextRequested { get; set; }
public string title
{
get { return m_TitleLabel.text; }
set { m_TitleLabel.text = value; }
}
public string subTitle
{
get { return m_SubTitleLabel.text; }
set { m_SubTitleLabel.text = value; }
}
public override VisualElement contentContainer { get { return m_ContentContainer; } }
public bool scrollable
{
get
{
return m_Scrollable;
}
set
{
if (m_Scrollable == value)
return;
m_Scrollable = value;
if (m_Scrollable)
{
if (m_ScrollView == null)
{
m_ScrollView = new ScrollView();
// m_ScrollView.stretchContentWidth = true;
}
// Remove the sections container from the content item and add it to the scrollview
m_ContentContainer.RemoveFromHierarchy();
m_Root.Add(m_ScrollView);
m_ScrollView.Add(m_ContentContainer);
style.positionType = PositionType.Manual; // As both the width and height can be changed by the user using a resizer
// If the current the current geometry is invalid then set a default size
if (layout.width == 0 || layout.height == 0)
{
layout = new Rect(layout.x, layout.y, layout.width == 0 ? k_DefaultWidth : layout.width, layout.height == 0 ? k_DefaultHeight : layout.height);
}
AddToClassList("scrollable");
}
else
{
if (m_ScrollView != null)
{
// Remove the sections container from the scrollview and add it to the content item
style.positionType = PositionType.Absolute; // As the height is automatically computed from the content but the width can be changed by the user using a resizer
m_ScrollView.RemoveFromHierarchy();
m_ContentContainer.RemoveFromHierarchy();
m_Root.Add(m_ContentContainer);
}
RemoveFromClassList("scrollable");
}
}
}
public Blackboard()
{
AddStyleSheetPath("Styles/Blackboard");
var tpl = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>("Assets/UnityShaderEditor/Editor/Resources/UXML/GraphView/Blackboard.uxml");
m_MainContainer = tpl.CloneTree(null);
m_MainContainer.AddToClassList("mainContainer");
m_Root = m_MainContainer.Q("content");
m_HeaderItem = m_MainContainer.Q("header");
m_HeaderItem.AddToClassList("blackboardHeader");
m_AddButton = m_MainContainer.Q(name: "addButton") as Button;
m_AddButton.clickable.clicked += () => {
if (addItemRequested != null)
{
addItemRequested(this);
}
};
m_TitleLabel = m_MainContainer.Q<Label>(name: "titleLabel");
m_SubTitleLabel = m_MainContainer.Q<Label>(name: "subTitleLabel");
m_ContentContainer = m_MainContainer.Q<VisualElement>(name: "contentContainer");
shadow.Add(m_MainContainer);
capabilities |= Capabilities.Movable | Capabilities.Resizable;
clippingOptions = ClippingOptions.ClipAndCacheContents;
ClearClassList();
AddToClassList("sgblackboard");
// this.AddManipulator(new Dragger { clampToParentEdges = true });
scrollable = false;
// shadow.Add(new Resizer());
}
}
}

128
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Blackboard/BlackboardProvider.cs


using System;
using System.Collections.Generic;
using UnityEditor.Graphing;
using UnityEngine;
using UnityEngine.Experimental.UIElements;
namespace UnityEditor.ShaderGraph.Drawing
{
class BlackboardProvider
{
readonly string m_AssetName;
readonly AbstractMaterialGraph m_Graph;
readonly Texture2D m_ExposedIcon;
readonly Dictionary<Guid, BlackboardRow> m_PropertyRows;
readonly BlackboardSection m_Section;
WindowDraggable m_WindowDraggable;
ResizeBorderFrame m_ResizeBorderFrame;
public Blackboard blackboard { get; private set; }
public Action onDragFinished
{
get { return m_WindowDraggable.OnDragFinished; }
set { m_WindowDraggable.OnDragFinished = value; }
}
public Action onResizeFinished
{
get { return m_ResizeBorderFrame.OnResizeFinished; }
set { m_ResizeBorderFrame.OnResizeFinished = value; }
}
public BlackboardProvider(string assetName, AbstractMaterialGraph graph)
{
m_AssetName = assetName;
m_Graph = graph;
m_ExposedIcon = Resources.Load("GraphView/Nodes/BlackboardFieldExposed") as Texture2D;
m_PropertyRows = new Dictionary<Guid, BlackboardRow>();
blackboard = new Blackboard()
{
scrollable = true,
title = assetName,
editTextRequested = EditTextRequested,
addItemRequested = AddItemRequested,
moveItemRequested = MoveItemRequested
};
m_WindowDraggable = new WindowDraggable();
blackboard.AddManipulator(m_WindowDraggable);
m_ResizeBorderFrame = new ResizeBorderFrame(blackboard) { name = "resizeBorderFrame" };
blackboard.shadow.Add(m_ResizeBorderFrame);
m_Section = new BlackboardSection { headerVisible = false };
foreach (var property in graph.properties)
AddProperty(property);
blackboard.Add(m_Section);
}
void MoveItemRequested(Blackboard blackboard, int i, VisualElement visualElement)
{
Debug.Log(i);
}
void AddItemRequested(Blackboard blackboard)
{
var gm = new GenericMenu();
gm.AddItem(new GUIContent("Float"), false, () => AddProperty(new FloatShaderProperty(), true));
gm.AddItem(new GUIContent("Vector2"), false, () => AddProperty(new Vector2ShaderProperty(), true));
gm.AddItem(new GUIContent("Vector3"), false, () => AddProperty(new Vector3ShaderProperty(), true));
gm.AddItem(new GUIContent("Vector4"), false, () => AddProperty(new Vector4ShaderProperty(), true));
gm.AddItem(new GUIContent("Color"), false, () => AddProperty(new ColorShaderProperty(), true));
gm.AddItem(new GUIContent("Texture"), false, () => AddProperty(new TextureShaderProperty(), true));
gm.AddItem(new GUIContent("Cubemap"), false, () => AddProperty(new CubemapShaderProperty(), true));
gm.ShowAsContext();
}
void EditTextRequested(Blackboard blackboard, VisualElement visualElement, string newText)
{
var field = (BlackboardField)visualElement;
var property = (IShaderProperty)field.userData;
if (newText != property.displayName)
{
property.displayName = newText;
field.text = newText;
DirtyNodes();
}
}
public void HandleGraphChanges()
{
foreach (var propertyGuid in m_Graph.removedProperties)
{
BlackboardRow row;
if (m_PropertyRows.TryGetValue(propertyGuid, out row))
{
row.RemoveFromHierarchy();
m_PropertyRows.Remove(propertyGuid);
}
}
foreach (var property in m_Graph.addedProperties)
AddProperty(property);
}
void AddProperty(IShaderProperty property, bool create = false)
{
if (m_PropertyRows.ContainsKey(property.guid))
throw new ArgumentException("Property already exists");
var field = new BlackboardField(m_ExposedIcon, property.displayName, property.propertyType.ToString()) { userData = property };
var row = new BlackboardRow(field, new BlackboardFieldPropertyView(m_Graph, property));
m_Section.Add(row);
m_PropertyRows[property.guid] = row;
if (create)
{
field.RenameGo();
row.expanded = true;
}
}
void DirtyNodes()
{
foreach (var node in m_Graph.GetNodes<PropertyNode>())
node.Dirty(ModificationScope.Node);
}
}
}

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes.meta


fileFormatVersion: 2
guid: 9d93b12df2d043f9876fa00095ab8c99
timeCreated: 1516704856

6
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/BlackboardFieldExposed.png

之前 之后
宽度: 10  |  高度: 10  |  大小: 328 B

83
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/BlackboardFieldExposed.png.meta


fileFormatVersion: 2
guid: 2e8113252e9a1b245a81dc384ae86446
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 5
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: -1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

8
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/BlackboardFieldPillBackground.png

之前 之后
宽度: 50  |  高度: 50  |  大小: 1.7 KiB

83
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/BlackboardFieldPillBackground.png.meta


fileFormatVersion: 2
guid: 56603bbe7a2b54640bbd90104bea4981
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 5
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: -1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronDown.png

之前 之后
宽度: 12  |  高度: 12  |  大小: 206 B

105
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronDown.png.meta


fileFormatVersion: 2
guid: 4c07dcabd0a45844eb0889811a49b9bf
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 5
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronDown@2x.png

之前 之后
宽度: 24  |  高度: 24  |  大小: 327 B

99
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronDown@2x.png.meta


fileFormatVersion: 2
guid: c951fed1cf039c7439a755e2ca108e4a
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 5
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: 1
mipBias: -1
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 2
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronLeft.png

之前 之后
宽度: 12  |  高度: 12  |  大小: 188 B

99
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronLeft.png.meta


fileFormatVersion: 2
guid: fb2ebd29216e958449e2ce6f37fde61d
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 5
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: 1
mipBias: -1
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 2
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronLeft@2x.png

之前 之后
宽度: 24  |  高度: 24  |  大小: 286 B

99
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronLeft@2x.png.meta


fileFormatVersion: 2
guid: 7e575e166832cb7478f6d674d896b778
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 5
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: 1
mipBias: -1
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 2
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronRight.png

之前 之后
宽度: 12  |  高度: 12  |  大小: 218 B

99
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronRight.png.meta


fileFormatVersion: 2
guid: 951848ba8b6205940a9bd1b8fdd4d796
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 5
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: 1
mipBias: -1
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 2
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

5
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronRight@2x.png

之前 之后
宽度: 24  |  高度: 24  |  大小: 278 B

99
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronRight@2x.png.meta


fileFormatVersion: 2
guid: 50cbcd05e61c4e54ea797ec88e91f1b0
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 5
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: 1
mipBias: -1
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 2
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronUp.png

之前 之后
宽度: 12  |  高度: 12  |  大小: 176 B

105
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronUp.png.meta


fileFormatVersion: 2
guid: 59e85404e1156534e84e3f06ad9d3bff
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 5
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

5
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronUp@2x.png

之前 之后
宽度: 24  |  高度: 24  |  大小: 326 B

99
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/NodeChevronUp@2x.png.meta


fileFormatVersion: 2
guid: 94c5e3f4e8affed4285a0c674a431b9e
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 5
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: 1
mipBias: -1
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 2
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/PreviewCollapse.png

之前 之后
宽度: 16  |  高度: 16  |  大小: 225 B

105
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/PreviewCollapse.png.meta


fileFormatVersion: 2
guid: 03d3df9748467354ab39a973710a3a30
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 5
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/PreviewCollapse@2x.png

之前 之后
宽度: 32  |  高度: 32  |  大小: 357 B

99
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/PreviewCollapse@2x.png.meta


fileFormatVersion: 2
guid: adc5cc7a4034e1b41b9341fa124ef43d
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 5
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: 1
mipBias: -1
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 2
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/PreviewExpand.png

之前 之后
宽度: 16  |  高度: 16  |  大小: 237 B

99
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/PreviewExpand.png.meta


fileFormatVersion: 2
guid: 8df757582ef08984bb6c3510e3a9fd1e
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 5
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: 1
mipBias: -1
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 2
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/PreviewExpand@2x.png

之前 之后
宽度: 32  |  高度: 32  |  大小: 382 B

99
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/GraphView/Nodes/PreviewExpand@2x.png.meta


fileFormatVersion: 2
guid: 88995b00867befb41adaada22f8abc21
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 5
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: 1
mipBias: -1
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 2
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

8
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/UXML/GraphView.meta


fileFormatVersion: 2
guid: d50f8ede1b641034a8c4d807ac62b84d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

12
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/UXML/GraphView/Blackboard.uxml


<UXML xmlns:ui="UnityEngine.Experimental.UIElements">
<ui:VisualElement name="content" pickingMode="Ignore">
<ui:VisualElement name="header" pickingMode="Ignore">
<ui:VisualElement name="labelContainer" pickingMode="Ignore">
<ui:Label name="titleLabel" text="" />
<ui:Label name="subTitleLabel" text="Blackboard" />
</ui:VisualElement>
<ui:Button name="addButton" text="+" />
</ui:VisualElement>
<ui:VisualElement name="contentContainer" pickingMode="Ignore" />
</ui:VisualElement>
</UXML>

7
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/UXML/GraphView/Blackboard.uxml.meta


fileFormatVersion: 2
guid: 0f4a2b15d455c38448872d912b63341b
ScriptedImporter:
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}

12
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/UXML/GraphView/BlackboardField.uxml


<UXML xmlns:ui="UnityEngine.Experimental.UIElements">
<ui:VisualElement name="contentItem" pickingMode="Ignore">
<ui:VisualElement name="pill" pickingMode="Ignore">
<ui:VisualElement name="borderItem" pickingMode="Ignore" />
<ui:VisualElement name="backgroundItem" pickingMode="Ignore" />
<ui:Image name="iconItem" />
<ui:Label name="textLabel" text = "" pickingMode="Ignore" />
</ui:VisualElement>
<ui:Label name="typeLabel" text = "" pickingMode="Ignore" />
</ui:VisualElement>
<ui:TextField name="textField" text="" />
</UXML>

7
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/UXML/GraphView/BlackboardField.uxml.meta


fileFormatVersion: 2
guid: fd9d943cdb64d9447982dc7881a4973c
ScriptedImporter:
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}

13
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/UXML/GraphView/BlackboardRow.uxml


<UXML xmlns:ui="UnityEngine.Experimental.UIElements">
<ui:VisualElement name="root" pickingMode="Ignore">
<ui:VisualElement name="itemRow" pickingMode="Ignore">
<ui:Button name="expandButton" text = "">
<ui:Image name="buttonImage" />
</ui:Button>
<ui:VisualElement name="itemRowContentContainer" pickingMode="Ignore">
<ui:VisualElement name="itemContainer" pickingMode="Ignore" />
</ui:VisualElement>
</ui:VisualElement>
<ui:VisualElement name="propertyViewContainer" pickingMode="Ignore" />
</ui:VisualElement>
</UXML>

7
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/UXML/GraphView/BlackboardRow.uxml.meta


fileFormatVersion: 2
guid: 5983202b0aaecde4382a697a6ba9afe9
ScriptedImporter:
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}

7
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/UXML/GraphView/BlackboardSection.uxml


<?xml version="1.0" encoding="Windows-1252"?>
<UXML xmlns:ui="UnityEngine.Experimental.UIElements">
<ui:VisualElement name="sectionHeader" pickingMode="Ignore">
<ui:Label name="sectionTitleLabel" pickingMode="Ignore"/>
</ui:VisualElement>
<ui:VisualElement name="rowsContainer" pickingMode="Ignore" />
</UXML>

7
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/UXML/GraphView/BlackboardSection.uxml.meta


fileFormatVersion: 2
guid: abaf4d3af0a0d2540ba7ef67c6f9145a
ScriptedImporter:
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
正在加载...
取消
保存