RegisterHandler() not calling Method, problem where?

Hello, I’m making a multiplayer game in Unity with Mirror networking system.
I’m trying to make my own network AudioSource as there is no free asset for Mirror in store. I might have something wrong that’s not making the method PlayAudioWhenDetect(). Here’s my two scripts for the system below:

Code (CSharp):

  1. using System;

  2. using System.Collections;

  3. using System.Collections.Generic;

  4. using UnityEngine;

  5. using Mirror;

  • namespace Mirror.NetworkAudio
  1. {

  2. public struct AudioTypeNet : NetworkMessage

  3. {

  4. public int content;

  5. }

`type or paste code here`
  • public class NetworkAudio : NetworkBehaviour
  1. {

  2. [SerializeField, SyncVar]

  3. public int audioType;

  • public void PlayAudio() //Works
  1. {

  2. AudioTypeNet msg = new AudioTypeNet();

  3. msg.content = audioType;

  4. NetworkServer.SendToAll(msg);

  5. }

  6. }

  7. }

Code (CSharp):

  1. using System.Collections;

  2. using System.Collections.Generic;

  3. using UnityEngine;

  4. using Mirror;

  5. using Mirror.NetworkAudio;

  6. using kcp2k;

  • public class NetworkAudioRecieveAndPlay : NetworkBehaviour
  1. {

  2. void Start()

  3. {

  4. NetworkServer.RegisterHandler(PlayAudioWhenDetect);

  5. }

  • void PlayAudioWhenDetect(NetworkConnection conn, AudioTypeNet msg)
  1. {

  2. Debug.Log(“Now networkaudio received message. Time to look for if statement”);

  3. if (GetComponent().audioType == msg.content)

  4. {

  5. GetComponent().Play();

  6. Debug.Log(“Played”);

  7. }

  8. }

  9. }

I’ve tested PlayAudio() of NetworkAudio class with Debug.Log(), PlayAudio() works. But the problem maybe with line 12 or 18. I’ve did a lot of research, but this is my final result. Yet, no errors are shown and the method isn’t called. I don’t know why !
I’ve tried googling, youtube searching, documention check etc. Isn’t helping. Now Unity and Mirror Forums might be my last options, hope to get solution, cause otherwise I’ll have to give up in this project of a lot handworks. You can ask me for more informations if these scripts can’t give any solution.
(I would open source the project, but for some asset’s licenses in this project, I can’t do it, sorry!)

Bro this is crypto forum xD