Ps: I will be a of the script:
Public static a A_a;
In the Start method A_a=this;
The script B directly or move A.A _a. The method name don't call
Ps:
The script B with GameObject. Find (" A ".) GetComponent It's no use (), like because can't find the object
Then how to call
CodePudding user response:
First create AClone, again according to AClone get a script, and then callCodePudding user response:
How code is used to implement, how to invoke a script in the script b?CodePudding user response:
Your not in the scene, a start is not executed, you drag a objects to the scene in the call,CodePudding user response:
The problem is A goods can't appear in the sceneCodePudding user response:
If clear A would never be instantiated to scenario, you can directly declare an open A variable B script, then supervisors panel put you under the folder of the precast body assigned to this variable B, it is important to note that this is A direct access to the instance, prefabricated body, please do not modify anything A object,CodePudding user response:
Must first be loaded into the scene to call,