浏览代码

Merge master

/main
Tim Cooper 7 年前
当前提交
3039671f
共有 316 个文件被更改,包括 312 次插入210 次删除
  1. 2
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Assets/IGraphAsset.cs
  2. 2
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Assets/SerializableGraphAsset.cs
  3. 3
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Implementation/Edge.cs
  4. 4
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Implementation/NodeUtils.cs
  5. 91
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Implementation/SerializableGraph.cs
  6. 3
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Implementation/SerializableGraphObject.cs
  7. 3
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Implementation/SerializableNode.cs
  8. 3
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Implementation/SerializableSlot.cs
  9. 2
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Implementation/SlotType.cs
  10. 3
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Interfaces/DrawState.cs
  11. 2
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Interfaces/GraphChange.cs
  12. 3
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Interfaces/GraphDrawingData.cs
  13. 2
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Interfaces/IEdge.cs
  14. 10
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Interfaces/IGraph.cs
  15. 2
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Interfaces/IGraphObject.cs
  16. 2
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Interfaces/INode.cs
  17. 2
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Interfaces/IOnAssetEnabled.cs
  18. 2
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Interfaces/ISlot.cs
  19. 3
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Interfaces/SlotReference.cs
  20. 2
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Testing/IntegrationTests/SerializationTests.cs
  21. 2
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Testing/UnitTests/SerializedGraphTests.cs
  22. 2
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Util/DictionaryPool.cs
  23. 2
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Util/ListPool.cs
  24. 8
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Util/Logging.cs
  25. 3
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Util/ObjectPool.cs
  26. 2
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Util/PooledObject.cs
  27. 2
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Util/QueuePool.cs
  28. 51
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Util/SerializationHelper.cs
  29. 2
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Util/StackPool.cs
  30. 4
      MaterialGraphProject/Assets/NewNodes/Editor/ChannelBlendNode.cs
  31. 2
      MaterialGraphProject/Assets/NewNodes/Editor/CommonMatrixType.cs
  32. 2
      MaterialGraphProject/Assets/NewNodes/Editor/ConstantType.cs
  33. 3
      MaterialGraphProject/Assets/NewNodes/Editor/FractalNode.cs
  34. 4
      MaterialGraphProject/Assets/NewNodes/Editor/FunctionNAddNode.cs
  35. 4
      MaterialGraphProject/Assets/NewNodes/Editor/FunctionNInNOut.cs
  36. 7
      MaterialGraphProject/Assets/NewNodes/Editor/Keep/BlendModeNode.cs
  37. 2
      MaterialGraphProject/Assets/NewNodes/Editor/Keep/BlendModesEnum.cs
  38. 3
      MaterialGraphProject/Assets/NewNodes/Editor/Keep/ColorBalanceNode.cs
  39. 9
      MaterialGraphProject/Assets/NewNodes/Editor/Keep/ConstantsNode.cs
  40. 7
      MaterialGraphProject/Assets/NewNodes/Editor/Keep/GradientNode.cs
  41. 5
      MaterialGraphProject/Assets/NewNodes/Editor/Keep/HeightToNormalNode.cs
  42. 5
      MaterialGraphProject/Assets/NewNodes/Editor/Keep/LightProbeNode.cs
  43. 5
      MaterialGraphProject/Assets/NewNodes/Editor/Keep/ParallaxNode.cs
  44. 3
      MaterialGraphProject/Assets/NewNodes/Editor/Keep/RadialShearNode.cs
  45. 3
      MaterialGraphProject/Assets/NewNodes/Editor/Keep/RandomRangeNode.cs
  46. 2
      MaterialGraphProject/Assets/NewNodes/Editor/Keep/ReciprocalSqrtNode.cs
  47. 5
      MaterialGraphProject/Assets/NewNodes/Editor/Keep/ReflectionProbeNode.cs
  48. 7
      MaterialGraphProject/Assets/NewNodes/Editor/Keep/SamplerStateNode.cs
  49. 3
      MaterialGraphProject/Assets/NewNodes/Editor/Keep/ScaleOffsetNode.cs
  50. 3
      MaterialGraphProject/Assets/NewNodes/Editor/Keep/TangentToWorldNode.cs
  51. 5
      MaterialGraphProject/Assets/NewNodes/Editor/Keep/TextureSamplerNode.cs
  52. 7
      MaterialGraphProject/Assets/NewNodes/Editor/Keep/TransformNode.cs
  53. 4
      MaterialGraphProject/Assets/NewNodes/Editor/Keep/UVTriPlanar.cs
  54. 3
      MaterialGraphProject/Assets/NewNodes/Editor/Kill/AACheckerBoard3dNode.cs
  55. 3
      MaterialGraphProject/Assets/NewNodes/Editor/Kill/AACheckerBoardNode.cs
  56. 5
      MaterialGraphProject/Assets/NewNodes/Editor/Kill/MultiLayerParallaxNode.cs
  57. 3
      MaterialGraphProject/Assets/NewNodes/Editor/Kill/POMNode.cs
  58. 4
      MaterialGraphProject/Assets/NewNodes/Editor/Kill/ScatterNode.cs
  59. 3
      MaterialGraphProject/Assets/NewNodes/Editor/Kill/SphereWarpNode.cs
  60. 4
      MaterialGraphProject/Assets/NewNodes/Editor/Kill/SphericalIndentationNode.cs
  61. 4
      MaterialGraphProject/Assets/NewNodes/Editor/Kill/ToggleNode.cs
  62. 5
      MaterialGraphProject/Assets/NewNodes/Editor/Kill/VertexNormalNode.cs
  63. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/AssetCallbacks/CreateLayeredShaderGraph.cs
  64. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/AssetCallbacks/CreateRemapGraph.cs
  65. 6
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/AssetCallbacks/CreateShaderGraph.cs
  66. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/AssetCallbacks/CreateShaderSubGraph.cs
  67. 41
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/AbstractMaterialGraph.cs
  68. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/AbstractMaterialGraphAsset.cs
  69. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/AbstractShaderProperty.cs
  70. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/ColorShaderProperty.cs
  71. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/FloatShaderProperty.cs
  72. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/IMaterialGraphAsset.cs
  73. 2
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/IShaderGraph.cs
  74. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/IShaderProperty.cs
  75. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/MaterialGraph.cs
  76. 6
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/MaterialGraphAsset.cs
  77. 11
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/MaterialSlot.cs
  78. 2
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/Precision.cs
  79. 2
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/PreviewMode.cs
  80. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/PreviewProperty.cs
  81. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/SamplerStateShaderProperty.cs
  82. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/SerializableGuid.cs
  83. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/SerializableTexture.cs
  84. 2
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/ShaderGraphRequirements.cs
  85. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/TextureSamplerState.cs
  86. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/TextureShaderProperty.cs
  87. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/Vector2ShaderProperty.cs
  88. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/Vector3ShaderProperty.cs
  89. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/Vector4ShaderProperty.cs
  90. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/VectorShaderProperty.cs
  91. 2
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Interfaces/GenerationMode.cs
  92. 2
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Interfaces/IGenerateProperties.cs
  93. 2
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Interfaces/IGeneratesBodyCode.cs
  94. 2
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Interfaces/IGeneratesFunction.cs
  95. 2
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Interfaces/IMayRequireNormal.cs
  96. 2
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Interfaces/IMayRequireTime.cs
  97. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Interfaces/MaterialGraphChange.cs
  98. 2
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Interfaces/NeededCoordinateSpace.cs
  99. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/LightweightPipeline/AbstractLightweightMasterNode.cs
  100. 2
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/LightweightPipeline/AbstractLightweightPBRMasterNode.cs

