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 ric_eng · Jun 01, 2011 at 12:04 AM · networkbroadcast

broadcast network

Hello everybody, I would like to know how to send a message to all network applications(unity of course ), such as a P2P? Without a structure for client and server.

Comment
Add comment · Show 5
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 Anxo · Jun 01, 2011 at 12:47 AM 0
Share

not sure you can even do it without a server client relationship. functions like RPC only work when connected.

avatar image ric_eng · Jun 02, 2011 at 08:49 PM 0
Share

can i make a server send a message to all clients? Or even a client tell the server to do this?

avatar image Anxo · Jun 02, 2011 at 08:57 PM 0
Share

yes, Its called RPCs. It works kind of like Broadcast message but requires a few extra steps. It allows you to send the command to Execute a function, send Strings, Vector3s, floats and int. you can send as many as you want so its very useful.

avatar image ric_eng · Jun 08, 2011 at 01:59 AM 0
Share

Team, i did it: 1ª Created one game object 2º Add networkview from component- miscellaneous 3º Created script

function Update() { networkView.RPC("print", RPC$$anonymous$$ode.All, "go!"); }

@RPC function print(text : String) { Debug.Log(text); }

4º Attached script in gameobject 5º Build & Run 6º Execute in Unity Editor.

Result on console : "Can't send RPC function since no connection was started."

What can i do to work?

avatar image asafsitner · Dec 13, 2011 at 11:29 PM 0
Share

Connect to a server...?

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by flamy · Dec 14, 2011 at 05:29 AM

host a server first and make the peers connect to it Network.Conenct then call this rpc after connecting!! if u r already calling connect check for the errors messages!

and also add if((Network.isServer)||(Network.isClient)) before ur Rpc call in update.

I would suggest u to take a look into some basic network tutorials like this

Comment
Add comment · Show 2 · 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 ric_eng · Dec 14, 2011 at 12:05 PM 0
Share

Sorry, i didn't understand it "for which u can download the source code and all setup instruction from unity website free!" how can i do it?

avatar image flamy · Dec 14, 2011 at 12:24 PM 0
Share

for the masterserver! take a look at this page http://unity3d.com/support/documentation/Components/net-$$anonymous$$asterServerBuild.html for buildin masterserver

and this page for download! http://unity3d.com/master-server/index.html

avatar image
0

Answer by ric_eng · Dec 14, 2011 at 11:21 AM

I had to follow creating a server, but the bad part is that whenever the need for the client server IP. Would make the client scan the network looking for a server and then find the IP connection and ask him?,

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 flamy · Dec 14, 2011 at 11:53 AM 0
Share

if u dont want the user to enter ip everytime use "$$anonymous$$asterServer", it will poll the host ip online and would enable it to access it from anywhere, but this would make ur game require internet facility! if u dont want this to go online, u have to maintain the masterserver locally, for which u can download the source code and all setup instruction from unity website free!

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

UNET - Broadcast Data from Android changes when PC joins Network 1 Answer

UNET - How to listen for StopBroadcastDiscovery() to finish? And can buffer be changed while BroadcastDiscovery is running? 2 Answers

Broadcast data not updating. 1 Answer

Iphone UDP Server Discovery 0 Answers

Override Network View ID 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