Possible logic problem

Hi guys,
I’m starting with unity, I found a small problem I can not solve.

I have a main class calling other functions.
But every GameObject I attached main class require I drag and drop the other function object, generating duplicity.

Example Main function using MobsManager function, require i drag and drop MobsManager (or i get nullReferenceException).

Main function part of code:

public MobsManager mm;
mm.GenerateMob ();

Is possible to use mm.GenerateMob without create a new instance of s Object present in MobsManager?

I cant understand ur question but i guess u r asking -->“Call another class function without instance” if so use “static”

1 Like

Thank you, this solved the problem.
And helped me a lot