- Home /
Why Is This Inactive Script Is Still Affecting My Game?
In my game I use the standard NetworkManagerHUD for my first network game.
I have a Player prefab set to "Local Player Authority" which is spawned when a user connects.
The Player prefab also has one active script and one inactive script.
The active script handles some transforms in the game with a [ClientRPC], however it stops working if I remove the inactive script from the player.
Why does this happen?
We really can't answer this question unless we see the code that could be responsible. Also if there's any errors in the console when the issue occurs. What does "stops working" mean, nothing happens? Errors? game crash? or something does happen but not working how it's supposed to. We need more info.If I were to take a stab in the dark at this, I'd say you may be referencing some variable from the inactive script in the active one, but without the code that's all I can guess.
Without further information this is hard to say, but inactive means only that Update(), FixedUpdate() etc. are no longer called. You can still get the script via GetComponent() and call all of its methods. Probably your network code is still using it somewhere and by removing it, you take that functionality away.
Your answer
Follow this Question
Related Questions
I need help with unity navigation networking 1 Answer
Networked Ready check 1 Answer
MLAPI Client can't see a gameobject 0 Answers
Mirror : How to Sync child objects active status on join? 0 Answers