2
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Assets/IGraphAsset.cs


namespace UnityEngine.Graphing
namespace UnityEditor.Graphing
{
}

2
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Assets/SerializableGraphAsset.cs


namespace UnityEngine.Graphing
namespace UnityEditor.Graphing
{
}

3
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Implementation/Edge.cs


using System;
using UnityEngine;
namespace UnityEngine.Graphing
namespace UnityEditor.Graphing
{
[Serializable]
public class Edge : IEdge

4
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Implementation/NodeUtils.cs


using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine.MaterialGraph;
using UnityEditor.ShaderGraph;
namespace UnityEngine.Graphing
namespace UnityEditor.Graphing
{
public class SlotConfigurationException : Exception
{

91
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Implementation/SerializableGraph.cs


using System.Reflection;
using System.Runtime.InteropServices;
using NUnit.Framework;
using UnityEngine;
namespace UnityEngine.Graphing
namespace UnityEditor.Graphing
{
[Serializable]
public class SerializableGraph : IGraph, ISerializationCallbackReceiver

[SerializeField]
List<SerializationHelper.JSONSerializedElement> m_SerializableEdges = new List<SerializationHelper.JSONSerializedElement>();
[NonSerialized]
List<INode> m_AddedNodes = new List<INode>();
[NonSerialized]
List<INode> m_RemovedNodes = new List<INode>();
[NonSerialized]
List<IEdge> m_AddedEdges = new List<IEdge>();
[NonSerialized]
List<IEdge> m_RemovedEdges = new List<IEdge>();
public IEnumerable<INode> addedNodes
{
get { return m_AddedNodes; }
}
public IEnumerable<INode> removedNodes
{
get { return m_RemovedNodes; }
}
public IEnumerable<IEdge> addedEdges
{
get { return m_AddedEdges; }
}
public IEnumerable<IEdge> removedEdges
{
get { return m_RemovedEdges; }
}
public IGraphObject owner { get; set; }
public virtual void ClearChanges()
{
m_AddedNodes.Clear();
m_RemovedNodes.Clear();
m_AddedEdges.Clear();
m_RemovedEdges.Clear();
}
public IEnumerable<T> GetNodes<T>() where T : INode
{
return m_Nodes.Values.OfType<T>();

{
m_Nodes.Add(node.guid, node);
node.owner = this;
NotifyChange(new NodeAddedGraphChange(node));
m_AddedNodes.Add(node);
}
public virtual void RemoveNode(INode node)

m_Nodes.Remove(node.guid);
NotifyChange(new NodeRemovedGraphChange(node));
m_RemovedNodes.Add(node);
ValidateGraph();
}

return;
m_Nodes.Remove(node.guid);
NotifyChange(new NodeRemovedGraphChange(node));
m_RemovedNodes.Add(node);
}
void AddEdgeToNodeEdges(IEdge edge)

return new Dictionary<SerializationHelper.TypeSerializationInfo, SerializationHelper.TypeSerializationInfo>();
}
public virtual IEdge Connect(SlotReference fromSlotRef, SlotReference toSlotRef)
IEdge ConnectNoValidate(SlotReference fromSlotRef, SlotReference toSlotRef)
{
if (fromSlotRef == null || toSlotRef == null)
return null;

var newEdge = new Edge(outputSlot, inputSlot);
m_Edges.Add(newEdge);
NotifyChange(new EdgeAddedGraphChange(newEdge));
m_AddedEdges.Add(newEdge);
return newEdge;
}
public virtual IEdge Connect(SlotReference fromSlotRef, SlotReference toSlotRef)
{
var newEdge = ConnectNoValidate(fromSlotRef, toSlotRef);
ValidateGraph();
return newEdge;
}

if (m_NodeEdges.TryGetValue(e.outputSlot.nodeGuid, out outputNodeEdges))
outputNodeEdges.Remove(e);
NotifyChange(new EdgeRemovedGraphChange(e));
m_RemovedEdges.Add(e);
}
public INode GetNodeFromGuid(Guid guid)

AddEdgeToNodeEdges(edge);
OnEnable();
ValidateGraph();
ValidateGraph();
}
public virtual void ValidateGraph()

