テストキャラをネットワーク上に生成する



キャラをネットワーク上に生成する
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Photon.Pun;
public class RoomManager : MonoBehaviourPunCallbacks // 変更
{
void Start()
{
// テストキャラの生成
// (ポイント1)プレハブ化したデータを「名前」で指定する。
// (ポイント2)プレハブデータは「Resources」という名前のフォルダの中に入れる必要あり。
PhotonNetwork.Instantiate("TestChara", new Vector3(0, 5, 0), Quaternion.identity);
}
}





【2021版】BattleOnline(全37回)
他のコースを見る


キャラをネットワーク上に生成する
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Photon.Pun;
public class RoomManager : MonoBehaviourPunCallbacks // 変更
{
void Start()
{
// テストキャラの生成
// (ポイント1)プレハブ化したデータを「名前」で指定する。
// (ポイント2)プレハブデータは「Resources」という名前のフォルダの中に入れる必要あり。
PhotonNetwork.Instantiate("TestChara", new Vector3(0, 5, 0), Quaternion.identity);
}
}





テストキャラをネットワーク上に生成する