I have two players. One of them has a script with a "public Transform otherPlayer; " property.
In Unity, I've added otherPlayer to the free slot of the FirstPlayerScript and now I want to save the FirstPlayer as prefab.
When I did that (I drag and drop the FirtPlayer to the prefabs folder) and then checked if the prefab has all information stored correctly, I saw that the slot in FirstPlayerScript for OtherPlayer was empty, when it shouldn't be.
When I try to Instantiate the prefab, it, again, appears with the OtherPlayer slot empty.
How can I fix that and save the prefab with the OtherPlayer slot filled ?
↧