# 7. Network Events

## Sending Network Events

This scene will show you how easy it is to set up Networking in your Unity project and send Network Events to other clients. Network Commands is like sending a direct message to another player, without anyone else knowing. Network Events is like shouting out loud for anyone in the area to hear you.

In this example each client has one character they can control with click to move input. They can right-click anywhere on the grid and all entities will instantiate an exclamation mark above their head.

![](/files/-MWdisDGHnfS3c_lX3Iu)

### General Set Up

In the *Hierarchy* of the Scene you can see three core Prefabs:&#x20;

`Core Scene Setup` and `Coherence Setup` are present in all scenes and described in detail in [Exploring the Network Playground](https://app.gitbook.com/s/-MWd0ZPEK7vE9nkE0b7G-2778409309/tutorial-project/network-playground/%7B%7B%3C%20ref%20starter_project_explore%20%3E%7D%7D).

`Coherence Entity` is the prefab that will change per Scene with different functionality. It has a standard `CharacterController`and `Rigidbody` as well as an `Agent` script which will handle movement functionality through the `Input Manager` in the `Core Scene Setup` prefab.

### In This Scene...

Network Events are still in development but this example shows a workaround using Commands. When an event is sent to an entity, `Coherence Handler` finds all instances of coherenceSync and sends the event command to all these entities.

In the coherenceSync component, small "lightning bolt" icons are shown next to the tick boxes for the syncable properties. These icons signify that they are public methods rather than singular variables and that these methods can be called through the `Coherence Handler` Event System, either to send or receive commands.

In the game view in Play mode, Commands can be sent to other entities via the right click button anywhere on the grid and an exclamation mark asset should pop up above all clients entities.

![](/files/-MWdFQ5C2L3xt7Dz6bKd)

### Build and Try

You can build this Scene via the Build Settings. Run the local Replication Server through the *Window -> Coherence -> Settings* window and see how it works. You can try running multiple clients rather than just two and see replicating for each.&#x20;


---

# Agent Instructions: 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://docs.coherence.io/0.4.14/tutorial-project/network-playground/network-events.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.
