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 Tabu · Jun 16, 2011 at 08:29 PM · multiplayernetworktestingtest

Testing Network Code in Unity

I am currently working on getting some network code to work. And since I am not that good at programming, I need to test ALOT to make sure my code works, so I don't end up in a situation where something breaks, and I have to use alot of time trying to figure out what I broke.

So right now, I export what I have, to my labtop, set up my desktop as a server, and connect from my labtop. If I try to do everything from my desktop, only the active program running will update (So if my server window is not active, everything freezes) It is absolutely annoying that I have to export and transfer everytime, and have a setup of two coputer to test. Does anyone have experience and some suggestions how I can do quick itterative testing on only one computer?

Thanks for your time :)

Comment
Add comment
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

4 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by rstuven · Aug 30, 2011 at 09:45 AM

Enable "Run in background" option in Player Settings.

Comment
Add comment · 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
1

Answer by Techsuport · Aug 28, 2011 at 07:33 PM

what you should be doing is have playInBackground turned on, so the editor and any instances of the game still update the networking stuff.

and for networking i plan to make my projects hostable online so i build for the web player, and i can have multiple instances of my project open in different browser tabs, while staying connected to that network in the editor (still able to interact with the project view)

this way you dont have to use a thrd party app

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 Tabu · Aug 28, 2011 at 08:22 PM 0
Share

I dont understand, how can you have several instances running in different tabs? Does that work with playInBackground? And where do you set playInBackground?

avatar image
0

Answer by DaveA · Jun 16, 2011 at 08:47 PM

You can set up a local server. I like ServerToGo. It can also be a real server, but I wouldn't trust it for being very secure that way. But for local testing, it's great. PHP and mySQL come with it.

BTW: No matter how good you are at programming, a LOT of testing is always a good idea.

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 Tabu · Jun 16, 2011 at 08:58 PM 0
Share

This is kinda what I do, my problem is that I have to have a setup of two computers. What I would like, would be something where I just export to the same computer, run and connect to the server that is run from the editor.

avatar image
0

Answer by Tabu · Aug 28, 2011 at 11:38 AM

Ok, so I found a propper sollution for this. It acually working ok, and its free :)

I installed an old XP on Virtual Box: (http://www.virtualbox.org/) From here I can easily just share a folder, and run the game server in the Virtual Machine, then go outside without loosing focus to launch my game. Works fine :) And I dont have to have a setup of more real machines to test my network code.

Pointers if you try to do this. Remember to set it up so that the VM uses the graphic card (as basic, it has no graphic card.) and add a network card and set it to "host only" this will make it easier to test stuff.

Having trouble doing this, let me know and I will help :)

Comment
Add comment · 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

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

Offline testing a player object? 0 Answers

Building and Running 1 Answer

How can I instantiate different prefabs for owner and proxy using photon? 2 Answers

UNET : SyncVar value not updating, hooks firing 1 Answer

Best Multiplayer Dev / Test Workflow? 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