# WriteUIDs(ReadOnlySpan<HierarchyNode>, Span<byte>)

> Serializes stable identifiers for the given nodes into outUIDs. The buffer is pre-zeroed; write only slots that have a valid identity. Unwritten slots are treated as unresolvable during restore.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Hierarchy](/engine/6000.6/script-reference/unity/hierarchy.md)
* **Assembly:** UnityEngine.HierarchyCoreModule

```csharp
protected virtual void WriteUIDs(ReadOnlySpan<HierarchyNode> nodes, Span<byte> outUIDs)
```

### Parameters

**** (\[ReadOnlySpan\<HierarchyNode>]\(https\://learn.microsoft.com/dotnet/api/system.readonlyspan-1)): Nodes to serialize, one per output slot.**** (\[Span\<byte>]\(https\://learn.microsoft.com/dotnet/api/system.span-1)): Packed UID bytes, `GetUIDInfo().Size` bytes per node.
