Solution to the abnormal problem of the icon display and opening method of the unitypackage file in Unity (worthy of collection)

Solution to the abnormal problem of the icon display and opening method of the unitypackage file in Unity

Recently, when installing multiple Unity versions, the icons of the .unitypackage file format were displayed incorrectly because they were accidentally installed in the wrong location and then uninstalled, and they could not be opened by double-clicking.

The reasons for the icon display error and the inability to double-click to open:

Maybe when installing multiple versions of Unity, I modified the installation path or the name of the folder in the installation path, which caused the system path to be mismatched and the specified path could not be found, which caused an error.

E.g:

System configuration path:
Insert picture description here

Actual installation path:

Insert picture description here

Here only explain the solution for windows

First press the window+R key to open the operation, enter regedit, open the registry manager and
find the \HKEY_CLASSES_ROOT\Unity package file\ node

Expand
Insert picture description here
Where Defaultlcon is to control the display of the icon. Where does the link position inside point to and what the icon is.
Here is "C:\Program Files\Unity\2018.2.14f1\Editor\Unity.exe", 0

There are edit and open in the shell. Correspond to the Edit Unity package file menu of the right mouse button. And open the menu. The open menu is the default, double-clicking the mouse is actually to execute the open node

open represents the execution when double-clicked to open.
Here is "C:\Program Files\Unity\2018.2.14f1\Editor\Unity.exe" -openfile "%1"

The -openfile is a command parameter. %1 will be replaced by the system with the full path of the unitypackage. As for the "Unity path", please pay attention to the double quotes. If the Unity installation path contains spaces. You must add double quotes. Otherwise it may go wrong

Just replace the value inside with the path you want, after modification. You double click the unitypackage file with the mouse. It can be opened. If the DefaultIcon is modified, refresh the folder. The icon is refreshed

Detailed description:

Insert picture description here

Guess you like

Origin blog.csdn.net/qq_43801020/article/details/108811579