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

👀 Customizable entity preview #137

Open
bitbrain opened this issue Sep 23, 2023 · 0 comments
Open

👀 Customizable entity preview #137

bitbrain opened this issue Sep 23, 2023 · 0 comments
Labels
📦 feature A new piece of functionality 💄 ui New UI features or improvements.

Comments

@bitbrain
Copy link
Owner

bitbrain commented Sep 23, 2023

Any entity in Pandora is theoretically data that represents a concept or entity in the game itself. Usually, someone would write something like this in their "world object":

@tool
class_name WorldObject extends Node2D

@export var entity:PandoraEntity

to then display the entity inside the world, e.g. via some 2D sprite or 3D model. This works fine but when tweaking entities or creating new ones, it would be great to see if everything is correctly configured as soon as possible. One does not want to navigate back and forth between the 2D (or 3D) and Pandora editor view to check how changing attributes transforms the appearance of a world object.

Entity Preview

On categories, introduce a new boolean option called "Enable entity preview" - toggling that on defaults to a scene that simply shows a 2D sprite of the entity icon (as that is always present). However, users can define a custom scene path to a scene that looks like this:

@tool
extends PandoraEntityPreview2D

func ready():
   # entity will be available here injected by Pandora
   print(self.entity.get_entity_name())

This means users can create their own scenes to preview their entities by inheriting one of the following:

  • PandoraEntityPreview2D (which extends Node2D)
  • PandoraEntityPreview3D (which extends Node3D)

The preview would be displayed on entities above the property list (and above the property bar). Optionally, introduce a button to popout the preview into its own window (closing the window reverts back to the in-editor preview). Also add an option to hide/collapse the preview for all entities.

@bitbrain bitbrain added 📦 feature A new piece of functionality 💄 ui New UI features or improvements. labels Sep 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 feature A new piece of functionality 💄 ui New UI features or improvements.
Projects
None yet
Development

No branches or pull requests

1 participant