示例#1
0
        /// <summary>
        /// Gets the material.
        /// </summary>
        /// <returns>The material.</returns>
        protected override Material GetMaterial()
        {
            if (isTMPro)
            {
                return(null);
            }

            return(MaterialResolver.GetOrGenerateMaterialVariant(Shader.Find(shaderName), m_ColorMode));
        }
示例#2
0
        /// <summary>
        /// Updates the material.
        /// </summary>
        /// <param name="ignoreInPlayMode">If set to <c>true</c> ignore in play mode.</param>
        protected void UpdateMaterial(bool ignoreInPlayMode)
        {
            if (!this || ignoreInPlayMode && Application.isPlaying)
            {
                return;
            }

            var mat = MaterialResolver.GetOrGenerateMaterialVariant(Shader.Find(shaderName), m_EffectMode, m_ColorMode, m_BlurMode);

            if (m_EffectMaterial != mat)
            {
                material         = null;
                m_EffectMaterial = mat;
                _SetDirty();
            }
        }
示例#3
0
 /// <summary>
 /// Gets the material.
 /// </summary>
 /// <returns>The material.</returns>
 protected override Material GetMaterial()
 {
     return(MaterialResolver.GetOrGenerateMaterialVariant(Shader.Find(shaderName), m_EffectMode, m_ColorMode, m_BlurMode, m_AdvancedBlur ? BlurEx.Ex : BlurEx.None));
 }
示例#4
0
 protected override Material GetMaterial()
 {
     return(MaterialResolver.GetOrGenerateMaterialVariant(Shader.Find(shaderName)));
 }