Custom Configuration Custom Editor Utility Button

Posted: 25 Apr 2024 23:07
by Eluem

Hey I'm working on making a custom system for implementing themes. I made a simple custom configuration that has places to define themes and I can manually configure all of this, but it's a lot of tedious labor. I wanted to automate some of the work by making a simple button in the config that I can press to search asset folders and automatically populate some of the details based on file names and folder structure.

The main issue I'm having now is figuring out how to call a function on the ThemeConfig from my ThemeConfigEditor.

With a normal editor object, you'd simply write something in the OnInspectorGUI function that includes ((ThemeConfig)this.target).FunctionName()

What would be the equivalent in NaniNovel? I currently have ThemeConfigEditor inheriting from ConfigurationSettings<ThemeConfig>

Any advice would be greatly appreciated.
Thank you!


Re: Custom Configuration Custom Editor Utility Button

Posted: 26 Apr 2024 02:55
by Eluem

Nevermind! I think I figured it out. I missed the note about looking into NaniNovel/Editor/Editors/Settings

I found a few examples in there that are pointing me in the right direction.