You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.8 KiB

  1. using System;
  2. using UnityEngine;
  3. namespace AmplifyShaderEditor
  4. {
  5. [Serializable]
  6. public class TemplateLocalVarData
  7. {
  8. [SerializeField]
  9. private WirePortDataType m_dataType = WirePortDataType.OBJECT;
  10. [SerializeField]
  11. private string m_localVarName = string.Empty;
  12. [SerializeField]
  13. private int m_position = -1;
  14. [SerializeField]
  15. private bool m_isSpecialVar = false;
  16. [SerializeField]
  17. private TemplateInfoOnSematics m_specialVarType;
  18. [SerializeField]
  19. private MasterNodePortCategory m_category;
  20. [SerializeField]
  21. private string m_id;
  22. public TemplateLocalVarData( WirePortDataType dataType, MasterNodePortCategory category, string localVarName, int position )
  23. {
  24. m_dataType = dataType;
  25. m_localVarName = localVarName;
  26. m_position = position;
  27. m_category = category;
  28. //Debug.Log( m_localVarName + " " + m_inputData.PortCategory + " " + m_inputData.PortName );
  29. }
  30. public TemplateLocalVarData( TemplateInfoOnSematics specialVarType,string id, WirePortDataType dataType, MasterNodePortCategory category, string localVarName, int position )
  31. {
  32. m_id = id;
  33. m_dataType = dataType;
  34. m_localVarName = localVarName;
  35. m_position = position;
  36. m_specialVarType = specialVarType;
  37. m_isSpecialVar = true;
  38. m_category = category;
  39. //Debug.Log( m_localVarName + " " + m_inputData.PortCategory + " " + m_inputData.PortName );
  40. }
  41. public WirePortDataType DataType { get { return m_dataType; } }
  42. public string LocalVarName { get { return m_localVarName; } }
  43. public int Position { get { return m_position; } }
  44. public bool IsSpecialVar { get { return m_isSpecialVar; } }
  45. public TemplateInfoOnSematics SpecialVarType{ get { return m_specialVarType; } }
  46. public MasterNodePortCategory Category { get { return m_category; } }
  47. public string Id { get { return m_id; } }
  48. }
  49. }