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
1
Question by eshan-mathur · Oct 21, 2012 at 11:29 PM · platformgitversion control

Build platform doesn't stick when using VCS (Git)

I'm using a BitBucket Git repo just as my own private repository for a side project in Unity. I have Unity Pro (with iOS). Simple problem really - when I first committed my code, I deleted the Library folder. I also added the following to my .gitignore:

 # Ignore The following directories / file extensions
 Library/
 Temp/
 
 # Ignore the following file extensions
 *.exe
 *.vcproject
 *.sln
 *.pidb
 .DS_Store
 ._*
 .Spotlight-V100
 .Trashes
 Icon
 .AppleDouble
 .LSOverride
 
 # Autogenerated VS/MD solution and project files
 *.csproj
 *.unityproj
 *.sln

That's put together from a variety of sources for OSX and Unity .gitignore files I found.

I deleted the Library folder, committed, then re-opened the project. For some reason, my project had reverted back to being a PC and Mac Standalone project and forgotten that it was an iOS project.

Is there a file in the /Library folder I should be not ignoring so Unity remembers the build platform?

Comment
Add comment · Show 1
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 Ellandar · Jan 15, 2013 at 07:48 AM 0
Share

Hi Eshan. Did you manage to solve this one? I too am using Git and am dismayed at the documentation around what files within library are required. I'm using Unity 4, I notice your gitignore looks very different to the one here:

http://devblog.phillipspiess.com/2012/06/17/unity-3-5-free-and-source-control-lessons-learned-from-7dfps/

2 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by AnomalusUndrdog · Apr 07, 2013 at 06:43 PM

Current build setting isn't saved in version control.

Imagine this: one working copy is configured to compile the iOS version of the game, and another working copy is configured to compile another version, say, the Android version.

If which platform to publish to was saved along in version control, those two people working on separate versions of the game would mess each other up.

And if you ever developed cross-platform games in Unity you would know switching from one platform to another is incredibly slow, as it reimports all the assets for the platform to switch to (would be nice if it keeps imports of assets per platform to prevent that though).

Don't version control the Library folder. That will mess up your project. Unity can reliably recreate the Library folder anytime, provided that you enabled meta files in your project.

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 Umai · Dec 04, 2014 at 01:16 AM 0
Share

I understand what you are saying - still it feels like a forgotten part. If I do a copy of my "iOS project", only copying the Assets and ProjectSettings folders, and open that in Unity later, the scenes look whack because it forgot the selected build platform and also in Game view it shows something like a 1024x768 view ins$$anonymous$$d of iPhone 5 Tall (9:16), making everything just look broken.

avatar image
0

Answer by dannyskim · Oct 22, 2012 at 05:21 AM

Have you looked at the library folder at all of a project?

It stores all your metadata and build editor settings... The specific file your'e looking for is probably either EditorUserSettings.asset or EditorUserBuildSettings.asset, but that's besides the point.

The library holds all your settings information AND your metadata associated with settings for each item in your Assets folder. Needless to say, you need that folder if you're using a repository or version control, and even if you're not and delete the folder, your project will most likely get messed up upon recreation of the folder.

Your best bet is to read Unity's documentation for this:

http://docs.unity3d.com/Documentation/Manual/ExternalVersionControlSystemSupport.html

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 eshan-mathur · Oct 27, 2012 at 06:08 AM 0
Share

I don't think that's correct - everywhere I've read has recommended ignoring the Library folder completely. I quote from the link you posted:

"The Library directory should be completely ignored - when using external version control, it's only a local cache of imported assets."

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

12 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

Related Questions

Version control and Monodevelop 1 Answer

Why is ProjectSettings.asset unexpectedly modified? 2 Answers

How to maintain an iOS and Android version of the same project? 1 Answer

Import commits from Unity Collaborate to Github 0 Answers

When switching between PCs and using version control, why does one prefab's Animator component lose its association with a Controller? 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