Jump to content

Question about editing class/methods in dnSpy


n2n1

Recommended Posts

skh3esO.jpg

 

It was already in the code - i didn't change anything here. This throws errors at the start of compilation.

 

 

I think this results from decompiling when the local class code refers to something outside his.

 

 

May be need to toggle some checkboxes in the settings dnSpy that the compiler ignored it ?

It should not be that this is a rarity - it occurs in the code quite often.

Then what is the way to edit a class that contains similar things?

Link to comment
Share on other sites

Hi n2n1,

 

The dnSpy compiler is having trouble with the switch statement so it's generating compiler code to handle it and the name is not allowed by the compiler (you can't have angle brackets in a name).

 

To fix it:

 

1) Raise an issue on dnSpy (mention it's a Unity build as it may already be fixed for normal .net)

2) Rename the class to remove the brackets

 

oQN4FFO.png

zv5zRhZ.png

 

Cheers,

 

Hal

Link to comment
Share on other sites

Man, Thank You!

 

I did it!!! :) I did what i planned !!!!! :)

(I was afraid that i would have to do it through IL :D)

 

 

 

1) Raise an issue on dnSpy (mention it's a Unity build as it may already be fixed for normal .net)

You mean on dnSpy gitHub?

I'll try if I can describe it correctly.

UPD: Done!

(But i used your words to make it more correct :))

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...