The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our

Please check if you can find an answer in our extensive documentation on PUN.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

PhotonPlayer Bot

2016-12-27 19:36:37

I'm developing the following game:
In the game's code there is no difference between a bot and a player other than the bot having an additional AI_Control script which takes control of the spaceship. Player spaceships are instantiated using PhotonNetwork.instantiate while bots are instantiated using PhotonNetwork.InstantiateSceneObject.
The spaceships access their photon views and check their owners (PhotonPlayer) to get properties such as nickname and team. It ocurred to me that it would save me tons of duplicate code if I could create instances of PhotonPlayer for the bots. I should be able to create a PhotonPlayer of type Bot and assign it as the owner of a sceneview photon view.
What do you think?


2016-12-28 08:58:40

Hi @Fidel,

There was a good discussion on the same topic here.

2016-12-28 15:32:46

I read that, I want to know Photon devs' stance in extending the PhotonPlayer class to include 'bots' which can be assigned as owners of scene objects. This would save developers a lot of duplicate code. Basically, I'm inquiring about the feasibility of implementing such a thing in future updates.

Back to top