示例#1
0
 public void AddMat(string _strName, MatManager.MatCacheItem _mat)
 {
     if (!m_dicMat.ContainsKey(_strName))
     {
         m_dicMat.Add(_strName, _mat);
     }
 }
示例#2
0
    public void AddObjAndMat(GameObject _obj, MatManager.MatCacheItem _mat)
    {
        if (m_dicObjAndMat.ContainsKey(_obj))
        {
            m_dicObjAndMat.Remove(_obj);
        }

        m_dicObjAndMat.Add(_obj, _mat);
    }
示例#3
0
    public void RecordMatPropName(MatManager.MatCacheItem _mat)
    {
        if (_mat == null)
        {
            return;
        }
        //记录每个subMat的每个属性的描述, 用于面板显示
        string matName = Utils.RemovePostfix_Instance(_mat.Material.name);

        foreach (var ppd in _mat.Material.GetProceduralPropertyDescriptions())
        {
            Mat2ParamName2DesDic.TryAddNoReplace(matName, new Dictionary <string, ProceduralPropertyDescription>());
            Mat2ParamName2DesDic[matName].AddRep(ppd.name, ppd);
        }
    }