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 tone20 · May 14, 2014 at 05:52 PM · networkingmultiplayerphoton

Multiplayer Problem

Ok guys im back with another problem

ok so recently i started making a multiplayer game with Photon Cloud everything worked normal even multiplayer with my brother :D ok so then i realised that when i play the sit animation the camera is where it was when i was standing so then i realised that i had camera attached to the first person controller or my player so then i attached my camera to the head of the player ok my player scripts are made like so Camera,playermovement,characterController are disabled on the start so i don't controll other player when i play on lan but as soon as i attached the camera to the head it stopped working. when i play the game i get black screen (what means that the camera didn't enable on the start..) :( it should enable the camera as soon as the player spawns as so with the other scripts i don't know if its wrong with the camera or script but i really need to have camera attached to the head So please if someone had the problem and he solved it if he can help me whit this im realy bad with scripting :P

Lp Tone20

Comment
Add comment · Show 1
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 ThePunisher · May 14, 2014 at 06:01 PM 0
Share

I'm not entirely sure how you made all that work if you're "bad" at scripting :p. As friendly tip, when you run into issues dealing with scripting make sure you provide the script in question as we can only take a guess at what the problem may be if we can't see the script.

1 Reply

· Add your reply
  • Sort: 
avatar image
-1

Answer by tone20 · May 14, 2014 at 07:08 PM

Ok yea so when you mentioned about how i made the script all i did was folowing the tutorials from this guy https://www.youtube.com/user/quill18creates Thats the problem im having CLICK THE LINK

Comment
Add comment · Show 3 · Share
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 ThePunisher · May 14, 2014 at 07:12 PM 0
Share

Friendly tip, there's a comment button under every response please use that ins$$anonymous$$d for comments. The field at the bottom of the page is designated for answers only, not comments.

avatar image ThePunisher · May 14, 2014 at 07:19 PM 0
Share

Ok, so in your video I noticed there is a null reference exception that occurs when you hit play once you've moved the camera under the head object. Click on the red text at the bottom of the Unity editor and post the error it describes in the console window here (as a comment please, lol, no more comment answers).

avatar image tone20 · May 14, 2014 at 07:24 PM 0
Share

NullReferenceException: Object reference not set to an instance of an object Network$$anonymous$$anager.Spawn$$anonymous$$yPlayer () (at C:/Sites/$$anonymous$$ultiFPS - ep 14/Assets/Network$$anonymous$$anager.cs:125) Network$$anonymous$$anager.OnJoinedRoom () (at C:/Sites/$$anonymous$$ultiFPS - ep 14/Assets/Network$$anonymous$$anager.cs:106) UnityEngine.GameObject:Send$$anonymous$$essage(String, Object, Send$$anonymous$$essageOptions) NetworkingPeer:Send$$anonymous$$ono$$anonymous$$essage(PhotonNetworking$$anonymous$$essage, Object[]) (at C:/Sites/$$anonymous$$ultiFPS - ep 14/Assets/_I$$anonymous$$PORTED/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1616) PhotonNetwork:JoinRandomRoom(Hashtable, Byte, $$anonymous$$atchmaking$$anonymous$$ode) (at C:/Sites/$$anonymous$$ultiFPS - ep 14/Assets/_I$$anonymous$$PORTED/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:1295) PhotonNetwork:JoinRandomRoom(Hashtable, Byte) (at C:/Sites/$$anonymous$$ultiFPS - ep 14/Assets/_I$$anonymous$$PORTED/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:1265) PhotonNetwork:JoinRandomRoom() (at C:/Sites/$$anonymous$$ultiFPS - ep 14/Assets/_I$$anonymous$$PORTED/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:1251) Network$$anonymous$$anager:OnJoinedLobby() (at C:/Sites/$$anonymous$$ultiFPS - ep 14/Assets/Network$$anonymous$$anager.cs:94) Network$$anonymous$$anager:OnGUI() (at C:/Sites/$$anonymous$$ultiFPS - ep 14/Assets/Network$$anonymous$$anager.cs:62) O$$anonymous$$ This is the Null reference and here is the code that enables the main camera (($$anonymous$$onoBehaviour)myPlayerGO.GetComponent("$$anonymous$$ouseLook")).enabled = true; (($$anonymous$$onoBehaviour)myPlayerGO.GetComponent("Player$$anonymous$$ovement")).enabled = true; (($$anonymous$$onoBehaviour)myPlayerGO.GetComponent("PlayerShooting")).enabled = true; myPlayerGO.transform.FindChild("$$anonymous$$ain Camera").gameObject.SetActive(true); } }

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

21 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity networking tutorial? 6 Answers

How to connect to hosted scene (Multiplayer) 2 Answers

how to test your multiplayer game 2 Answers

How to make GUI update for all players in a networked game? 1 Answer

setup a php master server 2 Answers


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