r/UnityHelp • • Oct 11 '26

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

Enable HLS to view with audio, or disable this notification

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 Oct 11 '26

just specify prefab.transform.position

1

u/Ok-Presentation-94 Oct 11 '26

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