BeardedManStudios / ForgeNetworkingRemastered

See various forks, also please join the Forge Community fork of Forge Alloy! -> https://github.com/ForgeAlloyCommunity/ForgeAlloy
https://twitter.com/FarrisFaulds
Apache License 2.0
1.49k stars 309 forks source link

InvalidCastException #317

Closed LijpeLynn closed 3 years ago

LijpeLynn commented 5 years ago

Version Number and Operating System(s):

Forge Networking Remastered Version 03/10/2018-19.53.38,04 Unity 2018.3.8f1 Personal

Expected behavior:

The client joins without an InvalidCastException.

Actual behavior:

The client joins with an InvalidCastException, this error refers to the SyncPlayerNetworkObject. As a result the clients game experience is not what it should be.

Steps to reproduce:

Download Link: Download Build and run the project, host the game with the builded one and connect with Unity in play mode. Click the start game button on the host.

[Optional] Discord Username:

Lijpe Lynn#4689

phalasz commented 4 years ago

@LijpeLynn is this issue happening because not all network object arrays in the networkmanager have a prefab assigned?

Yooooomi commented 4 years ago

Still happening with me, exact same behaviour

phalasz commented 4 years ago

could you share a project that reproduces the issue please?

Yooooomi commented 4 years ago

Here: https://drive.google.com/open?id=1CEej6B8XxVIcV5p-uGfRL6cGutFgFAcs

LijpeLynn commented 4 years ago

I solved the problem

FpardoLearning commented 3 years ago

@LijpeLynn How you solved it?

LijpeLynn commented 3 years ago

@FpardoLearning I fixed it by not having multiple NetworkBehaviors on one GameObject.