AssetBundleGraph.ConnectionPointData.UpdateRegion C# (CSharp) Method

UpdateRegion() public method

public UpdateRegion ( NodeGUI node, int index, int max ) : void
node NodeGUI
index int
max int
return void
        public void UpdateRegion(NodeGUI node, int index, int max)
        {
            var parentRegion = node.Region;
            if(IsInput){

                var initialY = (AssetBundleGraphGUISettings.NODE_BASE_HEIGHT - AssetBundleGraphGUISettings.INPUT_POINT_HEIGHT) / 2f;
                var marginY  = initialY + AssetBundleGraphGUISettings.FILTER_OUTPUT_SPAN * (index);

                buttonRect = new Rect(
                    0,
                    marginY,
                    AssetBundleGraphGUISettings.INPUT_POINT_WIDTH,
                    AssetBundleGraphGUISettings.INPUT_POINT_HEIGHT);
            } else {

                var initialY = (AssetBundleGraphGUISettings.NODE_BASE_HEIGHT - AssetBundleGraphGUISettings.OUTPUT_POINT_HEIGHT) / 2f;
                var marginY  = initialY + AssetBundleGraphGUISettings.FILTER_OUTPUT_SPAN * (index);

                buttonRect = new Rect(
                    parentRegion.width - AssetBundleGraphGUISettings.OUTPUT_POINT_WIDTH + 1f,
                    marginY,
                    AssetBundleGraphGUISettings.OUTPUT_POINT_WIDTH,
                    AssetBundleGraphGUISettings.OUTPUT_POINT_HEIGHT);
            }
        }