# Why are floats not changing unless I've selected the prefab?

I am making a really simple game where you are a dot and you go around and shoot other dots. I have it set up so in the start menu you can spend points to upgrade your dots stats. (ie. make it shoot faster, move faster.) I am using a prefab NumberHolder object with a script on it to hold the numbers between scenes and I am having an issue. If I have the NumberHolder selected in the inspector the game works perfectly, but if I don't have it selected the numbers all change like normal while I am on the scene that adjusts the numbers, but when I go to the next scene which is the game the numbers seem to have a 50% of not updating to the player. Furthermore, if I select the NumberHolder at this point the numbers are all still at their starting stats. I used to have the NumberHolder located 3 folders deep, Assets/Prefabs/StatHolders and it didn't work at all unless it was selected. I have since moved it up to the Prefabs folder and it now works around 50% of the time. Do I have it to deep? If so is there a way to work with it that deep because I want to try and stay organized or is there a whole better way of doing what I am attempting to do here?

I am using Unity 5.4.0f3 and coding in C#.

• How do you link the NumberHolder to the rest of your code? Oct 25 '16 at 14:57
• I create a object and add a NumberHolder script to it that has a bunch of public floats that are adjustable by buttons before the game starts. I than turned that object into a prefab and deleted the original object. I get the numbers with my PlayerController script using GetComponent<> and pass a few variables to the projectiles through the player controller script. Oct 25 '16 at 15:22
• I attempted an answer, but not 100% sure I understood what you're doing. Are you modifying the prefab outside the scene at runtime? (if so, how?) Oct 25 '16 at 16:36
• I am trying to modify the prefabs in the game. Before the game you go through a few menu scenes where you select all your stats. Those are menu scenes before the actual game, and I don't have the objects that access those numbers in those scenes. I am very new to coding, so I'm going to do some research on some of your solutions, they look like they mite work. Oct 25 '16 at 16:55