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 jeThomas · Oct 22, 2014 at 07:02 PM · c#instantiatescenedefault

[C#] Is it possible to instantiate a scene?

More accurately can I instantiate a scene; make a copy and call it through script for it to load. I would like to make it a default scene, with the basics (Skybox and some GUI). But I would like copies of this same scene to be loaded for a multiplayer purpose game.

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

3 Replies

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

Answer by Kiwasi · Oct 22, 2014 at 09:23 PM

For editor applications you can use this NewScene.

For runtime applications you can simply load a blank scene and build the entire scene via code. Another option to explore is pseudo scenes. Make multiple areas within the same scene and move the camera about as needed.

Instantiating a scene really doesn't make sense, as your game can only be in one scene at a time.

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 jeThomas · Oct 22, 2014 at 09:47 PM 0
Share

Yeah I suppose you're right. I was thinking after clicking the [Start] button, then it would create an existing scene (basically like the prefab, and how you instantiate that). And by create I meant instantiate. But thanks for the help! This makes sense to me.

avatar image
0

Answer by thef1chesser · Oct 22, 2014 at 07:07 PM

You can create a new scene with those things in it, add it to build settings and then call it by Application.LoadLevel("name");

But I don't think it's possible to create an empty scene by code.

Comment
Add comment · Show 5 · 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 jeThomas · Oct 22, 2014 at 07:23 PM 0
Share

Hmm, basically I want to create a table with four people (Card Game), But when I have people load into that scene itself, ins$$anonymous$$d of creating a bunch of tables (scene rooms we'll call it) I don't want them to join the same scene with the same table and cards dealt. If they are trying to create a different table. I am sure I can implement these many scenes just by copying and pasting them; I was just curious if there was an easier way?

avatar image thef1chesser · Oct 22, 2014 at 07:47 PM 0
Share

Do you mean like online connection and that the people joining basically have their own scene to play in?

avatar image jeThomas · Oct 22, 2014 at 08:11 PM 0
Share

Yah, exactly like that mann. I mean, I guess I don't know how multiplayer works, but how would I do this?

avatar image thef1chesser · Oct 22, 2014 at 08:21 PM 0
Share

well... Try looking at the Unity network options. Searching for info about it gives me tutorials from several game studios. I'm pretty new to that stuff as well and still figuring that out.

avatar image jeThomas · Oct 22, 2014 at 08:26 PM 0
Share

Alright, alright, Appreciate it tho.

avatar image
0

Answer by bubzy · Oct 22, 2014 at 09:17 PM

you need networking for this to happen, check out Photon

http://u3d.as/content/exit-games/photon-unity-networking-free/2ey

https://www.youtube.com/watch?v=AIgwZK151-A∈dex=1&list=PLbghT7MmckI7BDIGqNl_TgizCpJiXy0n9

this uy made some nice tutorials for using photon, while it doesn't really fit a card game, the principles are exactly the same. if you made a scene that instantiated a copy of itself, it would have that code in it, to instantiate another, and another, and another, finally your program would become sentient and start plotting its way into the internet to take over the world and destroy humanity, do the world a favour and look up the networking!

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

Potential 4.3.1f1 bug Instantiate c# 2 Answers

How to load a scene level randomly without repeating 2 Answers

Distribute terrain in zones 3 Answers

Intantiate problems 1 Answer

Multiple Cars not working 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