Class UnresolvedPrefabs
Reads the census of prefab hashes a process cannot resolve, through an adapter's UnresolvedPrefabs.Command()
(default ValheimCLI plugin), around that process's reference position (the local player on a client). On a client without
a server-side mod, an object whose prefab only the mod registers is never created there: Valheim 1.0.16 logs "Missing
prefab hash" and skips it. VanillaClientCheck runs it as a scenario step.
public static class UnresolvedPrefabs
- Inheritance
-
objectUnresolvedPrefabs
Fields
Source
public const string Source = "unresolved-prefabs"
Field Value
- string
Methods
Parse(JsonElement)
Parses census data; anything malformed throws rather than reading as "nothing unresolved".
public static UnresolvedPrefabScan Parse(JsonElement data)
Parameters
dataJsonElement
Returns
Read(GameActor, string, float)
One census, complete or not, through capabilityPath (for example
mymod.testing/unresolved-prefabs). On a client keep radius within the area it loads, about
near simulation distance x 64 + 32 m (160 m at default settings): a larger circle never becomes complete there.
public static UnresolvedPrefabScan Read(GameActor actor, string capabilityPath, float radius = 64)
Parameters
actorGameActorcapabilityPathstringradiusfloat
Returns
WaitForComplete(GameActor, string, float, TimeSpan, TimeSpan, CancellationToken)
Waits until a census is complete and has read at least one object (the area around the player has loaded), at most
interval apart, and returns it; unresolved hashes do not end the wait early, they are the answer.
public static Task<UnresolvedPrefabScan> WaitForComplete(GameActor actor, string capabilityPath, float radius, TimeSpan timeout, TimeSpan interval, CancellationToken cancellation = default)
Parameters
actorGameActorcapabilityPathstringradiusfloattimeoutTimeSpanintervalTimeSpancancellationCancellationToken
Returns
- Task<UnresolvedPrefabScan>