- Home /
im making a multiplayer game, and it has buttons that allow you to craft different blocks, how do I set a reference to the player game object so each player can build different amounts of blocks?
basically, I'm trying to make a crafting system and in this crafting system, you have to press a button to craft something each player has a script with variables that have the amount of resources, weapons and blocks they have, as well as a function that removes resources and adds blocks to the players inventory. when a player presses a button, that function is executed thing is, when I made the player into a prefab, the reference to the player disappeared, and when I tried to reference the player prefab, pressing the button changes the inventory of the prefab, not the player that clicked the button I kind of understand why it doesn't work, but I also don't understand how to fix it please help iv'e been stuck on this for days
Your answer
Follow this Question
Related Questions
Cannot implicitly convert 'UnityEngine.UI.Button[]' to 'UnityEngine.UI.Button' 1 Answer
Moving between UI Buttons Using Keyboard Arrows 0 Answers
UI Button-parameters inaccessable in spite of "using UnityEngine.UI" 4 Answers
UIButton highlighted color not working 0 Answers
Change UI Buttons Focus Order 0 Answers