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(); }
protected override void OnDisable() { FontUpdateTracker.UntrackText(this); base.OnDisable(); }