Property ValueRO
ValueRO
Returns a read-only reference to the component value itself.
Declaration
public ref readonly T ValueRO { get; }
Property Value
Type | Description |
---|---|
T |
Remarks
This value is a reference to the actual component data. It is safe to use this field directly, e.g. "Data.Value.SomeField". It is also safe to make a copy of this value, e.g. "var myComponent = Data.Value". Keeping a ref ("ref var myref = Data.Value" is inherently unsafe as any structural change may invalidate this reference, and there is no way to detect this. It is safe to use this reference locally if you can guarantee that no structural changes will occur in between acquiring it and using it. Do not hold on to such a reference for any extended amount of time.