Exemplo n.º 1
0
        private void HandleLabelSystemAxisSetRemoved(AxisLabelSet axisLabelSet)
        {
            var axisSetView = AxisSetViews.FirstOrDefault(e => e.AxisLabelSet == axisLabelSet);

            if (axisSetView == null)
            {
                return;
            }


            axisSetView.BoundsChanged -= HandleAxisSetViewBoundsChanged;


            Destroy(axisSetView.gameObject);


            AxisSetViews.Remove(axisSetView);


            BoundsChanged();
        }
Exemplo n.º 2
0
        private void HandleLabelSystemAxisSetAdded(AxisLabelSet axisLabelSet)
        {
            var axisSetViewGo = Instantiate(AxisSetViewPrefab);
            var axisSetView   = axisSetViewGo.GetComponent <AxisSetViewBehaviour>( );

            axisSetView.SchemaProvider = SchemaProvider;
            axisSetView.AxisLabelSet   = axisLabelSet;

            var headerText = axisSetViewGo.GetComponentInChildren <Text>( );

            headerText.text = "Axis Settings:";


            axisSetView.BoundsChanged += HandleAxisSetViewBoundsChanged;


            axisSetViewGo.transform.SetParent(AxisSetAttachmentPoint.transform, false);


            AxisSetViews.Add(axisSetView);


            BoundsChanged();
        }