Beispiel #1
0
        public override void OnRebuildRequested()
        {
            // After a Font asset gets re-imported the managed side gets deleted and recreated,
            // that means the delegates are not persisted.
            // so we need to properly enforce a consistent state here.
            FontUpdateTracker.UntrackText(this);
            FontUpdateTracker.TrackText(this);

            // Also the textgenerator is no longer valid.
            cachedTextGenerator.Invalidate();

            base.OnRebuildRequested();
        }
Beispiel #2
0
 protected override void OnEnable()
 {
     base.OnEnable();
     cachedTextGenerator.Invalidate();
     FontUpdateTracker.TrackText(this);
 }