Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 tomazsaraiva · Mar 09, 2010 at 08:17 PM · prefabmultiplayerfps

Multiplayer - creating server/client non-authorative with the FPS prefab

I'm trying to create a lan multiplayer game using the FPS prefab as the player.

I can instantiate the prefab on both client and server but the problem is that in each side I'm controlling both prefabs.

Thoughts?

Thanks for any help,

Comment
Add comment · Show 2
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 naruse · Mar 16, 2010 at 11:35 AM 0
Share

Hello, I dont have an answer, but, have you checked this? http://www.m2h.nl/files/$$anonymous$$2H_Networking_Tutorial.pdf

avatar image raptorkwok · Jun 05, 2014 at 04:37 AM 0
Share

dead link. Oops

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by paulsz · Oct 19, 2010 at 05:08 PM

If you check out the multiplayer tutorial (the one with the Storm Trooper ) there is a script there called RigidAssign.js.

This makes sure that what you control locally is not also controlled by a network view.

You can make a script, call it FPSPrefabAssign.cs (I prefer C# for scripting) and assign it to the FPSPrefab (the prefab that you instantiate and has attached a NetworkView component).

The only thing you have to write in the FPSPrefabAssign.cs script is:

void OnNetworkInstantiate( NetworkMessageInfo msg ) {

 //get the script that is sent over the network through the NetworkView
 FPSNetworkSynchronizer ns= (FPSNetworkSynchronizer)GetComponent(typeof(FPSNetworkSynchronizer));

 if ( networkView.isMine )
 {
     ns.enabled = false;
 }
 else
 {
     name += "(Remote++)";
     ns.enabled = true;
 }

}

Hope this helps. It is much better if you also take a look at the tutorial, you'll better understand this (possible) solution.

Comment
Add comment · Show 1 · 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 Fierce Waffle · Jan 11, 2011 at 11:19 PM 0
Share

thats says this Assets/Network/Networking Scripts/NewBehaviourScript.cs(10,5): error CS0246: The type or namespace name `FPSNetworkSynchronizer' could not be found. Are you missing a using directive or an assembly reference?

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

No one has followed this question yet.

Related Questions

Prefab not spawning on client correctly 1 Answer

Photon Networking Instantiating Problem 0 Answers

For my multiplayer FPS, the 3rd person character is not moving 0 Answers

Cant move FPS controller 1 Answer

yield WaitForSeconds c# 4 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