# Syncing player color

**URL:** <https://community.coherence.io/t/syncing-player-color/668>\
**Category:** Help\
**Created:** [March 18, 2025, 2:10am UTC](https://community.coherence.io/t/syncing-player-color/668 "2025-03-18T02:10:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zander.hudetz](https://avatars.discourse-cdn.com/v4/letter/z/7ea924/32.png) [@zander.hudetz](https://community.coherence.io/u/zander.hudetz)\
**Post date:** [March 18, 2025, 2:10am UTC](https://community.coherence.io/t/syncing-player-color/668/1 "2025-03-18T02:10:13Z")

</div>

Hey, relatively new to unity and coherence, but I am currently setting up my game to be multiplayer. I have it setup where the player will be assigned a color with their material, but nobody else can see that color. How can I sync that across the network?

---

<div class="post-metadata">

**Author:** ![mike](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@mike](https://community.coherence.io/u/mike)\
**Post date:** [March 18, 2025, 9:56am UTC](https://community.coherence.io/t/syncing-player-color/668/2 "2025-03-18T09:56:44Z")

</div>

I don’t think there’s a way to directly sync a parameter on the material, but if they all use the same mat and you’re just changing the color value on it.

You’ll need to make a new public variable for ‘Color PlayerColor’ that is synced across the network. When you assign the color to the local player’s material, also set the ‘PlayerColor’.

You can then create a callback for when that value is synced: [[OnValueSynced] Attribute | coherence Documentation](https://docs.coherence.io/manual/networking-state-changes/value-sync-attribute)

This callback will be fired whenever that value is changed, including on the remote copies of your player. In that callback, set the material’s colour.

if you’re looking to change the material completely, then you’ll need to amend the above to send the material name or identifier.

In terms of what you can sync, you can find the supported types here:

> **[Supported types | coherence Documentation](https://docs.coherence.io/manual/networking-state-changes/supported-types)**

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/flex017/uploads/coherence/original/1X/b3aa79eb9519fac7aad7eba18f15a1e8ce60f6e2.png) [@system](https://community.coherence.io/u/system)\
**Post date:** [June 16, 2025, 9:57am UTC](https://community.coherence.io/t/syncing-player-color/668/3 "2025-06-16T09:57:03Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
