I’m coding a web-based dashboard that allows user to compile Unity project with selected settings. One such setting is icon. Script downloads icon from url and saves to the Unity project. To assign an icon, in Player settings programmatically, I need it’s GUID. To have GUID, I need to generate default meta file for the downloaded icon. Do Unity reveal how they do it?
The answer is AssetDatabase.Refresh() or AssetDatabase.ForceSerializeAssets