Class AuthoredAssets¶
Namespace: Apogee.Content.Assets
Assembly: Apogee.Content.dll
Assets that are written by people or tools as XML, rather than imported from another format: they carry their own UID, in the uid attribute of the document's root element
(<Scene version="1" uid="uid://…">, <Prefab …>), and have no .import.xml. Scenes and prefabs now; materials add their extension to
public static class AuthoredAssets
Inheritance¶
Inherited Members¶
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Properties¶
Extensions¶
The extensions of authored assets, with the dot, in lower case.
public static IReadOnlyList<string> Extensions { get; }
Property Value¶
Methods¶
IsAuthored(string)¶
Whether path names an authored asset (by its extension, not case-sensitive).
public static bool IsAuthored(string path)
Parameters¶
path string
Returns¶
ReadUid(ReadOnlySpan<byte>)¶
The UID in the root of the document, or
public static AssetUid ReadUid(ReadOnlySpan<byte> document)
Parameters¶
document ReadOnlySpan<byte>
Returns¶
ReadUid(Stream)¶
The UID in the root of the document in document (see
public static AssetUid ReadUid(Stream document)
Parameters¶
document Stream
Returns¶
SetUid(string, AssetUid)¶
The document's text with uid as the UID of its root: replaced in place or added after the last attribute of the root tag, with everything else exactly as it was
(comments, indentation, quotes, line endings). Overwriting a scene keeps the UID of the file it replaces by calling this on the new text.
public static string SetUid(string text, AssetUid uid)
Parameters¶
text string
uid AssetUid
Returns¶
Exceptions¶
The text is not an XML document the edit can be made in.