예제 #1
0
        public override void ModifyMaterial(Material newMaterial, Graphic graphic)
        {
            var connector = GraphicConnector.FindConnector(graphic);

            newMaterial.shader = connector.FindShader("UIShiny");
            paramTex.RegisterMaterial(newMaterial);
        }
예제 #2
0
        public static GraphicConnector FindConnector(Graphic graphic)
        {
            if (!graphic)
            {
                return(s_EmptyConnector);
            }

            var type = graphic.GetType();
            GraphicConnector connector = null;

            if (s_ConnectorMap.TryGetValue(type, out connector))
            {
                return(connector);
            }

            foreach (var c in s_Connectors)
            {
                if (!c.IsValid(graphic))
                {
                    continue;
                }

                s_ConnectorMap.Add(type, c);
                return(c);
            }

            return(s_EmptyConnector);
        }
예제 #3
0
        public override void ModifyMaterial(Material newMaterial, Graphic graphic)
        {
            var connector = GraphicConnector.FindConnector(graphic);

            newMaterial.shader = Shader.Find(string.Format("Hidden/{0} (UIShiny)", newMaterial.shader.name));
            paramTex.RegisterMaterial(newMaterial);
        }
예제 #4
0
        public override void ModifyMaterial(Material newMaterial, Graphic graphic)
        {
            var connector = GraphicConnector.FindConnector(graphic);

            newMaterial.shader = Shader.Find(string.Format("Hidden/{0} (UIEffect)", newMaterial.shader.name));
            SetShaderVariants(newMaterial, m_EffectMode, m_ColorMode, m_BlurMode,
                              m_AdvancedBlur ? BlurEx.Ex : BlurEx.None);

            paramTex.RegisterMaterial(newMaterial);
        }
예제 #5
0
        public override void ModifyMaterial(Material newMaterial, Graphic graphic)
        {
            var connector = GraphicConnector.FindConnector(graphic);

            newMaterial.shader = connector.FindShader("UIDissolve");
            SetShaderVariants(newMaterial, m_ColorMode);

            newMaterial.SetTexture(k_TransitionTexId, transitionTexture);
            paramTex.RegisterMaterial(newMaterial);
        }
예제 #6
0
        public override void ModifyMaterial(Material newMaterial, Graphic graphic)
        {
            var connector = GraphicConnector.FindConnector(graphic);

            newMaterial.shader = Shader.Find(string.Format("Hidden/{0} (UIDissolve)", newMaterial.shader.name));
            SetShaderVariants(newMaterial, m_ColorMode);

            newMaterial.SetTexture(k_TransitionTexId, transitionTexture);
            paramTex.RegisterMaterial(newMaterial);
        }
예제 #7
0
        public override void ModifyMaterial(Material newMaterial, Graphic graphic)
        {
            var connector = GraphicConnector.FindConnector(graphic);

            newMaterial.shader = connector.FindShader("UIEffect");
            SetShaderVariants(newMaterial, m_EffectMode, m_ColorMode, m_BlurMode,
                              m_AdvancedBlur ? BlurEx.Ex : BlurEx.None);

            paramTex.RegisterMaterial(newMaterial);
        }
예제 #8
0
 protected static void AddConnector(GraphicConnector connector)
 {
     s_Connectors.Add(connector);
     s_Connectors.Sort((x, y) => y.priority - x.priority);
 }