//manually modifies serialized data
//of if they delete a node in the inspector
//debug view.
foreach (var edge in edges.ToArray())
//debug view.
foreach (var edge in edges.ToArray())
{
var outputNode = GetNodeFromGuid(edge.outputSlot.nodeGuid);
var inputNode = GetNodeFromGuid(edge.inputSlot.nodeGuid);

removedNodeEdges.Add(edge);
}
foreach (var edge in removedNodeEdges)
RemoveEdge(edge);
RemoveEdgeNoValidate(edge);
}
// Remove all nodes and re-add them.

foreach (var node in m_Nodes.Values)
removedNodeGuids.Add(node.guid);
foreach (var nodeGuid in removedNodeGuids)
RemoveNode(m_Nodes[nodeGuid]);
RemoveNodeNoValidate(m_Nodes[nodeGuid]);
ValidateGraph();
AddNode(node);
AddNodeNoValidate(node);
}
// Add edges from other graph which don't exist in this one.

Connect(edge.outputSlot, edge.inputSlot);
ConnectNoValidate(edge.outputSlot, edge.inputSlot);
ValidateGraph();
}
public void OnEnable()

node.OnEnable();
}
}
public OnGraphChange onChange { get; set; }
public IGraphObject owner { get; set; }
protected void NotifyChange(GraphChange change)
{
if (onChange != null)
onChange(change);
}
}
}

3
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Implementation/SerializableGraphObject.cs


