Skip to content

Running untrusted code (video game modding) #48726

Answered by PathogenDavid
Lazersquid asked this question in Q&A
Discussion options

You must be logged in to vote

I assume they use 'Code Access Security' to limit the damage these mods can do.

They do not. Most games do not impose any kind of security restrictions on mods and rely on community trust.

Code Access Security is very deprecated and has been for quite some time. Mono (and by extension Unity) never really supported it in the first place. The main reason being is it's really hard (bordering on impossible) to have trusted and untrusted code running in the same process. (This is why modern web browser sandboxing is implemented with low privilege processes communicating with high privilege ones.)

Most Unity games use Harmony for their modding support. I would recommend making a simple mod fo…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by Lazersquid
Comment options

You must be logged in to vote
1 reply
@PathogenDavid
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants