Fix default spawn issue TODO: Fix issue with spawning when loading from other scenes
17 lines
428 B
C#
17 lines
428 B
C#
using UnityEngine;
|
|
|
|
public partial class PlayerSpawnController : MonoBehaviour
|
|
{
|
|
public GameObject Player;
|
|
[SerializeField]
|
|
private GameObject _playerPrefab;
|
|
[SerializeField]
|
|
private GameObject _spawnLocation;
|
|
|
|
private void Start()
|
|
{
|
|
Player = Instantiate(_playerPrefab);
|
|
Player.transform.position = _spawnLocation.transform.position;
|
|
Player.transform.rotation = _spawnLocation.transform.rotation;
|
|
}
|
|
} |