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
2
Question by mattsson · Sep 13, 2012 at 09:27 AM · settingsplatformdefault

Which file determines build platform?

I'm trying to find out where the chosen build platform is saved. For example, I open Unity, build platform is set to PC and Mac Standalone, I change it to iOS, quit Unity, deleted the Library folder, open Unity and the build platform is back to PC and Mac Standalone. So, is the relevant file in Library? And which file is it?

Thanks!

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

4 Replies

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

Answer by Kryptos · Sep 13, 2012 at 11:44 AM

It's PlayerBuildSettings.asset I think.

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 jepnvr · Oct 05, 2020 at 04:35 PM 0
Share

This is a very old answer, but it was the first hit on google at this time so worth a reply. I just wanted to note that it doesn't seem true anymore (if ever), as with 2019.4 LTS. That file doesn't even exist. But as mentioned below Library/EditorUserBuildSettings.asset does exist. So that could be it.

avatar image
0

Answer by Bunny83 · Sep 13, 2012 at 11:01 AM

All project settings are usually stored in the project database which is represented by the library folder. It's probably a binary field in one of the database files. You really shouldn't change it manually. Unity has to do a lot conversions when you switch the build platform. Maybe write an editor script which switches the platform?

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 mattsson · Sep 13, 2012 at 01:07 PM 0
Share

Thanks! I don't want to manully change it, I just want my project to be set to iOS as default when I clone it from git.

avatar image
0

Answer by kyle-misner-kriel · Sep 08, 2017 at 06:53 PM

My guess would be Library/EditorUserBuildSettings.asset, but you can probably determine it from AssetImportState.

With a new project git control project with Forced Text asset serialization, I'm switching between ios and android. The only changed files I'm seeing are:

  • Library/AssetImportState (right away, the rest are saved with the project)

  • Library/assetDatabase3 (binary)

  • Library/EditorUserBuildSettings.asset (binary)

  • Library/metadata// (sometimes multiple)

For me, it looks like AssetImportState has the ascii value "13;589824;2304;-1" for ios and "9;16842754;65792;-1" for android. Which seems different enough for a check, but it gets reverted upon reload.

EditorUserBuildSettings.asset is a binary file and appears to be the authority of which platform the project is pointing to.

FYI, this is using Unity 5.4.4p2 which doesn't exist in 2012. Hope this helps anyway.

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
avatar image
0

Answer by xykong · Jun 13, 2018 at 10:14 AM

Library/PlayerDataCache/ScriptLayoutHashes.txt is work for me.

You can get the platform string by the following example:

 ➜  cat ContinuousBuildStandaloneWindows64/Library/PlayerDataCache/ScriptLayoutHashes.txt | head -n1
 WindowsStandalone
 ➜  cat ContinuousBuildStandaloneOSX/Library/PlayerDataCache/ScriptLayoutHashes.txt | head -n1
 OSXStandalone
 ➜  cat ContinuousBuildIOS/Library/PlayerDataCache/ScriptLayoutHashes.txt | head -n1
 iOS
 ➜  cat ContinuousBuildAndroid/Library/PlayerDataCache/ScriptLayoutHashes.txt | head -n1
 Android
 





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

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

15 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

Related Questions

Platform strings used in SetPlatformTextureSettings() 2 Answers

Unity Randomly changes build Platform? 0 Answers

How do i delete/ reset unity to its normal settings? 2 Answers

When I build my game, I want the resolution to be already set. 1 Answer

Building Error:Unsafe code may only appear if compiling with /unsafe 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