public static Validation.ValidationResult Validate(string filePath) { Guard.FilePathMustExist(filePath, nameof(filePath)); var context = ReadContext.CreateFromFile(filePath); return(context.Validate(filePath)); }
/// <summary> /// Reads a <see cref="MODEL"/> instance from a path pointing to a GLB or a GLTF file /// </summary> /// <param name="filePath">A valid file path.</param> /// <param name="settings">Optional settings.</param> /// <returns>A <see cref="MODEL"/> instance.</returns> public static MODEL Load(string filePath, ReadSettings settings = null) { Guard.FilePathMustExist(filePath, nameof(filePath)); var context = ReadContext .CreateFromFile(filePath) .WithSettingsFrom(settings); using (var s = File.OpenRead(filePath)) { return(context.ReadSchema2(s)); } }