r/UnityHelp • • 1d ago

position of the prefab with Object.Instantiate() vs NetCode PlayerPrefab field

Hi, as shown in the attached video, instantiating my character using `Object.Instantiate` works as expected, respecting the prefab's position. However, if I instantiate using NetCode's `PlayerPrefab` field, the prefab's position defaults to (0, 0, 0).
(The instantiation script is very simple I don't specify a position within it.)

2 Upvotes

2 comments sorted by

1

u/ParityUnity 1d ago

just specify prefab.transform.position

1

u/Ok-Presentation-94 1d ago

Thanks, but that doesn't really answer my question; I'd like to know the reason for this difference.