Вам носом ткнули что
GetComponent can only be called from the main thread.
Don't use this function in the constructor or field initializers
И даже дали решение
instead move initialization code to the Awake or Start function.
GetComponent can only be called from the main thread.
Don't use this function in the constructor or field initializers
instead move initialization code to the Awake or Start function.
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 26