I started to make a project on a Windows computer and uploaded it via GitHub. Later I wanted to download it on my Mac. But when I start the project on MacOS Unity the scene is empty and all prefabs are missing. Every time when I check GitHub it is deleting a lots of meta.files. When I discard the deletion, all meta.files are deleted again as soon as I start the project on my Mac.
Getting back to Windows GitHub says that everything is pushed. Referring to that article (https://medium.com/codex/solving-the-missing-prefab-issue-in-unity3d-ae5ba0a15ee9) the problem appears similar. But the solution does not help.
What is the problem to get my project from Windows to Mac via GitHub?
"Unity deletes .meta files":
After some research the answer to this seems to be - Unity removes .meta files when the corresponding object is missing.
"Prefabs are missing":
GitHub on my windows computer did not commit the .obj files. It took me a while to figure out that somehow a "gitignore_global.txt" was installed from somewhere (maybe GitHub Desktop?). .obj files were included to be ignored. That "gitignore_global.txt" is located in:[x:/User/Documents]
If you face the same problem - check the gitignore-file in your Unity project too. If certain file types are prohibited via one of these 2 files - no chance!
Cheers
A couple of hours ago I turned off my computer and I just recently came back to work on my project
and this has been stuck on my screen for hours
I tried restarting my computer that didn't work and I tried to reopen the project like 10 times and it just stays stuck on ("Initialize Asset Database")
A Solution
Do a backup of your Projects (use Google Drive, Dropbox or Localstorage)
Deinstall the complete Unity Hub with the version
Install the Unity Hub including your favorite version
This also happens if the file name is wrong.
I made the mistake of putting the "\" character in the png file name. After renaming the file, the project loaded normally.
Using Visual Studio Code Version 1.8.1 how do I restore a deleted file in the recycle bin?
It uses the normal trash bin of your system. So you can grab it our of there.
In Windows you find it in the explorer, in Linux it is as well in Konquerer / Nemo / ...
First go to Recycle Bin of your local machine.
Your VS code deleted files is there in Recycle Bin.
So, Right click on deleted files and select-> Restore option then your deleted files
will be automatically restored in your VS code.
If you just deleted the file, know that VSCode 1.52 (Dec. 2020) will support:
Undo file operations in Explorer
Explorer now supports Undo and Redo for all file operations: delete, rename, copy, move, new file and new folder.
Make sure the focus is in the Explorer and trigger the Undo or Redo commands and your last file operation will be undone or redone respectively.
Keep in mind that we have separate undo stacks for the editor and the explorer and we choose which one to undo based on focus.
Running on Ubuntu 18.04, with VS code 1.51.0
My deleted files from VS Code are located at:
~/.local/share/Trash/files
Every deleted file have a corresponding .trashinfo file which contains details about where the file is deleted from and deletion date and these are located at:
~/.local/share/Trash/info
More info here.
To search for your deleted files:
find ~/.local/share/Trash/files -name your_file_name
In case you deleted files form a mounted ntfs filesystem, they will be located at:
/path_to_mounted_fs/.Trash-$UID
You can get $UID by doing echo $UID in your terminal.
Hope my case helped!
Click in empty space of VS Code's explorer (it's where you see files listed vertically) and press undo Ctrl + z
It'll recover your permanently deleted files too.
VS Code is a lifesaver. ✌
I know the OP says Recycle Bin. What I do though is recreate the file, especially if it's a single file. And when in the file, I just press CMD+Z (I'm on a Mac) and I get my file back.
Recreate the file in the same directory from where it was
deleted.
CMD+Z inside of the newly created file.
I accidentally discarded changes in the Source Control in VS Code, I just needed to reopen this file and press Ctrl-Z few times, glad that VS Code saves your changes like that.
If you can't find your files in the Windows Recycle Bin as it happended to me
(debugger went rogue and deleted the project folder)
look in the %APPDATA%\Code\User\History\ subfolders sorted by date modified.
There I could retrieve my seemingly lost files.
who still facing the problem on linux
and didnt find it on trash
try this solution
https://github.com/Microsoft/vscode/issues/32078#issuecomment-434393058
find / -name "delete_file_name"
If you have permanently deleted files, on macOS, you can see the history (the last month I guess) in $HOME/Library/Application Support/Code/User/History/. You will have to find your file(s) by looking at each entries.json file in every subfolder and rename the last version of your file.
There is probably a similar way on windows and linux but I don't know the precise paths.
I tried most of the options above but none worked.
What worked for me was clicking and highlighting the folder where the file was deleted from in vscode. Then while it is selected, hit CTRL + Z.
This works on windows.
Hitting CTRL+Z without highlighting that folder didn't work.
Just look up the files you deleted, inside Recycle Bin. Right click on it and do restore as you do normally with other deleted files. It is similar as you do normally because VS code also uses normal trash of your system.
While pushing a repository to Github through Vs Studio code I deleted whole folder and they were not available in Recycle bin also. Here is how I recovered those files.
For Windows.
The method is to restore the previous version of the Drive in which the deleted file existed
I had deleted files from G: drive, the below images are self explanatory
Open properties menu of the drive
In properties go to previous versions tab,
where you can find the previously stored versions of that drive along with date at time of backup
use open or click on restore to get the previous version of that drive.
Note: Manipulations in the drive after restore point won't be available
I am not sure how I deleted a file in VS Code, and couldn't find it in recycle bin. Found the file using the History feature of File Explorer.
A month recovery can be done in visual studio code
1 Right click on file and
2 click Open Timeline and
3 select file from timeline
4 the last time file saved by you
5 and your last change of the file is recovered
NOTE : Not only last but all the previously saved check points can be recoverd from vs code
For Mac, try to search some parts of the code in the deleted file in the following path:
~/Library/Application Support/Code
I found a deleted file in this folder
~/Library/Application Support/Code/Backups
Yes, I know this question is about VS Code but I think I can help someone.
I permanently deleted a file, and I tried all the tips wrote here with no success. So I had to recover the file from OS Linux following this
grep -a -C 500 -F 'Unique string in text file' /dev/sda
It was asked above if there is a way to disable the ability to delete a file you created with an undo (#rochasdv).
There is a new setting to disable undo for file operations:
Explorer: Enable Undo default is warn, confirmation dialog
You can also set it to disable so that your files/folders will not participate in undo operations.
You can alo set it to allow - the pre-new setting situation.
Currently, this new setting is in the Insiders Build v1.64 so it may be in Stable early February, 2022.
I am working on Windows with a Ubuntu WSL. I permanently deleted a file by mistake and was not able to restore it from the recycle bin nor by doing anything else.
I however, was able to get my files content by going to "Timeline" and see all my previous modification (it will open a comparison window).
Hope it will help somebody.
I had the case that I, accidentally, deleted a committed file (git) with a ton of additional uncommitted changes, and I could not get it back. (two days of work! yeah, I know, commit early commit often, I know ...)
I had no linux trash can setup on my docker instance and was developing via remote ssh.
I tried to recreate the file and then do a ctrl+Z to recapture the changes as some suggested here. This did not work for me.
So after a struggle over an hour I finally gave up and thought the changes to the file were lost.
However,
I discarded the changes in git, that the file was deleted.
And THEN I retried ctrl+Z and boom all the changes previously came back
magically!
I was a happy camper!
If your local directory has git initialized and you have not committed the changes that include the delete, you can use git checkout -f to throw away local changes.
If you completely delete any of the components in angular using visual code, you can restore it
Go to Recycle Bin and restore the deleted component that will be restored in the project.
Yesterday I updated my unity to latest version..
Then the launcher is blank.
And when i open any .unity file.. It opens the editor with a error.
Error loading file:///C%3A%2FUsers%2FBuckyDroidz%2FAppData%2FRoaming%2FUnity%2FPackages%2Fnode_modules%2Funity-editor-home%2Fdist/index.html#/login
Unity is still working and running the project.. But unity launcher is not working
After searching on google I found a fix. I mean I have to add some file in package folder.. But there was a link to download those files and the link is dead...
Help Me!!
Looking at your SO username, it looks like this is a problem with your computer username.The D in your name is probably "Ď" or some other character and Unity is having problem reading that file path(C:/Users/username/AppData/Roaming/Unity/Packages/node_modules/unity-editor-home/dist/index.html#/login). This causes license check to fail.
Two things to try:
Method 1.
Change your username
A.Change your name to valid English characters
B.Uninstall and install Unity again to recognize that change.
If this does not fix your problem, do method 2.
Method 2
Do manual Activation
A.Disconnect your internet/wifi.
B.Open Unity. Go to Help -> Manage License
C.Click on Manual Activation.
D.Click on Save License or Save License Request(Depends on Unity version)
E.Connect to your internet/wifi.
F.Go to https://license.unity3d.com/manual then upload that saved license there. Follow steps to on the website to create a license on that website. Make sure to chose free unity version as the license type. When everything is done, you will be able to download a key file. Download that file.
G.Disconnect your internet/wifi again.
H.Open Unity. Go to Help -> Manage License
I.Click on Manual Activation.
J.Click on Load License then choose the file you downloaded from step F.
You can now connect to your internet/wifi again. Restart Unity and test if the problem is still there.
This is a issue with 2017.2 as well
To fix
go to C:\Program Files\Unity\Editor\Data\Resources\Packages
You can see 4 tgz files
unity-editor-home.0.8.30.tgz
unityeditor-cloud-hub-0.0.15.tgz
unityeditor-collab-history.0.6.14.tgz
unityeditor-collab-toolbar.0.7.15.tgz
Use an unarchive program (I used 7-zip file manager) to open each one of these and extract contents (dist folder and package.json file) to your Roaming folder
C:\Users\YOURUSERNAME\AppData\Roaming\Unity\Packages\node_modules
After extract, the folder looks like this..
..\AppData\Roaming\Unity\Packages\node_modules\unity-editor-home
..\AppData\Roaming\Unity\Packages\node_modules\unityeditor-cloud-hub
..\AppData\Roaming\Unity\Packages\node_modules\unityeditor-collab-history
..\AppData\Roaming\Unity\Packages\node_modules\unityeditor-collab-toolbar
and unity-editor-home like below (one level subfolders shown)
..\AppData\Roaming\Unity\Packages\node_modules\unity-editor-home\dist
..\AppData\Roaming\Unity\Packages\node_modules\unity-editor-home\package.json
..\AppData\Roaming\Unity\Packages\node_modules\unity-editor-home\README.md
I am new for centos installation. I downloaded a minimul version of centos 6.5, around 339.7mb of size. I am trying to install this with GUI interface but I got an error after selecting the drive option, which comes after selecting the country.
This is complete message,
Unable to read package metadata. This may be due to missing repodata directory. Please ensure that your install tree has been correctly generated.
Failare:
repodata/743fec56b2af0ce8d6ec82c47a4efafc2a4d18cddfa9683f29611cb18d1a33de-primary.sqlite.bz2 from anaconda-CentOS-201311271240.i386: [Ermo 256] No more mirrors to try.
Sorry but I am new here, so I can't put the exact image here.
I believe that i had this same issue and was able to solve it.
The files under the /repodata folder are missing their file extensions and are not matching their full names in the "TRANS.TBL" file, under this same dir.
Rename all the files to match what is in the "TRANS.TBL" file, then try the install over again.
Please let everyone know if this works for you.
In the past i would just put a URL in that pointed to the correct files on a server, i feel that most people take this workaround and that's why it's not as hot of an item as it should be. I hope this gets fixed in the .ISO.
Thank you,
YourFriend
It worked for me.
I renamed all 8 files.
i.e. 0e371b19e547b9d7a7e8acc4b8c0c7c074509d33653cfaef9e8f4fd1d62d95de
0e371b19e547b9d7a7e8acc4b8c0c7c074509d33653cfaef9e8f4fd1d62d95de-primary.sqlite.bz2
The correct file name is given in file "repomd" under folder repodata
example - location href="repodata/b124f0ec5323cfee56b420906a3103f0daef656dde3f7ac8220120aa7504e57a-primary.xml.gz"
I had exactly the same issue ;
under "repodata" directory opened "repmod" xml file
Searched file name within repmond xml file
Found matching strings
Renamed 8 files as specified in .xml file
and it worked like a charm
Thanks to "Your Friend"
I had the same problem. Even if you manage to get past this step, you will encounter at a later point other errors related to filenames.
The root cause was using Unetbootin to create the bootable media. I switched to Rufus and everything works fine now.