How can I edit attributes of objects via scripting

Basically I am trying to write a toolchain for my game that can edit the playable characters for the game. How can I write an editor window that can load individual animation files from the assets folder (and subfolders), load their information into a bunch of input fields in an editor window, make any changes I want to them, and save them back to the disk?

BTW I am sort of new to extending functionality to the editor as all the scripting I have done in the past only involved gameplay.

That’s a very involved question, akin to asking “How do I write a functional text editor with basic formatting” in scope. I recommend starting with the Editor Scripting tutorials in the Learn section. This is a good place to start: Editor Scripting - Unity Learn

1 Like

Look into ScriptableObjects (also known colloquially as “Unity3D bags-o-data”) and start learning custom inspector scripting, which coincidentally can apply to many types of objects, not just ScriptableObjects.

Unity is by far the easiest and most-flexible environment for that sorta custom editor extension stuff that I have ever seen. Learn it and you will be very happy.

The main problem I am having is that I some animation files in “Assets/sprites/characterName/anim” for each of my characters for my game. How can I load the properties of the animation files and change them via scripting. I will eventually pick up on the EditorWindow class when it comes the actually designing the interface, I just need to get my data from the animation files so I can manipulate them and apply the changes.

AssetDatabase is very useful for editor scripting: Unity - Scripting API: AssetDatabase
Particularly, LoadAssetAtPath: Unity - Scripting API: AssetDatabase.LoadAssetAtPath