plz help me
whan i play game
than error i sow
exception in MessageHandler: UnassignedReferenceException The variable displayColorRenderer of MyNetworkPlayer has not been assigned.
here the code
using System.Collections;
using System.Collections.Generic;
using Mirror;
using UnityEngine;
using TMPro;
public class MyNetworkPlayer : NetworkBehaviour
{
[SerializeField] private TMP_Text displayNameText = null;
[SerializeField] private Renderer displayColorRenderer = null;
[SyncVar]
[SerializeField]
private string displayName = “Missing Name”;
[SyncVar(hook = nameof(HandleDisplayColorUpdated))]
[SerializeField]
private Color displayColor = Color.black;
[Server]
public void SetDisplayName(string NewDisplayName)
{ displayName = NewDisplayName;}
[Server]
public void SetDisplayColor(Color NewDisplayColor)
{ displayColor = NewDisplayColor;}
private void HandleDisplayColorUpdated (Color oldColor, Color newColor)
{
displayColorRenderer.material.SetColor("_BaseColor", newColor);
}
}