// -------------------------------------------

        /*
         * Create a NetworkObject
         */
        public void CreateLocalNetworkObject(string _basePrefabName, string _prefabName, object _initialData, bool _createInServer, float _x = 0, float _y = 0, float _z = 0)
        {
            if (IsLocalGame)
            {
                string assignedNetworkName = _basePrefabName + TOKEN_SEPARATOR_NAME + GetUniversalNetworkID() + TOKEN_SEPARATOR_NAME + m_uidCounter;
                m_uidCounter++;
#if !DISABLE_UNET_COMMS
                NetworkWorldObject networkWorldObject = new NetworkWorldObject(assignedNetworkName, _prefabName, new Vector3(_x, _y, _z), Vector3.zero, Vector3.one, _initialData, true, true, _createInServer);
                m_unetNetworkObjects.Add(networkWorldObject);
#endif
            }
            else
            {
#if ENABLE_PHOTON
                object[]   instantiationData = { GetUniversalNetworkID(), m_uidCounter };
                GameObject networkGameObject = PhotonNetwork.Instantiate(_prefabName, Vector3.zero, Quaternion.identity, 0, instantiationData);
                networkGameObject.transform.position = new Vector3(_x, _y, _z);
                networkGameObject.GetComponent <NetworkID>().NetID = GetUniversalNetworkID();
                networkGameObject.GetComponent <NetworkID>().UID   = m_uidCounter;
                m_uidCounter++;
                networkGameObject.GetComponent <NetworkID>().IndexPrefab = GetPrefabIndexOfName(_prefabName);
                m_tcpNetworkObjects.Add(networkGameObject);
                if (networkGameObject.GetComponent <IGameNetworkActor>() != null)
                {
                    networkGameObject.GetComponent <IGameNetworkActor>().Initialize(_initialData);
                }
#else
                GameObject networkGameObject = Utilities.AddChild(this.gameObject.transform, GetPrefabByName(_prefabName));
                networkGameObject.transform.position = new Vector3(_x, _y, _z);
                networkGameObject.GetComponent <NetworkID>().NetID = GetUniversalNetworkID();
                networkGameObject.GetComponent <NetworkID>().UID   = m_uidCounter;
                m_uidCounter++;
                networkGameObject.GetComponent <NetworkID>().IndexPrefab = GetPrefabIndexOfName(_prefabName);
                m_tcpNetworkObjects.Add(networkGameObject);
                if (networkGameObject.GetComponent <IGameNetworkActor>() != null)
                {
                    networkGameObject.GetComponent <IGameNetworkActor>().Initialize(_initialData);
                }
#if ENABLE_NAKAMA
                NakamaController.Instance.SendTransform(networkGameObject.GetComponent <NetworkID>().NetID, networkGameObject.GetComponent <NetworkID>().UID, networkGameObject.GetComponent <NetworkID>().IndexPrefab, networkGameObject.transform.position, networkGameObject.transform.forward, networkGameObject.transform.localScale);
#else
                ClientTCPEventsController.Instance.SendTranform(networkGameObject.GetComponent <NetworkID>().NetID, networkGameObject.GetComponent <NetworkID>().UID, networkGameObject.GetComponent <NetworkID>().IndexPrefab, networkGameObject.transform.position, networkGameObject.transform.forward, networkGameObject.transform.localScale);
#endif
#endif
            }
        }
        // -------------------------------------------

        /*
         * Will update the transforms in the remotes players
         */
        public void UpdateRemoteTransforms(bool _force)
        {
            if (m_activateTransformUpdate || _force)
            {
                if (!IsLocalGame)
                {
#if !ENABLE_PHOTON
                    m_timeoutUpdateRemoteNetworkObject += Time.deltaTime;
                    if ((m_timeoutUpdateRemoteNetworkObject >= TimeToUpdateTransforms) || _force)
                    {
                        m_timeoutUpdateRemoteNetworkObject = 0;
                        for (int i = 0; i < m_tcpNetworkObjects.Count; i++)
                        {
                            GameObject networkGameObject = m_tcpNetworkObjects[i];
                            if (networkGameObject != null)
                            {
                                if (networkGameObject.GetComponent <NetworkID>() != null)
                                {
                                    if ((networkGameObject.GetComponent <NetworkID>().NetID == GetUniversalNetworkID()) || _force)
                                    {
#if ENABLE_NAKAMA
                                        NakamaController.Instance.SendTransform(networkGameObject.GetComponent <NetworkID>().NetID, networkGameObject.GetComponent <NetworkID>().UID, networkGameObject.GetComponent <NetworkID>().IndexPrefab, networkGameObject.transform.position, networkGameObject.transform.forward, networkGameObject.transform.localScale);
#else
                                        ClientTCPEventsController.Instance.SendTranform(networkGameObject.GetComponent <NetworkID>().NetID, networkGameObject.GetComponent <NetworkID>().UID, networkGameObject.GetComponent <NetworkID>().IndexPrefab, networkGameObject.transform.position, networkGameObject.transform.forward, networkGameObject.transform.localScale);
#endif
                                    }
                                }
                            }
                        }
                    }
#endif
                }
                else
                {
#if !DISABLE_UNET_COMMS
                    for (int i = 0; i < m_unetNetworkObjects.Count; i++)
                    {
                        NetworkWorldObject unetNetworkObject = m_unetNetworkObjects[i];
                        bool destroyNetworkObject            = false;
                        if (unetNetworkObject != null)
                        {
                            try
                            {
                                if ((unetNetworkObject.GetNetworkObjectData().NetID == CommunicationsController.Instance.NetworkID) || _force)
                                {
                                    unetNetworkObject.SetPosition(unetNetworkObject.GetNetworkObjectData().gameObject.transform.position);
                                    unetNetworkObject.SetScale(unetNetworkObject.GetNetworkObjectData().gameObject.transform.localScale);
                                    unetNetworkObject.SetForward(unetNetworkObject.GetNetworkObjectData().gameObject.transform.forward);
                                }
                            }
                            catch (Exception err)
                            {
                                destroyNetworkObject = true;
                            }
                        }
                        if (destroyNetworkObject)
                        {
                            m_unetNetworkObjects.RemoveAt(i);
                            i--;
                        }
                    }
#endif
                }
            }
        }