Syncing a project to version control that was created locally

I am new to version control with unity.

I created a local project, and added a few game objects / scripts. Then I enabled cloud services and version control. The project appears in the cloud page properly, and i can grab the project from the version control on another computer. BUT, I can not get it to properly import the game objects created before version control was enabled.

Is there a way to do a full initial sync from a computer to the cloud that other computers can use as a starting point?

1 Like

Do you mean prefabs, as in asset files? Because if not and you refer to in-scene placed GameObjects, it would indicate that the scene itself wasn’t synchronized. You do have to manually review and commit changes to upload them to the cloud, that’s not happening automatically. And even if you did, perhaps the scene wasn’t saved locally before committing changes?

I’m mostly referring to in place game objects in the hierarchy of the scene. they didnt transfer. This part was built before connecting to the cloud and version control, so version control does not see it as “changes”. The assets seemed to transfer, but not game objects.

is there an easy way to sync everything? I am actually not sure how to “review changes” that occured before the version control was activated

If the game objects are in the scene on one machine but not another, it means the scene’s .unity file in the cloud is not in its most current state.

You could make a simple edit to the scene (ie add a game object), save it, and commit it to version control. This should give you the same scene on the other machine after synching the latest changes.

If not, then the problem is something else, perhaps an editor script that removes objects or simply opening the wrong scene (same name, different folder perhaps?).

Hello,
To ensure all your game objects and scripts are properly synced to the cloud, follow these steps: dollar tree compass

  1. Save All Changes: Make sure all your scenes and assets are saved locally.
  2. Commit and Push: Manually commit all changes and push them to the cloud repository.
  3. Verify Sync: Check the cloud repository to ensure all files are uploaded.

If you need more detailed guidance, feel free to ask!

Best Regards,
Mary Chess

I’m guessing if you have some ignore items in the workspace (please check the “ignore.conf” file) and these paths are not under source control. All the files under version control should be available if you try to download them on a different machine.

1 Like