Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by leonhogan1 · Nov 03, 2021 at 05:35 PM · networkingsteamhostingmessaging

MessagingSystem.ProcessIncomingMessageQueue();, NullReferenceException: Object reference not set to an instance of an object

Im using unity's netcode with a steamP2P transport, and i have just a basic project with the minimum setup needed to have a client connect to a host. But for some reason, after about 10 seconds of the client being connected to the host, i get a "NullReferenceException: Object reference not set to an instance of an object" in NetwrokManager.cs, at line 1144: MessagingSystem.ProcessIncomingMessageQueue();. . I dont know how this problem could have raised, as i have not edited or altered NetworkManager.cs in anyway, and i dont even know where to start as to why this could be occurring.

Any help would be appreciated.

[EDIT] After doing some more testing, when attempting to run a ServerRpc from the client (as in not the host):

 [ServerRpc(RequireOwnership = false)]
 void SyncServerRpc()
 {
     Debug.Log("ServerRpc test");
 }

I get the "NullReferenceException: Object reference not set to an instance of an object" error again, but this time its at NetworkManager.cs line 1380:

 return MessagingSystem.SendMessage(message, delivery, clientId);

Keep in mind, both ClientRpc and ServerRpc work if done from the host.

which i couldnt find elsewhere via googling. I hope this helps.

Comment
Add comment · Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image leonhogan1 · Nov 04, 2021 at 12:57 AM 0
Share

[SIDE ERROR] I WAS also getting a wierd error that was printing to the console: "Library\PackageCache\com.unity.netcode.gameobjects@1.0.0-pre.2\Runtime\Core\NetworkManager.cs is outside of Assets Folder, falling back to OS script editor... "

I managed to fix the problem by doing this:

(((To clarify, this does NOT fix the main problem)))

After moving com.unity.netcode.gameobjects@1.0.0-pre.2, I then had to enable Preview Packages from the Package Manager section in my project settings, then i had to download com.unity.collections and https://github.com/needle-mirror/com.unity.nuget.mono-cecil.git , Since unity didnt seem to recognize those anymore.

This did NOT fix the messaging error however.

avatar image JuZDePeche leonhogan1 · Nov 07, 2021 at 07:36 PM 0
Share

I have the same problem as you @leonhogan1 and I can't fix it. I tried installing om.unity.collections and com.unity.nuget.mono-cecil like you did and it did not work, I still get the Messaging null reference error.

In my project, I am only trying to connect a client to a host via the SteamP2PTransport but after a few seconds, the client disconnects and the error is thrown.

Also, I don't understand what you mean when you say "After moving com.unity.netcode.gameobjects@1.0.0-pre.2", what do you mean by that?

Am I missing a step? Thanks!

avatar image leonhogan1 JuZDePeche · Nov 07, 2021 at 08:10 PM 0
Share

Sorry, let me clarify. The "Library\PackageCache\com.unity.netcode.gameobjects@1.0.0-pre.2\Runtime\Core\NetworkManager.cs is outside of Assets Folder" error was another error i was receiving. My solution to that error did NOT fix the main error unfortunately.

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by salvator23 · Nov 09, 2021 at 08:32 PM

Having the same issue: Using Unitys netcode with the steamp2p transport, but i am not able to properly connect as a client. The ServerRPC called by the client is not executed on the host and i am getting the same NullReferenceException you mentioned after some seconds.

Did you make some progress on this?

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image leonhogan1 · Nov 09, 2021 at 10:39 PM 0
Share

I have not unfortunately.

avatar image JuZDePeche · Nov 10, 2021 at 01:02 PM 0
Share

The best thing to do would be to open an issue on the Netcode GitHub. Share it here if you make one.

avatar image salvator23 JuZDePeche · Nov 10, 2021 at 01:33 PM 0
Share

I opened an issue on the tranport repo: https://github.com/Unity-Technologies/multiplayer-community-contributions/issues/122

avatar image leonhogan1 salvator23 · Nov 10, 2021 at 05:19 PM 0
Share

Smart thinking, thanks for setting that up.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

183 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Steamworks.NET check if Steam is offline 1 Answer

Unity Subsystems 1 Answer

I am trying to create an online multiplayer game, but UnityEngine.Networking isn't supported with WebGL exports. What would be the best way to create a networked game for WebGL? 1 Answer

Unity built in Steamworks P2P API 0 Answers

are client hosted servers limited by my 20 person ccu? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges