Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 Centribo · Mar 18, 2016 at 02:05 PM · editorgitversion-controlgithubversion control

Git and Unity not working correctly: missing components, textures, materials, etc.

I'm currently trying to use Git/GitHub with my current Unity project and I'm having problems objects and their components/materials. For example: On my main computer the scene and assets look like this:

Scene: http://puu.sh/nKWX3/24a63ff8c8.png

Materials: http://puu.sh/nKWYc/cc1d95ef2d.png

But when I do a pull on my laptop or any other computer for that matter, I get this:

Scene: http://puu.sh/nKWVM/0bdb89b916.png

Materials: http://puu.sh/nKWWc/6dbd4c6a27.png

The Unity project is set to have "Visible Meta Files" with "Force Text" as their asset serialization, and my .gitignore look like this: (Default/master one for Unity from GitHub)

 /[Ll]ibrary/
 /[Tt]emp/
 /[Oo]bj/
 /[Bb]uild/
 /[Bb]uilds/
 /Assets/AssetStoreTools*
 
 # Autogenerated VS/MD solution and project files
 ExportedObj/
 *.csproj
 *.unityproj
 *.sln
 *.suo
 *.tmp
 *.user
 *.userprefs
 *.pidb
 *.booproj
 *.svd
 
 
 # Unity3D generated meta files
 *.pidb.meta
 
 # Unity3D Generated File On Crash Reports
 sysinfo.txt


Has anyone ever come up with this problem before and solved it? I've done a lot of searching and nothing has solved my problem so far.

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

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Centribo · Mar 18, 2016 at 03:20 PM

Well, this is completely my fault, but I had deleted all .mtl files, not knowing what they do, and this caused Unity to not know which materials go on which objects, so Unity generated them all from scratch.

Lesson: Don't delete files if you don't know what they do and your repo will thank you for it.

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 Polymo · Mar 18, 2016 at 03:23 PM

I haven't tested it myself, but there's UnityYAMLMerge http://docs.unity3d.com/Manual/SmartMerge.html which should help with merging correctly.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

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

When switching between PCs and using version control, why does one prefab's Animator component lose its association with a Controller? 0 Answers

How to fix /Library/ conflicts in GitHub repo for Unity project? 1 Answer

Unity Version Control - missing scene files and materials when downloading or cloning. 0 Answers

Import commits from Unity Collaborate to Github 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