I have some error and I don't know why after adding some localization system to my game turn null reference at the gameplay
and this my GameManager script it, I think I have done with an object reference in unity editor but after build to android that the object become null reference
private void Start()
{
LM = FindObjectOfType<LocalizationManager>();
audioManager = FindObjectOfType<AudioManager>();
questionManager = FindObjectOfType<_questionManager>();
LevelSelect = FindObjectOfType<SelecLevel>();
Select = FindObjectOfType<_CharacterSelect>();
sliderChanges = FindObjectOfType<SliderChanges>();
onlepel = LevelSelect.levelIndex + 1;
IndexLevel = LevelSelect.levelIndex;
getPlayerData();
Timecount = GameObject.FindGameObjectWithTag("TimeCount");
if (LM.Bahasa)
{
category = GameObject.Find("QuestionManagerIndonesia").GetComponent<_questionManager>().category;
}
else
{
category = GameObject.Find("QuestionManagerEnglish").GetComponent<_questionManager>().category;
}
moneyAmount = PlayerPrefs.GetFloat("MoneyAmount");
if (unansweredQuestion == null || unansweredQuestion.Count == 0)
{
thisQuestions = category[IndexLevel].questions;
unansweredQuestion = new List<Question>(thisQuestions);
TrueAnswerText.text = "CORRECT";
FalseAnswerText.text = "WRONG!";
//unansweredQuestion = new List<Question>(questions);
}
if (TrueAnswerText != null)
TrueAnswerText.text = "CORRECT";
if (FalseAnswerText != null)
FalseAnswerText.text = "WRONG!";
TrueCount = 0;
if (FactText != null)
setCurrentQuestion();
}