Importing Unity Project To New Device - Packages Not Installed?

Hey Guys,

So I develop my game on my Home PC which is where everything has been created from Day 1. I’ve installed all the packages such as CBS, Photon and a few other vital components, I have everything backed up to my Git Repo but when I Pulled the git repo onto the new laptop, and installed the Unity Hub and correct client version onto unity, all the files are in the repo, but the Unity client doesn’t detect that the packages are installed.

I browse to package manager and CBS and Photon are showing as DOWNLOAD instead of installed.

The problem I have is that I don’t want to install them fresh from unity package manager because it will overwrite all the edits I’ve made to those scripts that come with those assets, in the project this far.

This would be a massive headache but I do need to be able to use the project in the exact same capacity as I currently do on my Home PC.

Is there a package / way to achieve this without having to reinstall these packages from the package manager?

Thanks in advance,
NN

UPDATE: I stumbled across the EXPORT PACKAGE option in Unity which allows me to bundle packages and their dependencies in a .unitypackage file. Does this include all the packages? If so, how is it only 300mb when my unity project is usually around 6GB?

You are not supposed to edit files in a package!

Normally, Unity actually reverts any changes to a package unless you
a) manually copy it either into your Assets tree (at which point it stops being a package recognized by Package Manager) or
b) manually copying it into PackageCache (which is in Library and thus not under source control) or
c) you chose to “import from disk” these packages which makes them writable.

In any case, if you modify package files, you HAVE to put them under source control. Since that isn’t the case apparently it means you’ve done either b or c and therefore the modifications aren’t under source control. You need to fix that by using approach a.

The package exports dependencies only. It will not export the entire project unless you export the “Assets” root folder itself. And even in that case all assets not referenced anywhere will not be exported.

On top of that the folder size contains way more than just the assets, specifically the Library folder is typically several times bigger than the Assets folder.

Thanks for getting back to me @CodeSmile

Maybe I’m not using the correct terminology or we’re misunderstanding each other here so let me clarify. Although CBS is a package I bought from Unity Asset Store, all of the files, prefabs, and scripts used in the project as under the /Assets/ folder when you import the package. These are the files that are meant to be modified. I’ve modified them, but the point is, if I have to reimport this package, it will overwrite my modified files?
I guess I could import the package, and then overwrite the files with the file I have from the other project? This might work?

I’m just losing my mind here as I don’t know the best way to approach this.

I have developed this project from Day 1 on my PC. I need an EXACT replica of this on my laptop. One of the packages (CBS - Cross Server Backend System) has a lot of it’s files in the /Assets/ directory, some of which have been modified, especially the prefabs and some of the scripts. I use Git source control for this. My issue is that if I have to reimport CBS from the Unity Package Manager after pulling my repo to the drive, it will wipe out the changes I’ve made to the prefabs, the scripts, and some of the settings in the CBS package. I want to avoid that as it’s an absolute nightmare to get it all working properly again.

Any suggestions on the most effective way to approach this please?

Thanks a million for your time.

Ah, sorry, I get it now.
This confusion is actually quite common. Unity asset store assets and any .unitypackage file is commonly also called a “package” or just “asset”. The difference is in the details, those .unitpackage and store packages are referred to by the manual as “asset packages” while Package Manager packages are commonly identified as “npm packages” or “Package Manager packages”.

That said, since you have everything on Git then pulling/cloning that repository should get you all changes. You can ignore that the other Unity instance doesn’t show the CBS asset as “installed” (*). You do NOT have to re-install that package into the project.

If the cloned project does not work or behaves differently for some reason this likely has other causes than the CBS asset not being installed.

(*) = FWIW, there is no easy way for the Package Manager to figure out whether an asset store asset is installed but I think I recently saw mention that the latest 2023.something does support this now. It might have been in the blog post for the 2023.2 announcement.

2 Likes

Thanks again for your speedy response brother. Also thanks for clarifying the differences in the package types. I didn’t know that. I’m a unity newb still, been around it about 12-18 months but having learned from the ground up and now onto topics like Photon, Netcode, CBS, and Playfab integration, there have been a lot of things to cover so I’ve overlooked a lot no doubt.

I did pull the asset package that I exported however, as I first feared, I think CBS has some stuff happening under the hood which isn’t included in the /Assets/ directory. I think because of this, the package won’t function correctly at all unless I install it fresh from Unity Package Manager.

However, that being said, I think the approach I’m going to take this time is to create a new project, import CBS and other packages that I require, then I think I’ll just import the custom asset package I pulled from my PC project and overwrite the files that are present in the /Assets/ folder which should hopefully resolve my issue.

I’ll let you know how I get on and whether or not that solved my problems.

Always thankful for your help and expert advice.
Cheers
NewbNinja

1 Like

Hey @CodeSmile while I have your attention here, may I ask what might be preventing my Unity Asset Purchases from completing?

The bank authorises the payment, the payment even leaves my account, but right after all the auth is done, the unity backend seems to fail to award the product and pops up with an error saying the transaction couldn’t be completed.

I’ve contacted support and nothing, haven’t heard anything from them. I’ve contacted my bank who said the payments (all 4-5 of them) were completed successfully but then later Unity returned/reversed the payments.

They said it’s nothing their side, so it must be the Unit automated systems detecting that there was an error and then they’re automatically reversing the payment.

I mean it’s great I got the money back n all, but it’s absolutely crazy that I cannot purchase anything from the asset store, not even FREE packages.

It’s driving me nuts.

Any help would be deeply appreciated man.
Thanks.

I’m sorry, I have no insights into the store and their payment systems.
You could set up a Paypal account though. That’s linked with your bank account, at least mine is. This makes for far less troublesome sales practically anywhere on the net.