EVERYTHING

This commit is contained in:
niko
2026-06-01 17:19:55 +02:00
parent d063b81359
commit b62bac090b
1081 changed files with 1716544 additions and 0 deletions
@@ -0,0 +1,28 @@
using Photon.Pun;
using UnityEngine;
namespace Photon.VR.Player
{
public class PlayerSpawner : MonoBehaviourPunCallbacks
{
[Tooltip("The location of the player prefab")]
public string PrefabLocation = "PhotonVR/Player";
private GameObject playerTemp;
private void Awake()
{
Object.DontDestroyOnLoad(base.gameObject);
}
public override void OnJoinedRoom()
{
playerTemp = PhotonNetwork.Instantiate(PrefabLocation, Vector3.zero, Quaternion.identity, 0);
}
public override void OnLeftRoom()
{
PhotonNetwork.Destroy(playerTemp);
}
}
}