- Home /
Adding dropdown options via user input
I have two scenes, Save scene and view scene. In Save scene, there is an input field and a save button which enables to save the user input. In View scene, there is a dropdown which shows the user's input from the Save scene. I want to know how to save the user input from Save scene and how to make them visible on View scene's dropdown options.
Answer by Kingofweirdos · Dec 08, 2017 at 09:32 AM
Quite simple Public inputfield renamethis; Public string actualnameofthefield; Void start(){ Actualnameofthefield =Renamethis.text; } Then in the drop down just set the button text value equal to the actualnameofthefield. If you look it up on Google there are ways to find lines code from separate scenes so just get the code for actualnameofthefield
Completely untested and typing at 2am sure to be some errors
The code part didn't turn out right I will fix it here Public inputfield renamethis; Public string actualnameofthefield; Void start(){ Actualnameofthefield =Renamethis.text; }
Remember to drag the inputfield into the inputfield portion of the code in the editor
Public inputfield renamethis;
Public string actualnameofthefield;
Void start(){
Actualnameofthefield =Renamethis.text;
}
Your answer
Follow this Question
Related Questions
DropDown menu(add item from input field): Object reference not set to instance of an object C# 1 Answer
Make use of a button in a drop down menu? 0 Answers
Storing button input and tags and then transfering information to dropdown menu 1 Answer
How to get Rect from scene Button ? 1 Answer
When enter deathscene cursor disappear 0 Answers