Example #1
0
        public ModelRoot LoadModel(string gltfFile, ReadSettings settings = null)
        {
            var context = ReadContext
                          .Create(_ReadAsset)
                          .WithSettingsFrom(settings);

            return(context.ReadSchema2(gltfFile));
        }
Example #2
0
        private ModelRoot _LoadGltf2(string gltfFile, ReadSettings settings = null)
        {
            var context = ReadContext
                          .Create(_ReadAsset)
                          .WithSettingsFrom(settings);

            using (var m = new System.IO.MemoryStream())
            {
                using (var s = _Archive.GetEntry(gltfFile).Open())
                {
                    s.CopyTo(m);
                }

                m.Position = 0;

                return(context.ReadSchema2(m));
            }
        }