benaclejames / benaclejames/VRCFaceTracking

[Feature Request] Add config API for module developers

Open
#107 2 comments 1 reaction 1 assignee Claimed by @dfgHiatus View on GitHub
enhancement
Dominant language
C#
Stars
907
Forks
135
Avg merge
11h 28m
Merged PRs (30d)
7

Description

As part of the Quest Pro module's development, we've required users to specify custom data via a text file - this is an unintuitive approach, and I imagine other module developers have run into a similar situation. I'm basing this feature request given my experience with [NeosModLoader's config system](https://github.com/neos-modding-group/NeosModLoader/blob/master/doc/config.md).

Given a module, a developer could mark any field they wish to expose to VRCFT with an attribute, say `VRCFTConfigurable`. When it comes time to load a module, all VRCFT has to do is examine the module's assembly for fields marked with said attribute [with something as follows](https://stackoverflow.com/questions/15404634/how-to-get-a-list-of-all-fields-with-a-specified-attribute#15453764):

```
var fields = root.DescendantNodes()
.OfType()
.Where(a => a.Name.ToString() == "VRCFTConfigurable")
.Select(a => a.Parent.Parent)
.Cast();
```

Once these fields have been loaded, VRCFT builds a UI as a new tab for said module and generates input boxes for each field. As many modules can be loaded at once, it makes sense to have every module generate its own tab. Here's what I have in mind:

![mockup](https://user-images.githubusercontent.com/51272212/199837996-54d38a95-d205-4fd5-bce0-0fb2ceb4c1bd.png)

I'm not sure how to enforce type safety here per se, but I'm opening it up to discussion.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.