Class ContentRootAssetEditor
The editor side of a content root: this is where content gets marked.
The point of the migration is that declaring an asset as content happens in the editor, on the asset, and
never in a hand-written file. So this inspector is the authoring surface: drag assets into the list (or select
them in the Project window and press a button), give them keys, and the entry's Loadable is derived
from the path for you. Nothing here writes an address, a GUID or a label by hand — the entries also carry the
path they came from, so the list stays readable.
Two operations matter and both are here rather than in a menu, because they are corrections to a list you are looking at: Resolve re-derives every entry's id from its path (after a reimport, a move, or an entry that arrived from a generator), and Drop unresolved removes the entries whose asset is gone, so a root cannot silently carry a hole into a build. A content build copies what the roots reach; an entry whose id never got built is a key that resolves to nothing at runtime, which is the failure this whole migration is about.
[CustomEditor(typeof(ContentRootAsset))]
public class ContentRootAssetEditor : Editor
- Inheritance
-
objectContentRootAssetEditor
- Inherited Members
-
Editor.CreateEditorWithContext(Object[], Object)Editor.OnHeaderGUI()Editor.DrawFoldoutInspector(Object, ref Editor)Editor.ReloadPreviewInstances()Editor.MoveNextTarget()Editor.ResetTarget()Editor.finishedDefaultHeaderGUI
Methods
- OnInspectorGUI()
Implement this function to make a custom inspector.