Spawning inactive objects on connected clients (observers issue)

Hello,

I’m developing a multiplayer FPS, with a weapon changing system similar to those in other known FPS games.

As such, I’m disabling and activating selected weapons with gameobject.SetActive(value)
on Command and ClientRPC:

[Command] private void CmdShowWeapon(int weaponIndex)
{
    GameObject p = NetworkServer.FindLocalObject(netId);
    Weapon[] spawnedWeapons = p.GetComponentsInChildren<Weapon>(includeInactive: true);

    for (int i = 0; i < spawnedWeapons.Length; i++)
        spawnedWeapons*.gameObject.SetActive(i == weaponIndex);*

activeWeapon = spawnedWeapons[weaponIndex].gameObject;
RpcShowWeapon(weaponIndex);
}
[ClientRpc] public void RpcShowWeapon(int weaponIndex)
{
GameObject p = ClientScene.FindLocalObject(netId);
Weapon[] spawnedWeapons = p.GetComponentsInChildren(includeInactive: true);
for (int i = 0; i < spawnedWeapons.Length; i++)
spawnedWeapons*.gameObject.SetActive(i == weaponIndex);*
}
While a new client is connecting, all inactive weapons on the host seem “unspawned” to the client, and thus when the host change weapons, the client cannot see them as they do not show in the hierarchy.
Is there something I’m doing wrong, and does there a way to overcome this problem.
I’ve searched on google and here for this type of problem and found nothing which is coherent.
Thank you.

I am facing same issue. I am trying to implement network pool and pool objects on server which are disabled are not getting spawned on client. Searched a bit. Found below link:

I am still trying to understand how to solve this problem. Please let me know if you find any info or if you have already managed to solve it.