ā System.typeloadexception could not find method due to type load error
Code I am using:
Any ideas why i am getting that error? (feel like i am doing something wrong and its really dumb š )
18 Replies
Well,
async void
is a red flag for sure<:emoji_178:1043823202809417880>
š please, explain.
void
cannot be awaited, cannot be cancelled, nothing can be done with it because it is nothing
If a method is async
then it has to return a Task
The only exception being methods you bind to events in some UI frameworks like Winforms and WPFso what do i do, if i remove async i get and error.
Make it
async Task
uh
I've never seen this interface lol
Unity Explorer
Ah, some Unity stuff
I'd ask in the $unity server tbh
Seems like it might be some Unity-specific issue
ĀÆ\_(ć)_/ĀÆ
Maybe the Discord library you're using isn't compatible with Unity's outdated version of Mono or something
do you know one that works with .net 2.0?
Afraid not
for your help tho!
if a method is called by unity, it should be
async void
, otherwise your exceptions are ignored and you won't see them
if it's something you call from another method, always make it a task. here, it's the other way. if you don't make it a task and await it, you won't see the exceptionsWas this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.