using System;
using UnityEditor;
using UnityEngine;
namespace UnityEngine.Graphing
namespace UnityEditor.Graphing
{
public class SerializableGraphObject : ScriptableObject, IGraphObject, ISerializationCallbackReceiver
{

3
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Implementation/SerializableNode.cs


using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace UnityEngine.Graphing
namespace UnityEditor.Graphing
{
[Serializable]
public class SerializableNode : INode, ISerializationCallbackReceiver

3
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Implementation/SerializableSlot.cs


using System;
using System.Linq;
using UnityEngine;
namespace UnityEngine.Graphing
namespace UnityEditor.Graphing
{
[Serializable]
public class SerializableSlot : ISlot

2
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Implementation/SlotType.cs


namespace UnityEngine.Graphing
namespace UnityEditor.Graphing
{
public enum SlotType
{

3
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Interfaces/DrawState.cs


using System;
using UnityEngine;
namespace UnityEngine.Graphing
namespace UnityEditor.Graphing
{
[Serializable]
public struct DrawState

2
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Interfaces/GraphChange.cs


using System;
namespace UnityEngine.Graphing
namespace UnityEditor.Graphing
{
public abstract class GraphChange {}

3
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Interfaces/GraphDrawingData.cs


using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace UnityEngine.Graphing
namespace UnityEditor.Graphing
{
[Serializable]
public class GraphDrawingData : ISerializationCallbackReceiver

2
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Interfaces/IEdge.cs


using System;
namespace UnityEngine.Graphing
namespace UnityEditor.Graphing
{
public interface IEdge : IEquatable<IEdge>
{

10
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Interfaces/IGraph.cs


using System;
using System.Collections.Generic;
namespace UnityEngine.Graphing
namespace UnityEditor.Graphing
public delegate void OnGraphChange(GraphChange change);
public interface IGraph : IOnAssetEnabled
{
IEnumerable<T> GetNodes<T>() where T : INode;

IEnumerable<IEdge> GetEdges(SlotReference s);
void ValidateGraph();
void ReplaceWith(IGraph other);
OnGraphChange onChange { get; set; }
IEnumerable<INode> addedNodes { get; }
IEnumerable<INode> removedNodes { get; }
IEnumerable<IEdge> addedEdges { get; }
IEnumerable<IEdge> removedEdges { get; }
void ClearChanges();
}
}

2
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Interfaces/IGraphObject.cs


namespace UnityEngine.Graphing
namespace UnityEditor.Graphing
{
public interface IGraphObject
{

2
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Interfaces/INode.cs


using System;
using System.Collections.Generic;
namespace UnityEngine.Graphing
namespace UnityEditor.Graphing
{
public enum ModificationScope
{

2
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Interfaces/IOnAssetEnabled.cs


namespace UnityEngine.Graphing
namespace UnityEditor.Graphing
{
public interface IOnAssetEnabled
{

2
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Interfaces/ISlot.cs


using System;
namespace UnityEngine.Graphing
namespace UnityEditor.Graphing
{
public interface ISlot : IEquatable<ISlot>
{

3
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Interfaces/SlotReference.cs


using System;
using UnityEngine;
namespace UnityEngine.Graphing
namespace UnityEditor.Graphing
{
[Serializable]
public class SlotReference : ISerializationCallbackReceiver, IEquatable<SlotReference>

2
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Testing/IntegrationTests/SerializationTests.cs


using System.Collections.Generic;
using NUnit.Framework;
using UnityEngine;
using UnityEngine.Graphing;
using UnityEditor.Graphing;
namespace UnityEditor.Graphing.IntegrationTests
{

2
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Testing/UnitTests/SerializedGraphTests.cs


using System.Linq;
using NUnit.Framework;
using UnityEngine;
using UnityEngine.Graphing;
using UnityEditor.Graphing;
namespace UnityEditor.Graphing.UnitTests
{

2
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Util/DictionaryPool.cs


using System.Collections.Generic;
namespace UnityEngine.Graphing
namespace UnityEditor.Graphing
{
public static class DictionaryPool<TKey, TValue>
{

2
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Util/ListPool.cs


using System.Collections.Generic;
namespace UnityEngine.Graphing
namespace UnityEditor.Graphing
{
public static class ListPool<T>
{

8
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Util/Logging.cs


using System;
using UnityEngine;
using Object = System.Object;
namespace UnityEngine.Graphing
namespace UnityEditor.Graphing
public void LogFormat(LogType logType, Object context, string format, params object[] args)
public void LogFormat(LogType logType, UnityEngine.Object context, string format, params object[] args)
public void LogException(Exception exception, Object context)
public void LogException(Exception exception, UnityEngine.Object context)
{
Console.WriteLine("{0} - {1}", context, exception);
}

3
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Util/ObjectPool.cs


using System;
using System.Collections.Generic;
using UnityEngine;
namespace UnityEngine.Graphing
namespace UnityEditor.Graphing
{
class ObjectPool<T> where T : new()
{

2
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Util/PooledObject.cs


using System;
namespace UnityEngine.Graphing
namespace UnityEditor.Graphing
{
public class PooledObject<T> : IDisposable where T : new()
{

2
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Util/QueuePool.cs


using System.Collections.Generic;
namespace UnityEngine.Graphing
namespace UnityEditor.Graphing
{
public static class QueuePool<T>
{

51
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Util/SerializationHelper.cs


using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace UnityEngine.Graphing
namespace UnityEditor.Graphing
{
public static class SerializationHelper
{

[SerializeField]
public string fullName;
[SerializeField]
public string assemblyName;
return !string.IsNullOrEmpty(fullName) && !string.IsNullOrEmpty(assemblyName);
}
public string SearchString()
{
if (!IsValid())
return string.Empty;
return string.Format("{0}, {1}", fullName, assemblyName);
}
public string SearchStringTestable()
{
if (!IsValid())
return string.Empty;
return string.Format("{0}, {1}-testable", fullName, assemblyName);
return !string.IsNullOrEmpty(fullName);
}
}

{
return new TypeSerializationInfo
{
fullName = type.FullName,
assemblyName = type.Assembly.GetName().Name
fullName = type.FullName
private static Type GetTypeFromSerializedString(TypeSerializationInfo typeInfo)
static Type GetTypeFromSerializedString(TypeSerializationInfo typeInfo)
var res = Type.GetType(typeInfo.SearchString());
var assemblies = AppDomain.CurrentDomain.GetAssemblies();
foreach (var assembly in assemblies)
{
var type = assembly.GetType(typeInfo.fullName);
if (type != null)
return type;
}
// if we are using a 'testable' dll.
if (res == null)
res = Type.GetType(typeInfo.SearchStringTestable());
return res;
return null;
}
public static JSONSerializedElement Serialize<T>(T item)

};
}
private static TypeSerializationInfo DoTypeRemap(TypeSerializationInfo info, Dictionary<TypeSerializationInfo, TypeSerializationInfo> remapper)
static TypeSerializationInfo DoTypeRemap(TypeSerializationInfo info, Dictionary<TypeSerializationInfo, TypeSerializationInfo> remapper)
{
TypeSerializationInfo foundInfo;
if (remapper.TryGetValue(info, out foundInfo))

throw new ArgumentException(string.Format("Can not deserialize {0}, it is invalid", item));
TypeSerializationInfo info = item.typeInfo;
info.fullName = info.fullName.Replace("UnityEngine.MaterialGraph", "UnityEditor.ShaderGraph");
info.fullName = info.fullName.Replace("UnityEngine.Graphing", "UnityEditor.Graphing");
info.assemblyName = "Assembly-CSharp-Editor";
throw new ArgumentException(string.Format("Can not deserialize ({0}, {1}), type is invalid", info.assemblyName, info.fullName));
throw new ArgumentException(string.Format("Can not deserialize ({0}), type is invalid", info.fullName));
T instance;
try

2
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Util/StackPool.cs


using System.Collections.Generic;
namespace UnityEngine.Graphing
namespace UnityEditor.Graphing
{
public static class StackPool<T>
{

4
MaterialGraphProject/Assets/NewNodes/Editor/ChannelBlendNode.cs


using UnityEngine.Graphing;
using UnityEditor.Graphing;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
/* [Title("Art/ChannelBlend")]
public class ChannelBlend : FunctionNInNOut, IGeneratesFunction

2
MaterialGraphProject/Assets/NewNodes/Editor/CommonMatrixType.cs


namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
public enum CommonMatrixType
{

2
MaterialGraphProject/Assets/NewNodes/Editor/ConstantType.cs


namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
public enum ConstantType
{

3
MaterialGraphProject/Assets/NewNodes/Editor/FractalNode.cs


using System.Reflection;
using UnityEngine;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Title("Procedural/Fractal")]
public class FractalNode : CodeFunctionNode

4
MaterialGraphProject/Assets/NewNodes/Editor/FunctionNAddNode.cs


using UnityEngine.Graphing;
using UnityEditor.Graphing;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
/* [Title("Math/Advanced/Adder")]
public class AddManyNode : FunctionNInNOut, IGeneratesFunction

4
MaterialGraphProject/Assets/NewNodes/Editor/FunctionNInNOut.cs


using UnityEngine.Graphing;
using UnityEditor.Graphing;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
/* public abstract class FunctionNInNOut : AbstractMaterialNode, IGeneratesBodyCode
{

7
MaterialGraphProject/Assets/NewNodes/Editor/Keep/BlendModeNode.cs


using System.Reflection;
using UnityEditor.MaterialGraph.Drawing.Controls;
using UnityEngine.Graphing;
using UnityEditor.ShaderGraph.Drawing.Controls;
using UnityEngine;
using UnityEditor.Graphing;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Title("Art/BlendMode")]
public class BlendModeNode : CodeFunctionNode

2
MaterialGraphProject/Assets/NewNodes/Editor/Keep/BlendModesEnum.cs


namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
public enum BlendModesEnum
{

3
MaterialGraphProject/Assets/NewNodes/Editor/Keep/ColorBalanceNode.cs


using System.Reflection;
using UnityEngine;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Title("Art/Adjustments/ColorBalance")]
public class ColorBalanceNode : CodeFunctionNode

9
MaterialGraphProject/Assets/NewNodes/Editor/Keep/ConstantsNode.cs


using System.Collections.Generic;
using UnityEditor.MaterialGraph.Drawing.Controls;
using UnityEngine.MaterialGraph;
using UnityEngine.Graphing;
using UnityEditor.ShaderGraph.Drawing.Controls;
using UnityEngine;
using UnityEditor.ShaderGraph;
using UnityEditor.Graphing;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Title("Math/Constants")]
public class ConstantsNode : AbstractMaterialNode, IGeneratesBodyCode

7
MaterialGraphProject/Assets/NewNodes/Editor/Keep/GradientNode.cs


using System;
using System.Collections.Generic;
using System.Linq;
using UnityEditor.MaterialGraph.Drawing.Controls;
using UnityEngine.Graphing;
using UnityEditor.ShaderGraph.Drawing.Controls;
using UnityEngine;
using UnityEditor.Graphing;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Title("Input/Gradient")]
public class GradientNode : AbstractMaterialNode, IGeneratesBodyCode

5
MaterialGraphProject/Assets/NewNodes/Editor/Keep/HeightToNormalNode.cs


using System.Linq;
using System.Reflection;
using JetBrains.Annotations;
using UnityEngine.Graphing;
using UnityEngine;
using UnityEditor.Graphing;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Title("Utility/Heightmap To Normalmap")]
public class HeightToNormalNode : AbstractMaterialNode, IGeneratesBodyCode, IMayRequireMeshUV

5
MaterialGraphProject/Assets/NewNodes/Editor/Keep/LightProbeNode.cs


using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using UnityEngine;
using UnityEngine.Graphing;
using UnityEditor.Graphing;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Title("Input/Scene Data/Light Probe")]
public class LightProbeNode : CodeFunctionNode

5
MaterialGraphProject/Assets/NewNodes/Editor/Keep/ParallaxNode.cs


using UnityEngine.Graphing;
using UnityEngine;
using UnityEditor.Graphing;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Title("UV/Parallax")]

3
MaterialGraphProject/Assets/NewNodes/Editor/Keep/RadialShearNode.cs


using System.Reflection;
using UnityEngine;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Title("UV/RadialShearNode")]
public class RadialShearNode : CodeFunctionNode

3
MaterialGraphProject/Assets/NewNodes/Editor/Keep/RandomRangeNode.cs


using System.Reflection;
using UnityEngine;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Title("Math/Range/RandomRange")]
public class RandomRangeNode : CodeFunctionNode

2
MaterialGraphProject/Assets/NewNodes/Editor/Keep/ReciprocalSqrtNode.cs


using System.Reflection;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Title("Math/Advanced/Reciprocal Square Root")]
public class ReciprocalSqrtNode : CodeFunctionNode

5
MaterialGraphProject/Assets/NewNodes/Editor/Keep/ReflectionProbeNode.cs


using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using UnityEngine;
using UnityEngine.Graphing;
using UnityEditor.Graphing;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Title("Input/Scene Data/Reflection Probe")]
public class ReflectionProbeNode : CodeFunctionNode

7
MaterialGraphProject/Assets/NewNodes/Editor/Keep/SamplerStateNode.cs


using System;
using UnityEditor.MaterialGraph.Drawing.Controls;
using UnityEngine.Graphing;
using UnityEditor.ShaderGraph.Drawing.Controls;
using UnityEngine;
using UnityEditor.Graphing;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Title("Input/Texture/Sampler State")]
public class SamplerStateNode : AbstractMaterialNode

3
MaterialGraphProject/Assets/NewNodes/Editor/Keep/ScaleOffsetNode.cs


using System.Reflection;
using UnityEngine;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Title("UV/ScaleOffset")]
public class ScaleOffsetNode : CodeFunctionNode

3
MaterialGraphProject/Assets/NewNodes/Editor/Keep/TangentToWorldNode.cs


using System.Reflection;
using UnityEngine;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Title("Math/Vector/TangentToWorld")]
public class TangentToWorldNode : CodeFunctionNode

5
MaterialGraphProject/Assets/NewNodes/Editor/Keep/TextureSamplerNode.cs


using System.Linq;
using System.Reflection;
using UnityEngine.Graphing;
using UnityEngine;
using UnityEditor.Graphing;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Title("Texture/Sample 2D")]
public class Sample2DTexture : AbstractMaterialNode, IGeneratesBodyCode, IMayRequireMeshUV

7
MaterialGraphProject/Assets/NewNodes/Editor/Keep/TransformNode.cs


using UnityEngine.Graphing;
using UnityEditor.Graphing;
using UnityEditor.MaterialGraph.Drawing.Controls;
using UnityEditor.ShaderGraph.Drawing.Controls;
using UnityEngine;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Title("Math/Vector/Transform")]
public class TransformNode : AbstractMaterialNode, IGeneratesBodyCode, IMayRequireTangent, IMayRequireBitangent, IMayRequireNormal

4
MaterialGraphProject/Assets/NewNodes/Editor/Keep/UVTriPlanar.cs


using UnityEngine.Graphing;
using UnityEditor.Graphing;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
/* [Title("UV/Tri-Planar Mapping")]
public class UVTriPlanar : FunctionNInNOut, IGeneratesFunction, IMayRequireNormal, IMayRequireWorldPosition

3
MaterialGraphProject/Assets/NewNodes/Editor/Kill/AACheckerBoard3dNode.cs


using System.Reflection;
using UnityEngine;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Title("Procedural/AACheckerboard3d")]
public class AACheckerboard3dNode : CodeFunctionNode

3
MaterialGraphProject/Assets/NewNodes/Editor/Kill/AACheckerBoardNode.cs


using System.Reflection;
using UnityEngine;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Title("Procedural/AACheckerboard")]
public class AACheckerboardNode : CodeFunctionNode

5
MaterialGraphProject/Assets/NewNodes/Editor/Kill/MultiLayerParallaxNode.cs


using UnityEngine.Graphing;
using UnityEngine;
using UnityEditor.Graphing;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Title("UV/MultiLayerParallax")]
public class MultiLayerParallaxNode : AbstractMaterialNode, IGeneratesBodyCode, IGeneratesFunction, IMayRequireMeshUV, IMayRequireViewDirection

3
MaterialGraphProject/Assets/NewNodes/Editor/Kill/POMNode.cs


using System.Reflection;
using UnityEngine;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Title("UV/ParallaxOcclusionMapping")]
public class ParallaxOcclusionMappingNode : CodeFunctionNode

4
MaterialGraphProject/Assets/NewNodes/Editor/Kill/ScatterNode.cs


using UnityEngine.Graphing;
using UnityEditor.Graphing;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
/* [Title("Procedural/Scatter")]
public class ScatterNode : FunctionNInNOut, IGeneratesFunction

3
MaterialGraphProject/Assets/NewNodes/Editor/Kill/SphereWarpNode.cs


using System.Reflection;
using UnityEngine;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Title("UV/SphereWarpNode")]
public class SphereWarpNode : CodeFunctionNode

4
MaterialGraphProject/Assets/NewNodes/Editor/Kill/SphericalIndentationNode.cs


using System.Reflection;
using UnityEngine;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Title("UV/SphericalIndentation")]
public class SphericalIndentationNode : CodeFunctionNode

4
MaterialGraphProject/Assets/NewNodes/Editor/Kill/ToggleNode.cs


using UnityEngine.Graphing;
using UnityEditor.Graphing;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
/* [Title("Input/Toggle")]
public class ToggleNode : PropertyNode, IGeneratesBodyCode

5
MaterialGraphProject/Assets/NewNodes/Editor/Kill/VertexNormalNode.cs


using UnityEngine.Graphing;
using UnityEngine;
using UnityEditor.Graphing;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Title("Input/Geometry/Vertex Normal")]
public class VertexNormalNode : AbstractMaterialNode

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/AssetCallbacks/CreateLayeredShaderGraph.cs


using System.IO;
using UnityEditor.ProjectWindowCallback;
using UnityEngine.MaterialGraph;
using UnityEditor.ShaderGraph;
namespace UnityEditor.MaterialGraph
namespace UnityEditor.ShaderGraph
{
public class CreateLayeredShaderGraph : EndNameEditAction
{

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/AssetCallbacks/CreateRemapGraph.cs


using System.IO;
using UnityEditor.ProjectWindowCallback;
using UnityEngine.MaterialGraph;
using UnityEditor.ShaderGraph;
namespace UnityEditor.MaterialGraph
namespace UnityEditor.ShaderGraph
{
public class CreateRemapGraph : EndNameEditAction
{

6
MaterialGraphProject/Assets/UnityShaderEditor/Editor/AssetCallbacks/CreateShaderGraph.cs


using System.IO;
using UnityEditor.ProjectWindowCallback;
using UnityEngine.MaterialGraph;
using UnityEditor.ShaderGraph;
namespace UnityEditor.MaterialGraph
namespace UnityEditor.ShaderGraph
{
public class CreateShaderGraph : EndNameEditAction
{

public override void Action(int instanceId, string pathName, string resourceFile)
{
var graph = new UnityEngine.MaterialGraph.MaterialGraph();
var graph = new ShaderGraph.MaterialGraph();
graph.AddNode(new LightweightMetallicMasterNode());
File.WriteAllText(pathName, EditorJsonUtility.ToJson(graph));
AssetDatabase.Refresh();

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/AssetCallbacks/CreateShaderSubGraph.cs


using System.IO;
using UnityEditor.ProjectWindowCallback;
using UnityEngine.MaterialGraph;
using UnityEditor.ShaderGraph;
namespace UnityEditor.MaterialGraph
namespace UnityEditor.ShaderGraph
{
public class CreateShaderSubGraph : EndNameEditAction
{

41
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/AbstractMaterialGraph.cs


using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine.Graphing;
using UnityEngine;
using UnityEditor.Graphing;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Serializable]
public abstract class AbstractMaterialGraph : SerializableGraph, IGenerateProperties

[SerializeField]
List<SerializationHelper.JSONSerializedElement> m_SerializedProperties = new List<SerializationHelper.JSONSerializedElement>();
[NonSerialized]
List<IShaderProperty> m_AddedProperties = new List<IShaderProperty>();
[NonSerialized]
List<Guid> m_RemovedProperties = new List<Guid>();
public IEnumerable<IShaderProperty> properties
{

public IEnumerable<IShaderProperty> addedProperties
{
get { return m_AddedProperties; }
}
public IEnumerable<Guid> removedProperties
{
get { return m_RemovedProperties; }
}
public override void ClearChanges()
{
base.ClearChanges();
m_AddedProperties.Clear();
m_RemovedProperties.Clear();
}
public override void AddNode(INode node)
{
if (node is AbstractMaterialNode)

return;
m_Properties.Add(property);
NotifyChange(new ShaderPropertyAdded(property));
m_AddedProperties.Add(property);
NotifyChange(new ShaderPropertyRemoved(guid));
m_RemovedProperties.Add(guid);
}
public override Dictionary<SerializationHelper.TypeSerializationInfo, SerializationHelper.TypeSerializationInfo> GetLegacyTypeRemapping()

{
fullName = "UnityEngine.MaterialGraph.ViewDirectionNode",
assemblyName = "Assembly-CSharp"
fullName = "UnityEngine.MaterialGraph.ViewDirectionNode"
fullName = "UnityEngine.MaterialGraph.NormalNode",
assemblyName = "Assembly-CSharp"
fullName = "UnityEngine.MaterialGraph.NormalNode"
fullName = "UnityEngine.MaterialGraph.WorldPosNode",
assemblyName = "Assembly-CSharp"
fullName = "UnityEngine.MaterialGraph.WorldPosNode"
};
result[worldPosNode] = SerializationHelper.GetTypeSerializableAsString(typeof(PositionNode));

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/AbstractMaterialGraphAsset.cs


using System.Linq;
using UnityEngine.Graphing;
using UnityEditor.Graphing;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
}

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/AbstractShaderProperty.cs


using System;
using UnityEngine;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Serializable]
public abstract class AbstractShaderProperty<T> : IShaderProperty

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/ColorShaderProperty.cs


using System;
using System.Text;
using UnityEngine;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Serializable]
public class ColorShaderProperty : AbstractShaderProperty<Color>

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/FloatShaderProperty.cs


using System;
using System.Text;
using UnityEngine;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Serializable]
public class FloatShaderProperty : AbstractShaderProperty<float>

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/IMaterialGraphAsset.cs


using UnityEngine.Graphing;
using UnityEditor.Graphing;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
}

2
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/IShaderGraph.cs


using System.Collections.Generic;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
public interface IShaderGraph
{

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/IShaderProperty.cs


using System;
using UnityEngine;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
public interface IShaderProperty
{

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/MaterialGraph.cs


using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine.Graphing;
using UnityEditor.Graphing;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Serializable]
public class MaterialGraph : AbstractMaterialGraph, IShaderGraph

6
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/MaterialGraphAsset.cs


using UnityEngine;
using UnityEngine.Graphing;
using UnityEditor.Graphing;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
public class MaterialGraphAsset
{

11
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/MaterialSlot.cs


using System;
using UnityEngine.Graphing;
using UnityEngine;
using UnityEditor.Graphing;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Serializable]
public abstract class MaterialSlot : SerializableSlot

ShaderStage m_ShaderStage;
private bool m_HasError;
protected MaterialSlot() { }
protected MaterialSlot(int slotId, string displayName, string shaderOutputName, SlotType slotType, ShaderStage shaderStage = ShaderStage.Dynamic, bool hidden = false)

public string RawDisplayName()
{
return displayName;
return base.displayName;
public static MaterialSlot CreateMaterialSlot(SlotValueType type, int slotId, string displayName, string shaderOutputName, SlotType slotType, Vector4 defaultValue, ShaderStage shaderStage = ShaderStage.Dynamic, bool hidden = false)
{
switch (type)

2
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/Precision.cs


namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
public enum Precision
{

2
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/PreviewMode.cs


namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
public enum PreviewMode
{

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/PreviewProperty.cs


namespace UnityEngine.MaterialGraph
using UnityEngine;
namespace UnityEditor.ShaderGraph
{
public class PreviewProperty
{

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/SamplerStateShaderProperty.cs


using System;
using UnityEngine;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
class SamplerStateShaderProperty : AbstractShaderProperty<TextureSamplerState>
{

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/SerializableGuid.cs


using System;
using UnityEngine;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Serializable]
public class SerializableGuid : ISerializationCallbackReceiver

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/SerializableTexture.cs


using System;
using UnityEditor;
using UnityEngine;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Serializable]
public class SerializableTexture

2
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/ShaderGraphRequirements.cs


using System.Collections.Generic;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
public struct ShaderGraphRequirements
{

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/TextureSamplerState.cs


namespace UnityEngine.MaterialGraph
using UnityEngine;
namespace UnityEditor.ShaderGraph
{
public class TextureSamplerState
{

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/TextureShaderProperty.cs


using System;
using System.Text;
using UnityEngine;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Serializable]
public class TextureShaderProperty : AbstractShaderProperty<SerializableTexture>

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/Vector2ShaderProperty.cs


using System;
using UnityEngine;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Serializable]
public class Vector2ShaderProperty : VectorShaderProperty

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/Vector3ShaderProperty.cs


using System;
using UnityEngine;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Serializable]
public class Vector3ShaderProperty : VectorShaderProperty

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/Vector4ShaderProperty.cs


using System;
using UnityEngine;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Serializable]
public class Vector4ShaderProperty : VectorShaderProperty

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/VectorShaderProperty.cs


using System;
using System.Text;
using UnityEngine;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Serializable]
public abstract class VectorShaderProperty : AbstractShaderProperty<Vector4>

2
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Interfaces/GenerationMode.cs


namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
public enum GenerationMode
{

2
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Interfaces/IGenerateProperties.cs


namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
public interface IGenerateProperties
{

2
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Interfaces/IGeneratesBodyCode.cs


namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
public interface IGeneratesBodyCode
{

2
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Interfaces/IGeneratesFunction.cs


namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
public interface IGeneratesFunction
{

2
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Interfaces/IMayRequireNormal.cs


namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
public interface IMayRequireNormal
{

2
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Interfaces/IMayRequireTime.cs


namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
public interface IMayRequireTime
{

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Interfaces/MaterialGraphChange.cs


using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine.Graphing;
using UnityEditor.Graphing;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
public class ShaderPropertyAdded : GraphChange
{

2
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Interfaces/NeededCoordinateSpace.cs


using System;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Flags]
public enum NeededCoordinateSpace

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/LightweightPipeline/AbstractLightweightMasterNode.cs


using System.Collections.Generic;
using System.IO;
using System.Linq;
using UnityEngine.Graphing;
using UnityEditor.Graphing;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
public abstract class AbstractLightweightMasterNode : MasterNode
{

2
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/LightweightPipeline/AbstractLightweightPBRMasterNode.cs


using System;
using System.Linq;
namespace UnityEngine.MaterialGraph
namespace UnityEditor.ShaderGraph
{
[Serializable]
public abstract class AbstractLightweightPBRMasterNode : AbstractLightweightMasterNode

部分文件因为文件数量过多而无法显示

正在加载...
取消
保存