- Home /
How can I make a custom JSON inspector?
Ok so you know how you can click on a 'package.json' item in the Project window (in a package folder) and it opens up a custom Inspector that lets you examine and edit it? I want to do that, but for a JSON file with a different name. I tried creating a ScriptedImporter but it said that the .json extension was already registered, ignoring. Can I hook the existing JSON importer? How is it that specifically 'package.json' is handled differently from any other .json you click on?
Can you screenshot what you mean. For me all json files are edited in the same way.
This page is not letting me upload a screenshot :( But here's what: In the Project pane, open up a Package, they have READ.$$anonymous$$D, License, etc. And 'package'. That 'package' is package.json. Click it, and the Inspector opens a custom editor that shows the contents of that file, in fields (not just a text dump). If the package is embedded or local, the fields are active and you can change them, when you hit Apply it saves back to package.json
Your answer
Follow this Question
Related Questions
How to get notification of moving a GameObject in the hierachy when editing the scene? 1 Answer
Edit Static Class Config variables from editor 1 Answer
Multiple scripts reference to the same SerializeField 1 Answer
Align text into PropertyField 1 Answer
Using a CustomEditor in the inspector and also seeing normal inspector fields 1 Answer