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 TheLedworks · Apr 30, 2012 at 09:26 PM · save datacreatefoldersave game

Save Game Folder

I want to create a save game folder that will hold terrain data and game settings e.c.t

So, there are two things i need to know

  • How do i create a folder using unity? And put it on say the desktop for example...

  • And How do i create a text file and write to it in this folder to save a 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

1 Reply

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

Answer by kolban · Apr 30, 2012 at 09:37 PM

Your scripts can utilize any of the Mono functions. See for example:

http://docs.mono-android.net/?link=T%3aSystem.IO.Directory

This class controls directories on the file system and includes a method to create a directory which can be used to hold your saved game information.

In addition to this class, there are many others that can be used to perform File I/O to write content into files.

Comment
Add comment · Show 3 · 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 TheLedworks · Apr 30, 2012 at 09:59 PM 0
Share

exactly what i was after but... How do i use it? isn't this site android only? Cant find anything in the script reference about it only AssetDatabase.CreateFolder(); which would create a folder in the project

avatar image kolban · May 01, 2012 at 12:32 AM 0
Share

Hi there, the website for $$anonymous$$ono documentation is a bit "iffy" ... but with a bit of practice ...

On the left of the web site there is a "Documentation List" tree view. Go to the top of the window and find "Base Class Library". Next ... go down to "System.IO" within that folder. Next ... expand "System.IO" and pick any of the classes. I have found that clicking on "System.IO" itself takes me somewhere else.

Oh ... and despite the docs saying "Android" ... these (at least to me) are the same $$anonymous$$ono docs cross platform.

avatar image TheLedworks · May 01, 2012 at 08:04 AM 0
Share

cool, thanks

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

my json saves but doesnt load after i exit my game 2 Answers

Saving code not working 0 Answers

Save Game Sceenes user quit aplication, Can I save the scene as a whole while leaving the game? 0 Answers

how to create a folder at the run time ? 2 Answers

Playerpref is not saving 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