C
C#2mo ago
brave

Difficulty in passing index

Hi guys im changing the value of the currentLevelForHUD through another script then this value goes to on enable missions.transform.GetChild(currentLevelForHUD).gameObject.SetActive(isActive); problem is currentLevelForHUD remains zero i have debugged the code the value is successfully being changed but in onenable its just remains zero https://paste.ofcode.org/itT7PSKah2heFFBVQXx4FS
4 Replies
Lukaa
Lukaa2mo ago
Need to see where you assigning the value of currentLevelForHUD
brave
brave2mo ago
Ok wait I'll send https://paste.ofcode.org/XVJwLJMgR98E6ZgBd2pcLy all the way down to void OnGamePlayStarted(IState current)
Lukaa
Lukaa2mo ago
I think the problem is that you don't do anything with hudInstance at all I think you have to pass the instance of Hud (hudInstance) to ShowUI method that you have
brave
brave2mo ago
ShowUI is display the Hud ui its a view I don't know how to modify it directly??....what I'm doing is creating an public Hud hudinstance and passing the Hud object into the sequence Manger so I can access the Hud script