Are you just asking how to delete it in the inspector? You can click the little gear in the upper right corner and choose “Remove Component” even if it’s a missing script.
It’s a nested asset, presumably a scriptable object. To remove them (or add them), it’s done via editor script. It’s an asset inside another asset, serialzed. But if the code is changed in a way that breaks it or is removed, the asset is broken, so editor scripts can’t really do anything with it. (Other than delete the parent via IO).
Reviving this thread since the issue is still present, even Unity can’t delete the object since if you right click it the delete option will be disabled. Your only options would be to add back the old script used to create the asset or manually edit the .asset text. I found a workaround for this that I’ve uploaded here: UnityShare / SubAssetMissingScriptDelete · GitLab
I actually have the same problem with prefabs but using this script cause to regenerate guids and i am loosing link to this prefabs. I also don’t know what will happen with variants and nested if i use it. Right now only way I see is to delete this directly from yaml.
Unfortunately no, haven’t had the issue with prefabs before. But the workaround that I found is doing exactly that so that might be your only way to go.
I have just encountered the same problem. Sub-assets are a cool concept but also are really painful to use. No option to rename/delete/move from the editor and now this.
I’ve run into this issue as well. Since there was some confusion at the start of this thread, there is a very good explanation of the issue and the API limitations that cause it here: