> For the complete documentation index, see [llms.txt](https://netick.gitbook.io/v1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://netick.gitbook.io/v1/network-state.md).

# Network State

### **Network Property** <a href="#network-property" id="network-property"></a>

A Network Property is a C# property which is replicated across the network. For a property to be networked, the Attribute \[Networked] must be added to it. An example of a networked property:

```csharp
[Networked]
public int Health {get; set;}
```

Supported C# Types

1. Int/UInt
2. Float
3. Bool
4. String
5. Enums
6. Byte
7. Long/ULong
8. Double

Supported Unity Types:

1. Vector2
2. Vector3
3. Quaternion
4. Color

### Network Arrays

Network arrays are just like regular C# arrays, but their syntax is a bit different. They are defined using the NetworkArray generic class.

Example of a network array:

```csharp
[Networked (size: 10)] public NetworkArray Items { get; set; }
```

### **Custom Networked Structs** <a href="#custom-networked-structs" id="custom-networked-structs"></a>

You can define custom structs that can be networked/replicated by adding the attribute \[Networked] to them, like this:

```csharp
[Networked]
public struct Inventory
{
    public int Item1;
    public int Item2;
}
```

Important notes:

{% hint style="info" %}
**1.** It’s important to make sure that a single struct doesn’t exceed the maximum property size, which is 50 bytes.\
**2**. Structs must not include other user-defined networked structs, only C#’s and Unity’s primitive types.\
**3**. You might want to override/implement equality for the struct for better performance.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://netick.gitbook.io/v1/network-state.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
