(1) Detect the presence on another script in my project
(2) If the other script exists, call a function in it
I need to do this to make two libraries I am releasing seperatley work with each other if they are both present in the same Unity project.
What would be the best way to accomplish this?
So far I am playing with reflection, obscure OO ideas, eval inside a try/catch block, script 2 storing a function reference for itself inside a static variable of script 1, etc… I have a feeling I am, as usual, over thinking this.