Arcore-unity-sdk: Examples don't compile with Unity 2018.2 beta

Created on 9 May 2018  路  13Comments  路  Source: google-ar/arcore-unity-sdk

UnityEngine.Network' is obsolete:The legacy networking system has been removed in Unity 2018.2. Use Unity Multiplayer and NetworkIdentity instead.'

bug fixed in upcoming release

Most helpful comment

I modified my code to below instead of using Network.player.ipaddress.

using UnityEngine;
using UnityEngine.Networking;
    NetworkIdentity m_Identity;

    void Start()
    {
        //Fetch the NetworkIdentity component of the GameObject
        m_Identity = GetComponent<NetworkIdentity>();

        //Output to the console the connection associated with this NetworkIdentity
        Debug.Log("Connection : " + m_Identity.connectionToClient);
    }

All 13 comments

Hi, thanks for the bug report. I added to our internal tracking to fix it for next releases.

I modified my code to below instead of using Network.player.ipaddress.

using UnityEngine;
using UnityEngine.Networking;
    NetworkIdentity m_Identity;

    void Start()
    {
        //Fetch the NetworkIdentity component of the GameObject
        m_Identity = GetComponent<NetworkIdentity>();

        //Output to the console the connection associated with this NetworkIdentity
        Debug.Log("Connection : " + m_Identity.connectionToClient);
    }

hai vCillusion thanks, to use your code do i need to import(using) anything.

I have updated my answer to include import statement. Hope it helps!

Thank VCilllusion 馃憤

Hello! I don't understand which script I should edit.

Hi pablisho
I am having the same error in Unity 2018.2 beta and Photon Unity Networking unitypackage downloaded from Unity Assets Store
Assets/Photon Unity Networking/Editor/PhotonNetwork/PhotonEditor.cs(675,46): error CS0619: UnityEngine.RPC' is obsolete:The legacy networking system has been removed in Unity 2018.2. Use Unity Multiplayer and NetworkIdentity instead.'
For it and sorry for my little English but Was this error fixed ? If it is like that Could you say me where I could get this last Photon Unity Networking unitypackage?
Thanks for your time
Alejandro

The Unity 2018.2 has been released as official version. How long does we have to wait for new ARCore update to support 2018.2 version?

Same problem with ARCore 1.4.0 and Unity 2018.2.1f1. I've managed to make the Hosting work, by using vCillusion fix and pshah123 patched scripts (#310), but I can't Resolve because the IP address showing is always 192.0.0.1. Any workaround to get the device IP Address?

Google: Can you please provide a detailed way of how yo fix this. A fix was mentioned above but its unclear which script one needs to modify.

Hello, ip address is just for showing it on scene UI, nothing more, you can just comment line ~85 in CloudAnchorUIController.cs :
IPAddressText.text = "My IP Address: ";
//IPAddressText.text = "My IP Address: " + Network.player.ipAddress;
Sort of quick fix until ARCore team doesn't fix it up on their side for people who don't really make use of Cloud Anchors for now.

You can always find your phone's IP address manually in phone settings.

@paragbhagwat3575 Goto Assest ->GoogleARCore->Examples->CloudAnchors->Scripts-> Open CloudAnchorUIController in editor.
Then paste below code in import statement

using UnityEngine;
using UnityEngine.Networking;

Then go down you will find start method just replace it with below code

NetworkIdentity m_Identity;

    void Start()
    {
        //Fetch the NetworkIdentity component of the GameObject
        m_Identity = GetComponent<NetworkIdentity>();

        //Output to the console the connection associated with this NetworkIdentity
        Debug.Log("Connection : " + m_Identity.connectionToClient);
    }

And you are good to go :)
Thanks @vCillusion for fix.

Hi, this issue has been fixed in ARCore SDK for Unity v1.4.1. Feel free to comment if you still experience issues with 2018.2

Was this page helpful?
0 / 5 - 0 ratings