PUN 2 - Create a Player

Options
Hi,
I am currently at a state where I am migrating from PUN Classic to PUN 2 and I have a code which creates a PhotonPlayer's (bots) which looks like this:
var player = new PhotonPlayer(false, 0, botNames[i]);

In PUN 2 as far as I can see PhotonPlayer is now Player and all constructors are only for internal use, so I can't do:
var player = new Player(botNames[i], 0, false);

What should I use in this situation in PUN 2?
I couldn't find anything about this in migration notes.

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @hardartcore,

    Thank you for choosing Photon!

    Good question!
    Not sure how you were using this in PUN Classic by faking an actor and injecting it in the room and to the normal flow.

    We should add this to the migration notes once we figure out what to do best here.

    I suggest you send an email to developer@photonengine.com and explain how you were using this before.
  • So after writing an email to `developer@photonengine.com` I got this response:

    'You create your bot network prefab as you would create it if it was for your players, only that if they are bots, they are instantiated as scene network objects. you use PhotonNetwork.InstantiateSceneObject() for this.'

    Which is not really clear to me how can I create a Player object. I am already instantiating the player as scene object with version 1 and want to know how to achieve the same result using v2.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hey @hardartcore,

    We will discuss more internally, there was a misunderstanding probably.
  • hardartcore
    Options
    JohnTube wrote: »
    Hey @hardartcore,

    We will discuss more internally, there was a misunderstanding probably.

    Any news on that?
    It's been almost a month since my first post.