// SPDX-FileCopyrightText: 2023 Unity Technologies and the glTFast authors
// SPDX-License-Identifier: Apache-2.0
namespace GLTFast.Schema
{
///
/// Metadata about the glTF asset.
///
[System.Serializable]
public class Asset : NamedObject
{
///
/// A copyright message suitable for display to credit the content creator.
///
public string copyright;
///
/// Tool that generated this glTF model. Useful for debugging.
///
public string generator;
///
/// The glTF version.
///
public string version;
///
/// The minimum glTF version that this asset targets.
///
public string minVersion;
internal void GltfSerialize(JsonWriter writer)
{
writer.OpenBrackets();
if (!string.IsNullOrEmpty(version))
{
writer.AddProperty("version", version);
}
if (!string.IsNullOrEmpty(generator))
{
writer.AddPropertySafe("generator", generator);
}
if (!string.IsNullOrEmpty(copyright))
{
writer.AddPropertySafe("copyright", copyright);
}
if (!string.IsNullOrEmpty(minVersion))
{
writer.AddProperty("minVersion", minVersion);
}
writer.Close();
}
}
}