ARCore开发报错The legacy networking system has been removed in Unity 2018.2. Use Unity Multiplayer。。。。。。

报错信息:The legacy networking system has been removed in Unity 2018.2. Use Unity Multiplayer and NetworkIdentity instead.'

报错原因:谷歌官方发布的ARCore版本与Unity更新后的方法弃用冲突。

解决办法:

1.引入

using UnityEngine;
using UnityEngine.Networking;

2.在start方法下

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);
    }

 解决!


版权声明:本文为qq_36942939原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。