Unity Addressable for player skins
I am wondering if I've engaged in some bad coding practices that will force me to kind of recode pretty much my whole PlayerController. Or I guess migrate it over to the GameManager.
I have a PlayerController script and a GameManager script as standard. In my PlayerController script I have included stuff like the fuel bar, tracking when the engine should shut off due to lack of fuel, adding fuel, audio sources, particles, etc. As of right now I am creating each of the different skins to store as prefabs w/ particles and sound to call as the addressable. I have no idea how it will interact with calling a prefab that includes a player controller script.
How will the public audio sources react upon being called. Will I have to move all of these things over to the GameManager script? Or do I need to make them private and initialize them in the start method?
I am backing up my file daily because I feel like I'm one click away from a catastrophic failure lol. I really appreciate any and all help!
(To try to consolidate, I understand the difference between public and private variables. I just dont have any idea how fundamentally a script reacts upon getting called. If I create the game object essentially, and initialize all the public variables then create a prefab of that game object. Will I get a bunch of null reference exceptions when that object is loaded. Or will it react more so how I imagine/assume and it will be created as it was copied.)
Your answer
Follow this Question
Related Questions
Disable and enable emission property of a material via C# script? 0 Answers
[HELP] Setting the parent of a transform which resides in a prefab is disabled 1 Answer
[Solved]Weird Time.timeScale behavior 3 Answers
Having trouble moving a GameObject to another scene and Transform it to a different position 0 Answers