hello, so I have a public function using some public variables. The function is called from outside the script on a button component and when run it doesn’t use the public variables in the script but just makes its own with the same names and values. Any way I can fix that?
My script: pastemyst | (untitled)
1 Like
I got my stuff fixed. It was some weird prefab parameter assignment going on
1 Like
I want to expand a little bit your solution to the problem for other people. In my case I had almost the same weird behavior. You should carefully check your object references, I was instantiating a player object from player prefab object and had references for player’s class controller script. Then I noticed that I am referencing to prefab’s controller and not to player object’s controller. I hope that would help anyone.
PS: Btw thanks to CommandDan for posting about his problem. I hadn’t no idea that such problem can appear.