// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
#pragma once
#include "Engine/Core/Types/String.h"
#include "Engine/Core/Types/Guid.h"
///
/// Contains short information about an asset.
///
API_STRUCT() struct AssetInfo
{
DECLARE_SCRIPTING_TYPE_MINIMAL(AssetInfo);
///
/// Unique ID.
///
API_FIELD() Guid ID;
///
/// The stored data full typename. Used to recognize asset type.
///
API_FIELD() String TypeName;
///
/// Cached path.
///
API_FIELD() String Path;
public:
///
/// Initializes a new instance of the struct.
///
AssetInfo()
{
ID = Guid::Empty;
}
///
/// Initializes a new instance of the struct.
///
/// The identifier.
/// The typename identifier.
/// The path.
AssetInfo(const Guid& id, const StringView& typeName, const StringView& path)
: ID(id)
, TypeName(typeName)
, Path(path)
{
}
public:
///
/// Gets the string.
///
/// The string.
String ToString() const;
};