예제 #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)));
 }