- Home /
Can I add my own project settings?
I'm making an asset and I want it to have its own settings that will be available in menu same as unity native project settings.
Like this: "Edit > Project Settings > My custom settings"
I know how to add a menu. And I know how to create a custom window. But I want it to work in the same exact way that other settings in that menu do. I want it to show custom inspector like this:
Preferably it will have the same header with cog icon and title.
Is there a way to implement this via editor scripting? Where should I look for this?
Answer by Baroque · Jun 08, 2017 at 01:02 AM
You can create your own editable assets by implementing a ScriptableObject. They get custom editors just like a MonoBehaviour. You can then use that object globally at runtime by either
keeping a reference to it from a prefab or scene object, or
putting it in the Resources folder and loading it by name.
You could make your own menu options using MenuItem to select the correct object in the editor so you get a workflow identital to the Edit/Project Settings menu.
Your answer
Follow this Question
Related Questions
Why is my propertydrawer being automatically disabled? 1 Answer
How to Hide/Show List or Array in the inspector based on a variable? 0 Answers
Custom editor, serialize and prefab issue 0 Answers
Edit an object in isolation quickly, as in the new Prefab Mode 0 Answers
How can i get SerializedProperty from UnityEvent which in List. Sorry for my Eng. 2 Answers