Features of compilation of network game


I will be very grateful for any help / hint. The problem I can not overcome is not the first week.

There is such prefab:

In the script:

void Start()
tower = transform.Find (“Canon”).Find (“Tower”).gameObject;

If you start from the editor - tower finds it without problems. If to compile - NullReference …
I transfer From Start to Update - the compiled runs. What kind of nonsense?

Since Player is a prefab, you can drag the Tower object into that field in the editor, so you won’t have to attempt to find it at Start. After you do, in the Inspector, click Apply to save the prefab. If you need to assign the tower variable at Start and the Tower object has a script attached, you can try

tower = GetComponentInChildren<ScriptOnTower>().gameObject;