# TryGetPropertyBagForValue<TValue>(ref TValue, out IPropertyBag)

> Gets a property bag for the concrete type of the given value.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Properties](/engine/6000.0/script-reference/unity/properties.md)
* **Assembly:** UnityEngine.PropertiesModule

## TryGetPropertyBagForValue\<T>(T, IPropertyBag)

```csharp
public static bool TryGetPropertyBagForValue<TValue>(ref TValue value, out IPropertyBag propertyBag)
```

### Parameters

**** (T): The value type to retrieve a property bag for.**** (\[IPropertyBag]\(/engine/6000.0/script-reference/unity/properties/ipropertybag)): When this method returns, contains the property bag associated with the specified value, if the bag is found; otherwise, null.

### Returns

| Type                                                          | Description                                                                       |
| ------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | `true` if the property bag was found for the specified value; otherwise, `false`. |
