unity3d - Inheritance and Monohehaviour -


this question has answer here:

the initial issue unity yelling @ me :

you trying create monobehaviour using 'new' keyword.

i checked lines directed , got more confused.

in monobehaviour class calling non-inheriting class 'new' keyword , attempted use function in monobehaviour class. ie :

public void monomethod() {      mynonmonoscript scriptname = new mynonmonoscript();       scriptname.nonmonofunction(); } 

can elaborate this, please?

i found it. creating monobehaviour 'new' keyword , in mynonmonoscript's other functions doing mono creation 'new' keyword... ...oops...


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -