TMP_Asset.cs 966 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using System;
  2. using UnityEngine;
  3. namespace TMPro
  4. {
  5. // Base class inherited by the various TextMeshPro Assets.
  6. [Serializable]
  7. public abstract class TMP_Asset : ScriptableObject
  8. {
  9. /// <summary>
  10. /// Instance ID of the TMP Asset
  11. /// </summary>
  12. public int instanceID
  13. {
  14. get
  15. {
  16. if (m_InstanceID == 0)
  17. m_InstanceID = GetInstanceID();
  18. return m_InstanceID;
  19. }
  20. }
  21. private int m_InstanceID;
  22. /// <summary>
  23. /// HashCode based on the name of the asset.
  24. /// </summary>
  25. public int hashCode;
  26. /// <summary>
  27. /// The material used by this asset.
  28. /// </summary>
  29. public Material material;
  30. /// <summary>
  31. /// HashCode based on the name of the material assigned to this asset.
  32. /// </summary>
  33. public int materialHashCode;
  34. }
  35. }