Hi, I want to access to one method in other script but:
Script A : MONOBEHAVIOUR
-use method from Scrip tB
Script B (NO MONOBEHAVIOUR)
-method();
The problem that I have is that if I create one object of the Script B in the Script A im getting one error like “GetComponent requires that the requested component “Script B” derives from Monobehaviour or Component or is an interface”.
And If i want to use the object of the Monobehaviour in the Script B Im getting the error:
“Null reference Object”
Basically im trying to use the PLAYERs position (inside of script A) as a parameter of the method of the ScriptB,
I solved it creating other static transfom variable in Script A and asigning the value of Player.transform. Then accessing to that vvalue like. ScriptA.staticTransformcreated