I have a options menu on 1 scene but when you load into the game (Switch scene) then come back (Switch scene) it loses all the settings. I was trying to do it with DontDestroyOnLoad and could not get it to work an i could not figure out how to read and write a text file. What is the best way to keep all the settings? Image: Here
Related Questions in C#
- How to call a C language function from x86 assembly code?
- What does: "char *argv[]" mean?
- User input sanitization program, which takes a specific amount of arguments and passes the execution to a bash script
- How to crop a BMP image in half using C
- How can I get the difference in minutes between two dates and hours?
- Why will this code compile although it defines two variables with the same name?
- Compiling eBPF program in Docker fails due to missing '__u64' type
- Why can't I use the file pointer after the first read attempt fails?
- #include Header files in C with definition too
- OpenCV2 on CLion
- What is causing the store latency in this program?
- How to refer to the filepath of test data in test sourcecode?
- 9 Digit Addresses in Hexadecimal System in MacOS
- My server TCP doesn't receive messages from the client in C
- Printing the characters obtained from the array s using printf?
Related Questions in UNITY-GAME-ENGINE
- How to use invokerepeating and make ui text fade in/out over time?
- Player input not working properly in unity
- Get block in Mesh Unity
- Does Unity render invisible material?
- Physics.OverlapSphere couldn't detect my ‘Player’
- Cannot sync non-player objects in Unity mirror
- How to script a simple collision using hands in OVRCameraRigInteraction?
- Drawing on 3D object at Unity
- How to Override Spline Rotation for Player-Controlled Car in Racing Game?
- Why doesn't my enemy shield take damage first. Instead both enemy and shield are being destroyed together
- unity + Vuforia balck screen in android AR app
- how do I change an objects tag when the game closes
- How to remove white space in a user's input through an input field in Unity?
- Timeline doesn't start eventhough it recognises the trigger input
- Ragdoll 2D Aiming
Related Questions in UNITY-UI
- OnBeginDrag does not get called when a nested Canvas is attached in Unity UI
- Variables not showing on inspector when I extend Unity UI button
- Using Unity UI Toolkit and New Input System together
- Text Mesh Pro texts do not appear in apk
- Update Script for TextMeshPro
- Blocking interaction with 3D game objects by UI game objects
- How to add buttons over 3D models for an AR app in Unity?
- How to get value of transitionDuration in C# for Unity UI Toolkit
- Create following UI and Head-Lock UI in VR
- How do i display the text with the list i have stored ? It is not assigning in UI text ...?
- Unity Scroll View inside a Vertical Layout Component not accounting for Content size
- Unity-Could someone explain how the onClick event works in unity 2022.3 and above
- How to set interactable false when we click a button in unity
- UI Asstes from Adobe Illustrator have low quality in unity
- How to change a sprite (ui.image.sprite) and delete the previous one from RAM
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
In Unity, you can save and load settings via the PlayerPrefs class. This is a static class which means you can access settings anywhere in your Unity script files.
Example usage:
Reloading the settings in the menu scene will need to be done in the
Start()method of your script. You will just need to set the values of your GUI components to the return value of the getter methods in thePlayerPrefsclass.