Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
1
Question by Ewan K · May 23, 2016 at 02:19 PM · unity 5networkingmatchmaking

MissingMethodException in UNet matchmaking

Hello!

I've been playing around with the UNet service, specifically trying to implement the matchmaking for my little game prototype. I got to a point where I can reliably play using the matchmaking service and connect to/from the editor to/from a separate stand-alone client.

Then I decided to test it out on my android device (Lenovo P70-A) and for some reason, it didnt' work. So, I fired up the ADB and tried to inspect what was happening. This is the output from my device:

I/Unity (11519): MatchMakingClient ListMatches :https://mm.unet.unity3d.com/json/reply/ListMatchRequest I/Unity (11519): I/Unity (11519): (Filename: ./artifacts/generated/common/runtime/UnityEngineDe bugBindings.gen.cpp Line: 37) I/Unity (11519): I/Unity (11519): MissingMethodException: Method not found: 'Default constructo r not found...ctor() of UnityEngine.Networking.Match.ListMatchResponse'. I/Unity (11519): at System.Activator.CreateInstance (System.Type type, Boole an nonPublic) [0x00000] in :0 I/Unity (11519): at System.Activator.CreateInstance (System.Type type) [0x00 000] in :0 I/Unity (11519): at System.Activator.CreateInstance[ListMatchResponse] () [0 x00000] in :0

The first line is output automatically by the matchmaking client, upon calling it in a method like this: _matchMaker.ListMatches(0, 20, string.Empty, OnMatchList);

OnMatchList is a callback that is called as soon as the matchlisting is complete (it's a coroutine). If it was working, the output would contain raw json response from the matchmaking service (probably for debug purposes). But instead, it outputs that.

Anyone has any idea, what is happening? I'm building the app for API Level 9 (2.3.1) and I'm using Unity Pro. I googled a bit and found out that some people have issues with the reachability of the service, but I have no such issues using editor or stand-alone client.

I already upgraded to the latest 5.3.5 version. I noticed in patch notes that there was another bug with the same exception, but in a different component. I hoped it was somewhat related, but it wasn't.

Thanks in advance!

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
3
Best Answer

Answer by Ewan K · May 26, 2016 at 01:06 PM

I accidentally figured it out.

It seems that Stripping Level set to other than "Disabled" causes the parameter-less constructor of the aforementioned struct (ListMatchResponse) to be stripped away and thus causing the exception.

Also, while testing it in a separate minimal project I used to send with a bugreport and trying to force the error/exception by changing the stripping level back to non-Disabled, I got a bit different exception.

So it seems that this issue is not exclusively related to matchmaking code.

tl;dr Changing stripping level to Disabled "fixes" the issue. Bug report has been sent.

Comment
Add comment · Show 2 · 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 SweatyChair · Oct 24, 2016 at 04:17 AM 0
Share

Great answer, ran in to the same problem to and had no clue... they should have it mentioned in document!

avatar image Bunny83 · Oct 24, 2016 at 04:46 AM 0
Share

Yes, that's a common problem when using certain thing only by reflection. Byte-code strippers try to figure out which members are in use by checking if it's used somewhere in the code. Since the actual constructor most likely isn't used anywhere in the code it will get stripped away. That's why the usage via reflection fails. Reflection calls can't be deteced by analysing the byte code.

Yes, i would also classify it as bug. Unity has to ensure that those things aren't stripped.

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

6 People are following this question.

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

Related Questions

UNET Matchmaking Filter Issues 1 Answer

How to create a matchmaking lobby 0 Answers

How to connect to a match by a string 0 Answers

Unity 5.2 SyncVar hook only gets called on host. VS debugger dosent debug it fully. 0 Answers

How do I find the player GameObject of the local player? 2 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