It was issue of layer, as you can see in the screenshot 1 , but we had to remove !(not) from MathUtility in if statement to make it working also adding our new layers in the layer manager then it worked
// The object must have an enabled inventory in order for the item to be picked up.
var inventory = other.GetCachedParentComponent<InventoryBase>();
if (inventory == null || !inventory.enabled) {
return;
}
// The collider must be a main character collider. Items or ragdoll colliders don't count.
var layerManager = inventory.gameObject.GetCachedComponent<CharacterLayerManager>();
if (layerManager == null || MathUtility.InLayerMask(other.layer, layerManager.CharacterLayer)) {
//if (layerManager == null || !MathUtility.InLayerMask(other.layer, LayerManager.TeamBlue) || MathUtility.InLayerMask(other.layer, LayerManager.TeamRed)) {
return;
}
TryItemPickup(inventory, slotID);
But now our magic effects are not getting synced accross the network they getting returned (check screenshot 2 ) , if am commenting return its getting instantiated on the local but not on others
#if
ULTIMATE_CHARACTER_CONTROLLER_MULTIPLAYER
// The server will spawn the projectile.
if (m_MagicItem.NetworkInfo != null) {
if (m_MagicItem.NetworkInfo.IsLocalPlayer()) {
m_MagicItem.NetworkCharacter.MagicCast(m_MagicItem, m_Index, m_CastID, direction, targetPosition);
}
Debug.Log(m_MagicItem.NetworkInfo.IsServer());
if (!m_MagicItem.NetworkInfo.IsServer())
{
return;
}
}
#endif
So any idea?