Adding "Score Text" to "Game status" prefab doesn't affect other levels

25_br_cud

#1

The score text works, but once I load the second level everything breaks to the point that not only the score text displayed is the original 1234567890, but blocks are no more destructible :smiley:

I’ve then realized that despite me clicking apply, the connection score text - game status is not present in the game status of the following levels!

Did I do something wrong or is it a limitation of prefabs?


#2

Hi,

Copies of prefabs in your scenes are not references but actual objects meaning they are independent from the prefab. If you change the values of a prefab while playing your game, the changes will not get applied to the copies of the prefabs in your scenes.


#3

Thanks for your answer!

I’m not doing it while playing the game, I have added the connection ScoreText - Game Status to the object in a level and applied the changes to all the prefabs (override button - apply) without the game running, and Unity recognizes the adding of the connection as a change, so when I click on “overrides” it’s displayed as such, but even if I apply it it doesn’t affect the other objects made out of the same prefab in other levels, and if I go back to the level where I made the changes and I click on overrides it still displays the change once again as if I hadn’t clicked apply


#4

Thanks for elaborating further on what you did.

Did you change the other game objects at some point so the connection to the prefab might be broken? What happens if you select the other game objects click on “Override” and “Revert all”? Does the content of the prefab get assigend to them?


#5

Nothing seems to happen. I had also made sure to do as the teacher, when he deleted the Game Status objects previously to make sure to be using the updated prefab.
Now I’ve done the procedure again, and now they do have the link, but only because I made them fresh out of the prefab and not as a change applied-override to the prefab to all.
The mystery goes deeper, because now I’m in lecture 71 where he shows how to change the name of class-script, and after changing the name of the script he also changes the name of the prefab, and instantaneously the objects made out of the prefab change their name to reflect the prefab name change (from Game Status to Game Session) aaaand… it doesn’t work in my case.
I get a bunch of errors

  • I have also tried closing unity and reopening it
  • I have tried doing the script file name change a second time and got the same result, which means the game objects not updating to reflect the new prefab name.
  • If I delete the objects (game session / status) and create new ones out of the prefab with the new name they do get the new name

#6

This does not look like a problem with what you did but with Unity or, maybe, a package. Since the message in the middle seems to refer to the GUI, could you share a screenshot of the score display and its inspector?

What is the Inspector in your screenshot referring to? Could you expand “Children” and “Panes”?

Have you already tried to reinstall Unity?


automatically bumped #7

automatically bumped #8

automatically bumped #9

#10

Archiving this question due to inactivity.
If this is still an issue please let us know or make a new question

Thanks


closed #11