暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

GenericEditorClickButtonEvent.cs 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using System;
  2. namespace UnityEditor.Purchasing
  3. {
  4. internal class GenericEditorClickButtonEvent : IEditorAnalyticsEvent
  5. {
  6. readonly string m_Component;
  7. readonly string m_Tool;
  8. readonly string m_Action;
  9. readonly string m_Option;
  10. internal GenericEditorClickButtonEvent(string component, string tool, string action, string option)
  11. {
  12. m_Component = component;
  13. m_Tool = tool;
  14. m_Action = action;
  15. m_Option = option;
  16. }
  17. public virtual EditorAnalyticsDataSignature GetSignature()
  18. {
  19. return SignatureDefinitions.k_EditorClickButtonSignature;
  20. }
  21. [Serializable]
  22. public struct GenericEditorClickButtonParams
  23. {
  24. //Important: These param names come from the DevEx core. Do not change/add/remove them until this event changes version
  25. public string action;
  26. public string tool;
  27. public string component;
  28. public string option;
  29. public string platform;
  30. }
  31. public object CreateEventParams(string platformName, string packageKey)
  32. {
  33. return new GenericEditorClickButtonParams
  34. {
  35. action = m_Action,
  36. tool = m_Tool,
  37. component = m_Component,
  38. option = m_Option,
  39. platform = platformName
  40. };
  41. }
  42. }
  43. }