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
1
Question by jc_lvngstn · Dec 17, 2011 at 03:46 PM · serverprojectclientsource

client/server in the same project?

When creating a multiplayer game, do you normally have one project with all of the code in there? Assuming your server needs access to Unity, and can't run as a seperate app.

My current project is one Unity project, with different scenes for the client and server. I don't want server side code to be available in the client package. I'm using Visual Studio for my script development, the project contains the client and server code, and I think I'm going down a dark, dark road.

It seems to me that at -least-, I should split my visual studio project into a client and server project, and if nothing else client distributions won't get the server side dll. But I'm a little fuzzy on how to implement this, or what the architecture would look like.

I do know that I want the client and server unity packages to have access to the same unity assets. I originally started with a client and server project, but maintaining the shared code between them was getting to be a hassle, so I merged them.

So, I'm thinking perhaps in visual studio I should end up with three projects for the Unity package...one for the client, one for the server, and one for shared resources. I would have one Unity project. From what I understand, if I create a client scene, server scene, etc...the client scene will only include resources that the client uses, and not everything the server knows about also. Honestly, the more I think about this, the more it seems I need to just split this back into a separate client unity project and server unity project.

Any thoughts tips on this would be very much appreciated.

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 jc_lvngstn · Dec 17, 2011 at 04:12 PM 0
Share

I went ahead and created a common project, for common resources shared by both the client and server. The post build process copies the dll to the assets folder, and everything appears peachy. For now ;) Next, I'll start splitting the server code into a server dll. This won't go to the clients, so hopefully that will protect some resources. Any thoughts or tips on this would be welcome!

0 Replies

· Add your reply
  • Sort: 

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Building Client and Server apps from single project 1 Answer

Dedicated Server In Seperate Project 2 Answers

Server and Network no communication 1 Answer

I don't know difference between interpolation and non-interpolation 0 Answers

Can anybody please share how to overcame the overlay of ui buttons of the two clients joining the same game in UNET System? 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