# implicit operator uint

> Implicitly converts a RenderingLayerMask to an uint.

## Definition

* **Type:** Operator
* **Namespace:** [UnityEngine](/engine/6000.6/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

## implicit operator uint(UInt3)

Implicitly converts a RenderingLayerMask to an `uint`.

```csharp
public static implicit operator uint(RenderingLayerMask mask)
```

### Parameters

**** (\[RenderingLayerMask]\(/engine/6000.6/script-reference/unityengine/renderinglayermask)):&#x20;

### Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

## implicit operator RenderingLayerMask(RenderingLayerMas)

Implicitly converts `uint` to a RenderingLayerMask.

```csharp
public static implicit operator RenderingLayerMask(uint intVal)
```

### Parameters

**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)):&#x20;

### Returns

| Type                                                                                    | Description |
| --------------------------------------------------------------------------------------- | ----------- |
| [RenderingLayerMask](/engine/6000.6/script-reference/unityengine/renderinglayermask.md) |             |

### Examples

```csharp
using UnityEngine;
using UnityEngine.Rendering;

public class Example : MonoBehaviour
{
    void Start()
    {
        // Converts a uint to a rendering layer and prints all the rendering layer names.
        // As the value is 1025, it will print "Default" and Rendering Layer 10 Name.
        // 2^0 + 2^10 = 1 + 1024 = 1025

        uint number = 1025;
        RenderingLayerMask mask = number;
        for (int i = 0; i < 32; i++)
        {
            if ((mask.value & (1 << i)) != 0)
            {
                Debug.Log($"Rendering Layer {i}: {RenderingLayerMask.RenderingLayerToName(i)}");
            }
        }
    }
}
```
