Hi everyone. I’m currently having a problem that is making me go insane since i really don’t know how to fix it. I have this one script called “shopManager”, attached to an empty gameObject called “gameManager”. The script works, but when I close the project and then reopen it, it just stop working until i remove the component from the gameManager and give them to it again. I also noticed that if i try build the game, the script just won’t work. Can anyone help me with this? Thanks!
How would we know? You need to explain more of what it does, how it does it, what you see, what settings you have that maybe relevant
The script manage a shop panel that need to be open when the player level up. When i open up the project, it simply doesnt work anymore, i didnt change any setting or nothing, it just stopped working.
where this scripts comes from?
sorry, what do you mean by where the script comes from?
you’ve made the script or someone else made the script?
Does it work if you simply view the problem game object in the inspector?
That said, you haven’t described what “stopped working” means. Does it throw an error? Does the code not execute at all?
What debugging have you done to determine what isn’t working and why?
We can’t see your code and can’t debug your project for you. It’s definitely important to learn how to step through your code and work what isn’t working: Unity - Manual: Debug C# code in Unity
The first step of course is to figure out hat isn’t working, then and only then can you reason why it isn’t working.
This doesnt really answer the question - youve shared nothing but a few words saying it doesnt work - “manage a shop panel” doesnt tell us what it does, that is what the user might use it for, what does it do? read from a database? read from web apis? read from files? read from scriptable objects? addressables? as I mentioned “How” does it do something, what exactly is it doing, if you wrote it, "manage a shop panel " doesnt tell anyone what it does in terms of code. Are you using hotreload or turned of refresh scene on run etc? so perhaps it does something because it doesnt stop running in background, where as newly opened it hasnt started yet?
we cant guess everything without some hints, so far, zero hints.