AnyPortrait > Manual > Change the Package path
When the AnyPortrait package is installed, the files in the package are installed in "Assets/AnyPortrait" and the sub-path.
The AnyPortrait editor uses a lot of resources, and it loads from the path where the package is installed.
Depending on the user, it is necessary to move the path where AnyPortrait is installed to another location for collaboration.
However, if you move the folder where AnyPortrait is installed to a different path, the editor does not open.
This page explains how to change the path of the AnyPortrait package.
When AnyPortrait is installed, all files are located in "Assets/AnyPortrait" as above.
Let's move the AnyPortrait folder to another location.
Here, we created a new folder called "CustomFolder" and moved the AnyPortrait folder under it.
When we run the editor, the editor does not open and the above warning message appears.
The above message informs you that the contents of the package are corrupted or the path has been changed.
Let's make the AnyPortrait editor run by entering the changed path.
Return to the Unity Editor and select "Window > AnyPortrait > Change Installation Path".
A dialog for setting the path to the AnyPortrait package appears.
(1) Click the "Change Path" button.
(2) Select the AnyPortrait folder in the changed location.
Caution
You should not rename the folder, nor should it be located outside the Assets folder.
Modifying the path of resources inside the AnyPortrait folder can also cause problems.
The package installation path setting has been changed as the above.
If you want to return to the defaults, press the "Use Default Path" button.
Before opening the editor, you may need to reset it, as the editor may still try to load resources from the wrong path.
Run "Window > AnyPortrait > Reset Editor".
The AnyPortrait editor now runs normally.
Most resources of AnyPortrait are loaded from the changed path according to the setting.
But there is one exception.
"Material Preset" in "Material Library" (Related page) will be installed in the original default path.
In this case, you can solve the problem in the following way.
Let's open the Material Library and install a Material Preset.
Press the Material Library button to open it.
(1) Select the Material Preset and press the Unpack Preset button to install.
(2) After installation, a message is shown to restart the material library. Press the Okay button and open the material library again.
(1) Select one of the installed Material Presets.
(2) You can see that Shader assets of the preset are not recognized.
If the user creates a Material Set, shaders are recognized, but the preset is not recognized because it uses a fixed path.
Let's go back to Unity Editor and check the folder where the presets are installed.
Material Presets are installed under the Original path (Assets/AnyPortrait), not the changed path.
You need to move these files to match the changed package path.
Material Presets are created and installed in a folder similar to the preset name under "Assets/AnyPortrait/Assets/Shaders".
If you have Advanced Presets installed, the folder you should move to is named "Advanced".
Move this folder to "Assets/~(changed root folder)/AnyPortrait/Assets/Shaders".
When you move files, unnecessary folders remain.
Delete these folders.
You can now see that the Shader assets in the Material Preset are loaded normally.