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 SlitherGod · Oct 08, 2014 at 04:51 AM · scenescenes

How Are Scenes Handled?

Hi im asking this question because i honestly don't know so Say i make Scene 1 and i add a script to it then i save Scene 1 and Scene 1 is finished and i start Scene 2 if i change the said script does it change it for Scene 1 or Does Scene 1 Only Keep the script that was saved at the time?

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 Kiwasi · Oct 08, 2014 at 05:15 AM 0
Share

Just like coding, a couple of full stops and capital letters in the right place will make a world of difference.

2 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by Landern · Oct 08, 2014 at 04:58 AM

Scripts are code, they are instructions for actions(methods/functions) and contain properties and fields(attributes of that script or type). If you have MyPlayerHealth.js which has every function needed to manipulate the players health as well as the health it self. If you attach that to a game object in a scene, save the scene, open a new scene, add a gameobject with that script, change that script, yes it will affect scene one.

The script is the blueprint for an object.

Think of the scripts like a cookie cutter, if you use it as a circle, then the instant you use it on the dough, you get a circular shape. However later you want to use it but bend it into some other sharp(a star). The next time you use it on the dough you get star shapes, but now you have an issue, you can't get the circular shape without bending it back(reverting/changing it) or creating a new cookie cutter.

The same happens with scenes and the reference to a script on the gameobjects, if you have a single script, then when a scene is created/edited the at the time referenced script is instantiated in memory, if you change it, the change will be reflected in that scene. If you have other scenes that reference it, then yes it the change will exist in that other scene(s) as well.

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 Kiwasi · Oct 08, 2014 at 05:14 AM 0
Share

Good on you for figuring out what the question was.

avatar image
0

Answer by Kiwasi · Oct 08, 2014 at 05:16 AM

All of your assets (scripts, prefabs, textures, models, sounds....) are shared across all scenes.

So if you change an asset anywhere it will change everywhere.

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

scene loading 100's of scenes 3 Answers

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Scene of index 1 is active when I start game and it should be scene of index 0? 0 Answers

click change scene help! 2 Answers

Selecting scene for your main menu 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