private void LoadModel(Tile tile, Model model, Func <Rule, IModelBuilder, IGameObject> func) { var zoomLevel = ZoomHelper.GetZoomLevel(tile.RenderMode); var rule = _stylesheet.GetModelRule(model, zoomLevel); if (rule.IsApplicable && ShouldUseBuilder(tile, rule, model)) { try { foreach (var modelBuilder in rule.GetModelBuilders(_customizationService)) { var gameObject = func(rule, modelBuilder); AttachBehaviours(gameObject, rule, model); } } catch (Exception ex) { Trace.Error(LogCategory, ex, Strings.UnableToLoadModel, model.ToString()); } } }