Class ImportSidecar¶
Namespace: Apogee.Content.Assets
Assembly: Apogee.Content.dll
The UID in a <asset>.import.xml: the uid attribute of its <Import> root (<Import uid="uid://4k2m9x7q1w3ze" srgb="false"/>). Anything that rewrites a
sidecar (a settings panel) has to keep it: ImportSidecar.SetUid(newText, ImportSidecar.ReadUid(oldText)). The import settings and the import key ignore it
(
public static class ImportSidecar
Inheritance¶
Inherited Members¶
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Fields¶
RootName¶
The name of the root element.
public const string RootName = "Import"
Field Value¶
Suffix¶
The suffix that makes the sidecar's name from the asset's.
public const string Suffix = ".import.xml"
Field Value¶
Methods¶
ReadUid(string)¶
The UID in the sidecar's text, or <Import> or the attribute is not a valid UID. It never throws.
public static AssetUid ReadUid(string sidecarText)
Parameters¶
sidecarText string
Returns¶
SetUid(string, AssetUid)¶
The sidecar's text with uid as its UID: replaced in place when there is one, added to the root tag otherwise, and nothing else changed (comments, other attributes,
quotes and line endings stay). From the empty text it makes <Import uid="…"/> and a new line.
public static string SetUid(string sidecarText, AssetUid uid)
Parameters¶
sidecarText string
uid AssetUid
Returns¶
Exceptions¶
The text is not an <Import> document the edit can be made in.