1.

相关代码:

   NetworkView.RPC ("ReceiveMessage", RPCMode.All, message);   

编译输出:

  Assets/cs/ClientChat.cs(45,16): error CS0120: An object reference is required to access non-static member `UnityEngine.NetworkView.RPC(string, UnityEngine.RPCMode, params object[])'  

原因:

  RPC函数非静态方法,需实例化对象来调用。

解决:

   networkView.RPC ("ReceiveMessage", RPCMode.All, message);

 

2.

相关描述:

  新建一个3D工程,保存场景的时候出错。

编译输出:

  Assertion failed on expression: '!projectPath.empty()'

原因:

  文件保存的路径不对。

解决办法:

  保存的文件要放在Assets的目录下面。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2017-11-24
  • 2022-12-23
  • 2022-12-23
  • 2018-12-10
  • 2021-12-26
  • 2022-12-23
猜你喜欢
  • 2021-10-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-19
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案