Files
AR-Menu/Library/PackageCache/com.unity.cloud.gltfast@db5a82ec0b47/Runtime/Scripts/Schema/NamedObject.cs
2025-11-30 08:35:03 +02:00

28 lines
618 B
C#

// SPDX-FileCopyrightText: 2023 Unity Technologies and the glTFast authors
// SPDX-License-Identifier: Apache-2.0
namespace GLTFast.Schema
{
/// <summary>
/// Base class for anything with a name property
/// </summary>
[System.Serializable]
public abstract class NamedObject
{
/// <summary>
/// Object's name
/// </summary>
public string name;
internal void GltfSerializeName(JsonWriter writer)
{
if (!string.IsNullOrEmpty(name))
{
writer.AddPropertySafe("name", name);
}
}
}
}