Beispiel #1
0
        public static MDLFiles GetInfo(string path)
        {
            List <string> texOutput = new List <string>();
            List <string> dirOutput = new List <string>();

            using (BinaryReader reader = new BinaryReader(File.Open(path, FileMode.Open)))
            {
                Mdl.Read(reader, texOutput, dirOutput);
            }

            return(new MDLFiles
            {
                Paths = dirOutput.ToArray(),
                FileNames = texOutput.ToArray()
            });
        }
Beispiel #2
0
        public static MDLFiles GetInfo(byte[] mdlFile)
        {
            List <string> texOutput = new List <string>();
            List <string> dirOutput = new List <string>();

            using (MemoryStream stream = new MemoryStream(mdlFile))
            {
                using (BinaryReader reader = new BinaryReader(stream))
                {
                    Mdl.Read(reader, texOutput, dirOutput);
                }
            }

            return(new MDLFiles
            {
                Paths = dirOutput.ToArray(),
                FileNames = texOutput.ToArray()
            });
        }