EditorGUIUtility.SetIconForObject/GetIconForObject are now public.
MonoImporter.SetIcon/GetIcon are now public.
PluginImporter.SetIcon/GetIcon are now public.
MonoImporter.CopyMonoScriptIconToImporters is now obsolete and will output a warning to the console when called.
Starting with this version of Unity, MonoImporter.CopyMonoScriptIconToImporters can be replaced with the following:
// given monoScript and icon
var importer = AssetImporter.GetAtPath(AssetDatabase.GetAssetPath(monoScript));
importer.SetIcon(icon);
importer.SaveAndReimport();
Unity 2021.2a19 has some API changes that will affect this code:
https://github.com/microsoft/MRDL_Unity_Surfaces/blob/dc3f88b36c7df76f9460280199f551d525028b52/Assets/MixedRealityToolkit/Utilities/Editor/IconEditor.cs#L23
EditorGUIUtility.SetIconForObject/GetIconForObject
are now public.MonoImporter.SetIcon/GetIcon
are now public.PluginImporter.SetIcon/GetIcon
are now public.MonoImporter.CopyMonoScriptIconToImporters
is now obsolete and will output a warning to the console when called.Starting with this version of Unity,
MonoImporter.CopyMonoScriptIconToImporters
can be replaced with the following: