File size: 1,497 Bytes
18a519f | 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 | using System;
using Unity.VisualScripting.Dependencies.Sqlite;
namespace Unity.VisualScripting
{
public sealed class UnitOptionRow
{
[AutoIncrement, PrimaryKey]
public int id { get; set; }
public string sourceScriptGuids { get; set; }
public string optionType { get; set; }
public string unitType { get; set; }
public string labelHuman { get; set; }
public string labelProgrammer { get; set; }
public string category { get; set; }
public int order { get; set; }
public string haystackHuman { get; set; }
public string haystackProgrammer { get; set; }
public string favoriteKey { get; set; }
public string tag1 { get; set; }
public string tag2 { get; set; }
public string tag3 { get; set; }
public string unit { get; set; }
public int controlInputCount { get; set; }
public int controlOutputCount { get; set; }
public string valueInputTypes { get; set; }
public string valueOutputTypes { get; set; }
public IUnitOption ToOption()
{
using (ProfilingUtility.SampleBlock("Row to option"))
{
var optionType = Codebase.DeserializeType(this.optionType);
IUnitOption option;
option = (IUnitOption)Activator.CreateInstance(optionType);
option.Deserialize(this);
return option;
}
}
}
}
|