Skip to content

PrefabVersion

namespace Griff.Scenes;
public sealed class PrefabVersion

One version of a prefab file: its text as it was then, and an id that says which it is. A placed copy of a prefab remembers the version it was made from (PrefabVersion), so what the copy changed is what differs from that version, and is kept when the prefab changes, however it changed (saved in the editor, written by an agent, brought in by a pull or a text editor). Scene files keep the versions their copies came from.

public string Id { get; }

Which version it is: the same text (however it’s spaced or its lines end) is always the same id.

public string Json { get; }

The prefab file’s text, as it was in this version (without its spacing).

public bool Equals(PrefabVersion? other)
public override bool Equals(object? obj)
public override int GetHashCode()
public static PrefabVersion Of(string text)

The version a prefab file’s text is.

public override string ToString()