private void _AddCombineData(ICombineData combineData)
        {
            Material mat = combineData.GetMaterial();

            if (!m_dictMatObjs.ContainsKey(mat))
            {
                m_dictMatObjs.Add(mat, new List <ICombineData>());
            }

            m_dictMatObjs[mat].Add(combineData);
        }
Beispiel #2
0
        public void AddCombineData(ICombineData data)
        {
            if (layer != data.GetLayer())
            {
                Debug.LogErrorFormat("can't add {0}[layer:{1}] to  layer[{2}]:", data.GetName(), data.GetLayer(), layer);
                return;
            }

            if (!data.CanCombine())
            {
                m_lstIgnore.Add(data);
            }
            else
            {
                Material mat = data.GetMaterial();
                if (!m_dictMatCombine.ContainsKey(mat))
                {
                    m_dictMatCombine.Add(mat, new List <ICombineData>());
                }
                m_dictMatCombine[mat].Add(data);
            }
        }