I am experimenting in online multiplayer. I test it with two players, one is in editor and other is standalone build.
At the end of each frame, their
eulerAngles are sent to the server. Server broadcasts to every player, players read data and use it to set remote player’s
When editor moves, it successfully moves on standalone player’s scene. When builded player moves, it doesn’t move on editor. After 1-2 hours of debugging, I found out it stops executing the lines after
public void UzakKonumGuncelle(Vector3 position, Vector3 eulerAngles)
transform.position = position;
transform.localEulerAngles = eulerAngles;
Code doesn’t stop executing on its own.
- There is an exception — As the console doesn’t have any errors you would have to be catching and suppressing it for this to be the case.
- The logs are not coming from the code you think they are — You should look at the stack traces, and preferably when using Debug.Log, pass
this to the second
context parameter so when you click the log it pings the object that made it.
How to find out what’s happening:
You can use the debugger to step over the code and see what’s executing, and where the execution goes after Rock is printed.
- There is no kind of exception handling in any of the user written codes.
- There is no other code logging Rock/Paper/Scissors, stack trace shows the line of code I posted here and also there is no other object that can run this method; also if any other object runs the method, it should still log all Rock/Paper/Scissors.
I haven’t tried debugging yet as I was coding on MS Notepad (due to performance issues). I’ll inform when I try.
@vertxxyz I don’t know how and why but assigning these to variables and then updating the positions using variables in FixedUpdate solved it. Sorry for my late reply, I changed my laptop.