我想训练一个Unity ML Agent,在其功能的一部分,现在有一个写成协程的计时器。我感觉协程在训练中表现不佳,所以我想把它写成void,而不是协程。协程如下所示: private IEnumerator AttackExecutionTimer(CharacterSettings opponent, ScriptableAttack//for testing, you can replace
我坚持一个问题,套接字读取操作挂起应用程序UI,即使它在协程中运行。如何启动协程: self.readCoroutine = coroutine.create(function() self:blockingLoopline,err,rest = self.sock:receive(BUFSIZE) -- <= Hangs UI if there is no incoming data 当然,我知道协<em