附件UNetQuestion.zip中有这个简单的工程
因为官网有描述command :
Commands are sent from player objects on the client to player objects on the server. For security, Commands can only be sent from YOUR player object, so you cannot control the objects of other players.
所以只有local gameobject调用command后才会在server端的此gameobject (同netId)上调用,所以在Server端起来后,创建了Server端的local client的player gameobject,此时server端log输出:
True
1
这是是符合官网的说法的,奇怪的是下一步,当创建一个Remote Client时,发现Server端居然输出了如下log
False
2
按正常思路,Remote Client创建时,Server端首先创建Remote Client的player gameobject,然后spawn到Remote Client,由于Server创建的这个Remote Client在Server端而言不是Local player,所以调用command是不成功的,结果Server端打出如上log表明command调用成功了,请问siki的老师们这是什么情况?
QQ 719502447
谢谢
怎么没老师回复啊。。。。。。。。。