No Description
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.

UnitOptionRow.cs 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using System;
  2. using Unity.VisualScripting.Dependencies.Sqlite;
  3. namespace Unity.VisualScripting
  4. {
  5. public sealed class UnitOptionRow
  6. {
  7. [AutoIncrement, PrimaryKey]
  8. public int id { get; set; }
  9. public string sourceScriptGuids { get; set; }
  10. public string optionType { get; set; }
  11. public string unitType { get; set; }
  12. public string labelHuman { get; set; }
  13. public string labelProgrammer { get; set; }
  14. public string category { get; set; }
  15. public int order { get; set; }
  16. public string haystackHuman { get; set; }
  17. public string haystackProgrammer { get; set; }
  18. public string favoriteKey { get; set; }
  19. public string tag1 { get; set; }
  20. public string tag2 { get; set; }
  21. public string tag3 { get; set; }
  22. public string unit { get; set; }
  23. public int controlInputCount { get; set; }
  24. public int controlOutputCount { get; set; }
  25. public string valueInputTypes { get; set; }
  26. public string valueOutputTypes { get; set; }
  27. public IUnitOption ToOption()
  28. {
  29. using (ProfilingUtility.SampleBlock("Row to option"))
  30. {
  31. var optionType = Codebase.DeserializeType(this.optionType);
  32. IUnitOption option;
  33. option = (IUnitOption)Activator.CreateInstance(optionType);
  34. option.Deserialize(this);
  35. return option;
  36. }
  37. }
  38. }
  39. }