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 The-Oddler · Aug 06, 2012 at 08:16 PM · c#scenespacegenerate

Creating scene from code

Hi,

I'm making a coop space game. I wanted a big space world, and I was thinking of making each part of space (solar systems, planetary belts, ... or something, not yet sure of the size) it's own scene. So I'll have a bunch a scenes, each with a different place in space which you can jump towards. I might make some parts of space by hand, but others should be generated (at start probably all will be generated.)

So, I was thinking, making a scene structure, with each scene named like: "space-X-Y-Z" (with X, Y and Z being numbers.) Then you can jump towards any combination of x,y and z, it'll check if this already exists, and if not create a new scene with this name and generating content for it.

Now, I think my thinking is pretty solid, though I can't seem to find how I can create a new scene at runtime. Is this even possible?

Note: Would very much appreciate, if you give any coding samples, you do this in c#, since that's what I'm using.

Thanks!

-Pablo

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

1 Reply

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

Answer by ScroodgeM · Aug 06, 2012 at 08:50 PM

if your scene will generate on client side, you will not be able to save it to scene so that other players are also able to see the same scene.

i would do the simple thing: generate your scene basing on random seed, and seed calculate based on coordinates. so, 10 different players on loading scene in same coordinates will see the same scene.

you just should describe the algorithm once and forget about continuously increasing scene quantity and client's data size 8)

feedback here if this solution is not applicable

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 The-Oddler · Aug 06, 2012 at 09:21 PM 0
Share

well I was just thinking, do the random stuff on one computer, and then just generate that same scene on all connected players as well (by sending object information to the other players.) Though there might be better ways (if you know any.) Though I was just wondering how to create a new scene (not bothering with the lan-coop stuff yet), once I can do that, I can start thinking about how to get that scene to the other players :P

Thanks!

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

8 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Multiple Cars not working 1 Answer

Distribute terrain in zones 3 Answers

Can a script be loaded to a next scene? 3 Answers

Help with loading a scene,Help changing scenes (C~ script) 1 Answer

2d Object floating in space HELP! 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