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 /
This question was closed Mar 09, 2019 at 04:50 PM by Braddydawg for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by Braddydawg · Mar 09, 2019 at 01:02 PM · scripting problemcodepage

Need help <3

Hello hope you are all well, I'm sorry to be bothering you all today,

I started learning to code about a day ago never done it before but I'm planning on making a simple app. Where at the home screen there is an option, to pick things for you to do, Like I could press a button for "What shall I drink" then the next scene loads and with TextMeshPro it should say "Have a nice cup of coffee". I got the Scene loader down when I press the button, But I am not sure how making the next scene load up with a Random sentence already loaded as soon as it loads into the next scene.

I was kind of hoping to make all the selections random and for all the sentences to be added with [SerializeField] so I don't have to keep changing it in the code but can do with unity and end up with like 20+ options all randomized. Sorry if my explanation isn't clear enough.

Comment
Add comment · Show 4
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 WarmedxMints · Mar 09, 2019 at 01:46 PM 0
Share

There really isn't need to have a scene for each response. You could just select a random response from a string array and display that.

avatar image Braddydawg WarmedxMints · Mar 09, 2019 at 01:59 PM 0
Share

The scene is for the next screen So if I Press What shall I have to drink, the next scene will show "have a hot cuppa coffee" then with another button "What Shall I eat".

avatar image WarmedxMints Braddydawg · Mar 09, 2019 at 02:54 PM 0
Share

It doesn't need a new scene though, you could all that in one and then have a nice swipe effect as the 'current screen' goes off to the left and the 'next screen' comes in from the right.

Show more comments

1 Reply

  • Sort: 
avatar image
0
Best Answer

Answer by NikLaws · Mar 09, 2019 at 03:02 PM

If I correctly understand what you're trying to do - you will need to add a c# script and attach it to the 2nd scene. The void Start() function is called as the scene is loaded. There you can set the text to whatever you want it to be and it will be loaded with the scene.

edit: However, as WarmedxMints said, there really is no need for another scene to do something as simple as that.

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

Follow this Question

Answers Answers and Comments

178 People are following this question.

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

Related Questions

Script to Move different parts of Gantry robot in X,Y,Z axis in sequence 2 Answers

Need to increase the gameobject value . 2 Answers

change the source image in update function? help? 1 Answer

Issues with Update and script. Why is it not repeating? 1 Answer

Child not accepting variables from the parent 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