summaryrefslogtreecommitdiff
path: root/Assets/ThirdParty/AmplifyShaderEditor/Plugins/Editor/Templates/TemplateLocalVarData.cs
blob: 3cde2f03e47f2f7f62f2142c8cfd2bc1cfa90587 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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; } }
	}
}