• 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 Spacejet13 · Jan 27, 2019 at 01:31 AM · extensionsave-to-filefilestreamsuggestions

filename extension convention?

So I have a save file using binary serialization to make a save file for my game. My question is that what is the file extension naming convention for such a case? is it .dat? I've seen a lot of games using that, and was asking if that is appropriate. Of course, I can just invent some file extension, but just wanted to ask if there are some conventional extension names that I should consider using.

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
0
Best Answer

Answer by Bunny83 · Jan 27, 2019 at 01:07 PM

No, there are no real standards. It depends on if a human actually has to handle those files or not. If they are just read / written by a software it doesn't matter at all. You can even omit the extension (which is often the case on Unix / Linux). Though since we're no longer forced to "8:3" names we could even use a "domain like" file name to further specify it's type (if that's necessary) or use extensions longer than 3 characters. Arbitrary binary data commonly uses "dat" or "bin". Though since "bin" is often used for raw disc images it often causes confusion.


There are a lot websites which list commonly known usages of file extensions. Pretty much every 3 character extension has more than one usage. So it may just be a hint what that file might contain but doesn't guarantee it. Most know that ".max" is the extension of a 3ds Max 3d model. However it has several other known usages. So when seeing a max file you can't be sure what it actually contains.


Long story short: Use whatever you like. but you want to avoid using extensions which belong to an actual standard (like BMP, PNG, JPG, EXE, DLL, ...). Using such files would just confuse the user and antivirus software when they search for files.

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 Spacejet13 · Jan 27, 2019 at 08:31 PM 0
Share

Thanks a lot!

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

98 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

Related Questions

need some suggestions on what to add in game 1 Answer

Can Editor scripts be in external DLL's or assemblies? 1 Answer

How to find Array property in Editor extension,How to find Array property in Editor extension 0 Answers

Building with Extensions 0 Answers

Will Installing Unnecessary Packages or Extensions Increase the Final Size of my Built App? 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges