浏览代码
Extracted common parts of MaterialGraphAsset, MaterialRemapAsset and MaterialSubGraphAsset into abstract class
/main
Extracted common parts of MaterialGraphAsset, MaterialRemapAsset and MaterialSubGraphAsset into abstract class
/main
Peter Bay Bastian
8 年前
当前提交
0d1c4d7e
共有 5 个文件被更改,包括 51 次插入 和 75 次删除
-
27MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Graphs/MaterialGraphAsset.cs
-
27MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Remapper/MaterialRemapAsset.cs
-
27MaterialGraphProject/Assets/UnityShaderEditor/Runtime/SubGraph/MaterialSubGraphAsset.cs
-
33MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Graphs/AbstractMaterialGraphAsset.cs
-
12MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Graphs/AbstractMaterialGraphAsset.cs.meta
|
|||
using System.Linq; |
|||
using UnityEngine.Graphing; |
|||
|
|||
namespace UnityEngine.MaterialGraph |
|||
{ |
|||
public abstract class AbstractMaterialGraphAsset : ScriptableObject, IMaterialGraphAsset |
|||
{ |
|||
public abstract IGraph graph { get; } |
|||
|
|||
public bool shouldRepaint |
|||
{ |
|||
get { return graph.GetNodes<AbstractMaterialNode>().OfType<IRequiresTime>().Any(); } |
|||
} |
|||
|
|||
public ScriptableObject GetScriptableObject() |
|||
{ |
|||
return this; |
|||
} |
|||
|
|||
public void OnEnable() |
|||
{ |
|||
graph.OnEnable(); |
|||
} |
|||
|
|||
[SerializeField] |
|||
private GraphDrawingData m_DrawingData = new GraphDrawingData(); |
|||
|
|||
public GraphDrawingData drawingData |
|||
{ |
|||
get { return m_DrawingData; } |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: f69ae4bd132ba4c4990a5f2ec28e5932 |
|||
timeCreated: 1482920380 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue