Exemple #1
0
    void OnEnable()
    {
        if (srcMaterial == null)
        {
            enabled = false;
            Debuger.ErrorLog("srcMaterial == null! name:{0}", name);
            return;
        }

        if (m_animBase == null)
        {
            m_animBase = GetComponents <MaterialAnimBase>();
            copy_mat   = new Material(srcMaterial);
        }
    }