Search Issue Tracker
By Design
Votes
0
Found in
5.4.0f3
Issue ID
845453
Regression
No
[Command] functions used by Invoke are called locally
Reproduction steps:
1. Open project attached.
2. Open scene "Main" from folder "Scene".
3. Make 2 game clients:
3.1. First one by using Build and Run.
3.2. Second - by entering Play Mode.
4. Join together:
4.1. With first one press LAN Host(H)
4.2. With second - press LAN Client(C)
5. On second client try to shoot by pressing left mouse button.
Expected result: bullets will appear on server.
Actual result: bullets is only created on Client, error: "NetworkServer is not active. Cannot spawn objects without an active server."
There are 2 workarounds:
First: instead of calling Invoke("CmdShoot") call Invoke("CallCmdShoot") - which is the generated method.
Second one: Use simple method calling instead of Invoke().
This is how to do it in this project:
1. Go to: Scripts -> Controls -> PlayerController.cs
2. Comment line 21, uncomment line 22;
3. Repeat reproduction 3 - 5 steps.
Reproducible on: 5.3.0f4, 5.4.0f3, 5.4.2f2, 5.5.0b9.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
Add comment