예제 #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();
 }
예제 #4
0
 protected MemberUnitOption(TMemberUnit unit) : base(unit)
 {
     sourceScriptGuids = UnitBase.GetScriptGuids(unit.member.targetType).ToHashSet();
 }
예제 #5
0
        protected override void Complete()
        {
            UnitBase.Build();

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