Duplicate Monobehaviour

I am trying to duplicate one Monobehaviour script onto another gameObject. How would I go about doing this in code?

Basically, I have a bunch of dynamic post effects on the camera I would like to duplicate onto another gameObject. I won’t necessarily know what specific post effects will be on the camera.

You cannot just put a MonoBehaviour instance that was created on one game object onto another. Probably your best bet is to write a Copy(MyController anotherController) method and copy all the attributes that would make it (for your purposes) identical. It will not however have the same unique identifier and will not be the same object. If you need == or .Equals to work you can override these to make it act like the same based on your important attributes. If you want to do that check out this link