protected override void SetValue() { if (TargetTMPText != null) { TargetTMPText.SetLocalizedText(Texts[State]); } if (TargetText != null) { TargetText.SetLocalizedText(Texts[State]); } }
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)); }
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); } }
public void OnPointerEnter(PointerEventData eventData) { _isActive = true; _tooltip.SetActive(_isActive); _label.SetLocalizedText(TooltipText); }