public UnityEngine.Material[] LoadMaterials(MmdUnityConfig config)
        {
            var ret = new UnityEngine.Material[_model.Parts.Length];

            for (var i = 0; i < _model.Parts.Length; i++)
            {
                ret[i] = _materialLoader.LoadMaterial(_model.Parts[i].Material, config);
                //Debug.LogFormat("material {0} render queue {1}", i, ret[i].renderQueue);
            }
            return(ret);
        }
示例#2
0
        public UnityEngine.Material[] LoadModelMaterials(MaterialLoader materialLoader, MMDUnityConfig config, RawMMDModel model)
        {
            var ret = new UnityEngine.Material[model.Parts.Length];

            for (var i = 0; i < model.Parts.Length; i++)
            {
                ret[i]      = materialLoader.LoadMaterial(model.Parts[i].Material, config);
                ret[i].name = model.Parts[i].Material.Name;
            }
            return(ret);
        }