Does System.Reflection work in unity?

Can I use System.Reflection in Unity?

If so, does anyone have a sample?

I was originally looking at the following sample and was wondering…

  1. If this works, and
  2. What the input value is the for Assembly assembly = Assembly.LoadFile(“…Assembly1.dll”), or some alternative method

A quick search of previous questions hand answers here reveals that Reflection does indeed work in Unity, but that there are many potential problems and issues with the ways it can be used.

Try the search bar above for a LOT more details.

I am not sure, but if you use 3rd party code in your project which use the System.Reflection, there may be some weird issue.

Disallowing the usage of System.Reflection. to call private/internal methods in classes you did not write yourself.*

I don’t know whether it has any solution for it or not. If reflection is used yourself, I think it possibly works. Sorry I have no sample for you.

link text

Don’t use System.Reflection unless you are a Pro with Unity. First you should know how the Unity works at a professional software architecture level, and how the performace impact this namespace does to your game.