From b82da95b5181ac8bbae38efb13e950d5e88a4caa Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 23 Oct 2020 13:08:43 +0800 Subject: =?UTF-8?q?*=E7=A7=BB=E5=8A=A8amplify=20shader=20editor=E5=88=B0th?= =?UTF-8?q?ird=20party=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Editor/Templates/TemplateLocalVarData.cs | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Assets/ThirdParty/AmplifyShaderEditor/Plugins/Editor/Templates/TemplateLocalVarData.cs (limited to 'Assets/ThirdParty/AmplifyShaderEditor/Plugins/Editor/Templates/TemplateLocalVarData.cs') diff --git a/Assets/ThirdParty/AmplifyShaderEditor/Plugins/Editor/Templates/TemplateLocalVarData.cs b/Assets/ThirdParty/AmplifyShaderEditor/Plugins/Editor/Templates/TemplateLocalVarData.cs new file mode 100644 index 00000000..3cde2f03 --- /dev/null +++ b/Assets/ThirdParty/AmplifyShaderEditor/Plugins/Editor/Templates/TemplateLocalVarData.cs @@ -0,0 +1,59 @@ +using System; +using UnityEngine; + +namespace AmplifyShaderEditor +{ + [Serializable] + public class TemplateLocalVarData + { + [SerializeField] + private WirePortDataType m_dataType = WirePortDataType.OBJECT; + + [SerializeField] + private string m_localVarName = string.Empty; + + [SerializeField] + private int m_position = -1; + + [SerializeField] + private bool m_isSpecialVar = false; + + [SerializeField] + private TemplateInfoOnSematics m_specialVarType; + + [SerializeField] + private MasterNodePortCategory m_category; + + [SerializeField] + private string m_id; + + public TemplateLocalVarData( WirePortDataType dataType, MasterNodePortCategory category, string localVarName, int position ) + { + m_dataType = dataType; + m_localVarName = localVarName; + m_position = position; + m_category = category; + //Debug.Log( m_localVarName + " " + m_inputData.PortCategory + " " + m_inputData.PortName ); + } + + public TemplateLocalVarData( TemplateInfoOnSematics specialVarType,string id, WirePortDataType dataType, MasterNodePortCategory category, string localVarName, int position ) + { + m_id = id; + m_dataType = dataType; + m_localVarName = localVarName; + m_position = position; + m_specialVarType = specialVarType; + m_isSpecialVar = true; + m_category = category; + //Debug.Log( m_localVarName + " " + m_inputData.PortCategory + " " + m_inputData.PortName ); + } + + public WirePortDataType DataType { get { return m_dataType; } } + public string LocalVarName { get { return m_localVarName; } } + public int Position { get { return m_position; } } + public bool IsSpecialVar { get { return m_isSpecialVar; } } + public TemplateInfoOnSematics SpecialVarType{ get { return m_specialVarType; } } + public MasterNodePortCategory Category { get { return m_category; } } + public string Id { get { return m_id; } } + } +} -- cgit v1.1-26-g67d0