示例#1
0
        protected override void Start()
        {
            if (Orientation == NavigationOrientation.None)
            {
                throw new InvalidOperationException(
                          $"SelectionControl is missing orientation value on gameObject {gameObject.ToHierarchyPath()}");
            }

            Views
            .CombineLatest(SelectedIndex, (views, selectedIndex) => new { views, selectedIndex })
            .Subscribe(x => _selectedView.Value = x.views.GetAtOrDefault(x.selectedIndex))
            .AddTo(this);

            SubscribeToUpdateFocusables(SelectedView);
        }