Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by deepan123 · Jan 08, 2015 at 12:27 PM · photonmultiplayer-networking

How to join all the players to the same room in photon Unity Offline Mode?

I have designed a multiplayer game in Unity 3D using Photon Unity Network plugin for multiplayer gaming. It is working fine in the online mode. I want the same multiplayer game running offline without the Photon cloud. I want all the players to join to the same room. But when I run the code below I can see only my player but not any other player.

 void Start () {
 
         spawnSpots =GameObject.FindObjectsOfType<SpawnSopt>();
         Connect ();
         //PhotonNetwork.CreateRoom("my");
         PhotonNetwork.JoinRoom("my");
         SpawnMyPlayer();
     }
 
 void SpawnMyPlayer(){
 
         if (spawnSpots == null) {
             Debug.Log("No SpawnSpots Found");
             return;
         }
 
         SpawnSopt mySpawnSpot = spawnSpots[Random.Range(0,spawnSpots.Length)];
 
         GameObject myPlayerGO = (GameObject) PhotonNetwork.Instantiate ("PlayerController", mySpawnSpot.transform.position, mySpawnSpot.transform.rotation, 0);
         ((MonoBehaviour)myPlayerGO.GetComponent ("ThirdPersonController")).enabled = true;
         ((MonoBehaviour)myPlayerGO.GetComponent ("ThirdPersonCamera")).enabled = true;
 
     }

I am trying to join all the players to the same exact room. But why it is not happening?

Please note that I am talking about Photon offline mode and I don't want to make my game single player. I want an offline multiplayer game.

Thanks in advance.

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image abhijeet1001 · Jan 08, 2015 at 12:35 PM 0
Share

why are you using photon if u want offline game ? just make no. of bots u want and intantiate them at random spawnpoints and handle there respawn on deaths etc

avatar image deepan123 · Jan 08, 2015 at 01:01 PM 0
Share

@abhijeet1001 can you please make it a bit more detail. I am new to game program$$anonymous$$g. And also if you can suggest me a tutorial for this it will be really helpful.

avatar image abhijeet1001 · Jan 08, 2015 at 01:22 PM 0
Share

i am not sure mate i am new to unity too so i am not sure how to get it working , but the logic behind my answer was you dont need photon for you offline game you can handle it your self without needing photo just create a variable for no. of bots and make that many number of prefabs using script and spawn them randomly on your spawn points its not hard to do will need little bit of research as i am not familiar with much of the functions and commands but can be done pretty easily problem you will face with offline fps will be making AI move and attack etc

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Photon Networking (Viking Demo) - GetRoomList() func not working 2 Answers

Can we use "Photon cloud" for a card game like poker in Unity3d? 1 Answer

Using Photon to Send Screenshot to other Players 0 Answers

Getting an "Unknown Resolve Error" with Photon.MonoBehaviour 1 Answer

How to check Time when player is join the room in Unity Photon Networking 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges