I've been working on a small project in Unity over the past few months, using Git for source control along the way. I recently got a new laptop which is being demo my progress in different locations.
I installed Unity & all the relevant runtimes needed within the application and pulled the source down to the new machine. The project opens in Unity, but the Hierarchy view shows this where my prefabs used to be.
All of the resources (prefabs, models, scripts) are in the same directories as they were on the original development machine, but are somehow becoming "unlinked" during the process of pulling them down to a new machine.
I have tried searching but have been unable to find a solution to this particular problem shy of just recreating everything.
Thanks for the help.
Prefabs are a special type of component that allows fully configured GameObjects to be saved in the Project for reuse. These assets can then be shared between scenes, or even other projects without having to be configured again. This is quite useful for objects that will be used many times, such as platforms.
(“Prefabs”, if you're unfamiliar with the concept, are basically an abstraction for collections of game objects that you instance and work with within a game.
Fortunately, Unity has a Prefab asset type that allows you to store a GameObject object complete with components and properties. The prefab acts as a template from which you can create new object instances in the scene.
Prefabs in Unity are pre-configured reusable GameObjects that you create in the scene and store in the project. To make a prefab, you create the GameObject in its desired configuration in the scene using whatever components you need. You then drag it into the Project window to save it as a prefab in your project.
There are meta files associated with all your assets inside of a Unity Project, which is why any kind of external version control / source control does not save all of those settings, because they're not being linked correctly. If available to you at all, the included Asset Server within Unity ( read source control ) is extremely easy to setup, and has worked perfectly fine for me ( with a small team ).
If you're absolutely set on using git, take a look at Unity's documentation below to see if it will clear up your problems:
https://docs.unity3d.com/Manual/ExternalVersionControlSystemSupport.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With