Пример #1
0
    void Start()
    {
        GameObject tempObj = GameObject.Find("NameOfGameObjectScriptAIsAttachedTo");

        scriptInstance = tempObj.GetComponent <ScriptA>();

        //Access dictio  variable from ScriptA
        scriptInstance.dictio.Add("aaa", gameObject);
    }
Пример #2
0
 // Start is called before the first frame update
 void Start()
 {
     b = ScriptA.getA();
     print(b);
 }
    void Start()
    {
        GameObject obj = GameObject.Find("ObjectScriptAIsAttachedTo");

        scriptA = obj.GetComponent <ScriptA>();
    }
 // Start is called before the first frame update
 void Start()
 {
     scriptA = FindObjectOfType <ScriptA>();
     scriptA.Function1(name);
 }