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 Arrod55 · Feb 04, 2013 at 06:26 AM · c#networkingnetwork

How do I send a simple Vector3 over a network?

How do I send a simple piece of data such as a Vector3 over the network? I don't want to replicate an entire player or anything along those lines, but rather just get access to a single piece of data being updated continuously from another computer, and sent to my game manager class to handle that data as I see fit.

More info on what I am trying to do:

I don't want to set up a host/client relationship, this is not that kind of multiplayer game. One player should not be hosting the relationship between the two. Rather I just want two clients to know of each others player position for as long as they are connected, which may end at any time, and a new player may come along. The closest thing I can think of for this is the networking of Journey, if that helps.

My thoughts are that a master sever will need to be created separately from the clients, and it would handle the data transfers, but for the first implementation, a static connection between two IPs would be fine.

If you provide any code in your answer, C# would be preferred over js. I am using a trial version of pro, and the final product, if made, will be made in pro, if this matters.

I have looked through a variety of tutorials and questions, but haven't quite found what I am looking for. Although I could also simply be approaching this incorrectly...

Edit: I am making some progress with some RCA functions (I think), and creating a simple server (different from the clients).. I could still use some help on this though! :)

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 Arrod55 · Feb 04, 2013 at 04:17 AM 0
Share

Note: This is my first time asking a question on this forum, but I have read many. If I am unclear in my request, let me know! :)

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by pakizip · Feb 06, 2013 at 09:30 PM

"Over a network", would you mean over WWW? If the answer is yes, well you can create a simple web server PHP or other language and write a simple script with GET and POST (is the easiest way).

You can find more informations here: http://answers.unity3d.com/questions/11021/how-can-i-send-and-receive-data-to-and-from-a-url.html

And for server side programming: http://davidwalsh.name/web-service-php-mysql-xml-json

Sorry for my english, have a nice day.

Pakizip.

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 Arrod55 · Feb 07, 2013 at 04:51 AM 0
Share

I mean to another person playing the game in Unity on a different machine. This could be done with an external (not in Unity) server, which might end up being the solution, but what I really need is for one client to be able to communicate to another client directly in Unity, perhaps after being given an IP from the master server?

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

10 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

Related Questions

C# How to have a gun select 1 Answer

C# How to make the gun remember who equipped it 1 Answer

modernized master server script? 1 Answer

Player object on host can interact with objects, client players cannot. 0 Answers

Unity3D Photon movement synchronization 0 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