Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom configs and custom loaders #41

Merged
merged 6 commits into from
May 11, 2023
Merged

Add custom configs and custom loaders #41

merged 6 commits into from
May 11, 2023

Conversation

MrGVSV
Copy link
Owner

@MrGVSV MrGVSV commented May 10, 2023

Problem

In order to allow proper customization and configuration, prototypes need to be separated from the config that controls them. Furthermore, the loading behavior needs to be split from the prototype and the config so we can avoid issues related to ownership and async.

Solution

Custom Config

Split the configuration type out of Prototypical so a prototype can be controlled by a custom config type. This means that users can choose between adding callbacks to ProtoConfig or rolling out their own Config type for even more control.

See example for usage.

Custom Loader

Users can now supply their own Loader types to the plugin. This can be used to handle deserialization and pre-processing of prototype assets during the load phase.

See example for usage.

@MrGVSV MrGVSV merged commit b6c2072 into main May 11, 2023
@MrGVSV MrGVSV deleted the better-config branch May 11, 2023 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant