Ejemplo n.º 1
0
        public override void Prewarm()
        {
            filter = filter ?? UnitOptionFilter.Any;

            try
            {
                options = new HashSet <IUnitOption>(UnitBase.Subset(filter, reference));
            }
            catch (Exception ex)
            {
                Debug.LogError($"Failed to fetch unit options for fuzzy finder (error log below).\nTry rebuilding the unit options from 'Tools > Bolt > Build Unit Options'.\n\n{ex}");
                options = new HashSet <IUnitOption>();
            }

            typesWithMembers = new HashSet <Type>();

            foreach (var option in options)
            {
                if (option is IMemberUnitOption memberUnitOption && memberUnitOption.targetType != null)
                {
                    typesWithMembers.Add(memberUnitOption.targetType);
                }
            }
        }
 private static void UpdateUnitOptions()
 {
     UnitBase.Update();
 }
 private static void BuildUnitOptions()
 {
     UnitBase.Build();
 }
Ejemplo n.º 4
0
 protected MemberUnitOption(TMemberUnit unit) : base(unit)
 {
     sourceScriptGuids = UnitBase.GetScriptGuids(unit.member.targetType).ToHashSet();
 }
Ejemplo n.º 5
0
        protected override void Complete()
        {
            UnitBase.Build();

            base.Complete();
        }
Ejemplo n.º 6
0
 public override void Run()
 {
     UnitBase.Build();
 }
Ejemplo n.º 7
0
 public ExposeOption(Expose unit) : base(unit)
 {
     sourceScriptGuids = UnitBase.GetScriptGuids(unit.type).ToHashSet();
 }
Ejemplo n.º 8
0
 public LiteralOption(Literal unit) : base(unit)
 {
     sourceScriptGuids = UnitBase.GetScriptGuids(unit.type).ToHashSet();
 }