protected override void SetValue()
 {
     if (TargetTMPText != null)
     {
         TargetTMPText.SetLocalizedText(Texts[State]);
     }
     if (TargetText != null)
     {
         TargetText.SetLocalizedText(Texts[State]);
     }
 }
Ejemplo n.º 2
0
        protected override void Start()
        {
            base.Start();
            _label.text = $"{Plugin.DisplayName} (v{Plugin.GetVersion()})";
            _descriptionLabel.SetLocalizedText(Plugin.Description);

            _toggle.OnValueChangedAsObservable()
            .Where(state => state)
            .Subscribe(_ => PluginsLoader.EnablePlugin(Plugin));
            _toggle.OnValueChangedAsObservable()
            .Where(state => !state)
            .Subscribe(_ => PluginsLoader.DisablePlugin(Plugin));
        }
Ejemplo n.º 3
0
        private void Update()
        {
            bool isUpdated = UpdateValue(ref PointsCount, PointCloudRenderer.ItemsCount);

            isUpdated = isUpdated || UpdateValue(ref LinesCount, LineCloudRenderer.ItemsCount);
            isUpdated = isUpdated || UpdateValue(ref InfinitePlanesCount, InfinitePlaneCloudRenderer.ItemsCount);
            isUpdated = isUpdated || UpdateValue(ref ObservationsCount, ObservationCloudRenderer.ItemsCount);
            isUpdated = isUpdated || UpdateValue(ref TrackedObjectsCount, TrackedObjectCloud.ItemsCount);

            if (isUpdated)
            {
                _label.SetLocalizedText("Scene info", PointsCount, LinesCount, InfinitePlanesCount, ObservationsCount,
                                        TrackedObjectsCount);
            }
        }
Ejemplo n.º 4
0
 public void OnPointerEnter(PointerEventData eventData)
 {
     _isActive = true;
     _tooltip.SetActive(_isActive);
     _label.SetLocalizedText(TooltipText);
 }