Search Unity

Going around "class name doesn't match filename" ?

Discussion in 'Scripting' started by Morning, Jun 9, 2013.

  1. Morning

    Morning

    Joined:
    Feb 4, 2012
    Posts:
    1,141
    Following my previous thread

    http://forum.unity3d.com/threads/183283-Class-name-!-file-name-when-using-dynamic-boo-eval

    It seems that anything that gets compiled at runtime cannot be used as monobehaviour
    Got that with boo compiler and now ironpython too. Only happens when it's compiled at runtime. If I compile it to a dll it works as it should. Everything else works as it should and I can even assign classes generated from boo/py using their variations of "new Class()", but when it comes to adding class as component, nope.

    How does unity check for class/file names and how can this problem be avoided if at all?

    Thanks