示例#1
0
        private bool ExternalPropertiesSection()
        {
            bool result = false;

            RectTransform barRectTransform = m_BarRectTransform.objectReferenceValue as RectTransform;

            if (barRectTransform != null)
            {
                if (InspectorFields.GraphicColorField("Bar", barRectTransform.GetComponent <Graphic>()))
                {
                    result = true;
                }
            }

            Image backgroundImage = m_BackgroundImage.objectReferenceValue as Image;

            if (backgroundImage != null)
            {
                if (InspectorFields.GraphicColorField("Background", backgroundImage))
                {
                    result = true;
                }
            }

            return(result);
        }
示例#2
0
        private bool ExternalPropertiesSection()
        {
            RectTransform circleRectTransformValue = m_CircleRectTransform.objectReferenceValue as RectTransform;

            if (circleRectTransformValue == null)
            {
                return(false);
            }
            if (circleRectTransformValue.childCount == 0)
            {
                return(false);
            }

            return(InspectorFields.GraphicColorField("Circle", circleRectTransformValue.GetChild(0).GetComponent <Graphic>()));
        }
        private bool ExternalPropertiesSection()
        {
            var result = false;

            var barRectTransform = m_BarRectTransform.objectReferenceValue as RectTransform;

            if (barRectTransform != null)
            {
                Utils.SetBoolValueIfTrue(ref result,
                                         InspectorFields.GraphicColorField("Bar", barRectTransform.GetComponent <Graphic>()));
            }

            var backgroundImage = m_BackgroundImage.objectReferenceValue as Image;

            if (backgroundImage != null)
            {
                Utils.SetBoolValueIfTrue(ref result, InspectorFields.GraphicColorField("Background", backgroundImage));
            }

            return(result);
        }