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

Custom asset via plugin #297

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open

Conversation

Dgzt
Copy link
Collaborator

@Dgzt Dgzt commented Dec 22, 2024

This PR expands functionality of plugin system 1 2. The purpose is that plugin can add new custom asset what runtime can load (via plugin's runtime module).

Changes:
Add new component type: NAVMESH

Add custom asset type.

New extension interfaces:

  • AssetExtension:
    • void assetManager(AssetManager): Can handle custom assets via AssetManager.
  • ToasterExtension:
    • void toasterManager(ToasterManager): Can handle toaster messages via ToasterManager.

Modified extension interfaces:

  • ComponentExtension:
    • default Array<Component.Type> getSupportedComponentTypes() { return null }: Can handle where can create new component. For example: Create NavMesh component only on game object what contains terrain component.

Plugin's RootWidget additions:

  • addTextField(TextFieldChangeListener): Adds textfield with change listener.

New subscribable editor events:

  • ProjectChangedEvent: If the project changed.
  • SceneChangedEvent: If the scene changed

Tested it with HTML and it works well.

You can try it with Mundus Example Project with Recast NavMesh plugin:
https://github.com/Dgzt/MundusRuntimeExample/tree/recast-navmesh-plugin
(use mouse buttons to select start and end positions, G for debug renderer)

Footnotes

  1. https://github.com/JamesTKhan/Mundus/pull/268

  2. https://github.com/JamesTKhan/Mundus/pull/289

@Dgzt Dgzt marked this pull request as ready for review December 22, 2024 17:06
@Dgzt Dgzt requested a review from JamesTKhan December 22, 2024 17:06
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