0
Good afternoon, everyone!
Next, I’m facing a problem. I am developing a game, where there is a script called Playermodel, that when starting the Battle, it comes with data that were pre-defined in the Model script, however, when finishing the battle and trying to access a menu where has a HUD, I am not able to bring the data (name, level, Exp, etc.). If I use a Gameobject and give a "gameobject.Getcomponent<>()", whereas it has a player object in the Hierarchy, it works. However, if I try to do the same without having Gameobject, be it trying to use the Addcomponent() or the Getcomponent(), it comes with empty values! Someone would tell me how to pass parameters, or use static/global parameters effectively?
Edit: Another thing is that when I go into battle, come out and enter again, it comes back as if it were the first time, it’s "resetting" the status.
Thank you very much!