# WritePackedFloat(float, in StreamCompressionModel)

> Writes a 4-byte floating point value to the data stream using a StreamCompressionModel.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Collections](/engine/6000.7/script-reference/unity/collections.md)
* **Assembly:** UnityEngine.ManagedKernelModule

## WritePackedFloat(float, StreamCompressionModel)

```csharp
public bool WritePackedFloat(float value, in StreamCompressionModel model)
```

### Parameters

**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The 4-byte floating point value to write.**** (\[StreamCompressionModel]\(/engine/6000.7/script-reference/unity/collections/streamcompressionmodel)): [StreamCompressionModel](/engine/6000.7/script-reference/unity/collections/streamcompressionmodel.md) model for writing value in a packed manner.

### Returns

| Type                                                          | Description                      |
| ------------------------------------------------------------- | -------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Whether the write was successful |
