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

PrototypingUI collects spawned ValueBehaviours #162

Closed
leogeier opened this issue Sep 6, 2023 · 4 comments
Closed

PrototypingUI collects spawned ValueBehaviours #162

leogeier opened this issue Sep 6, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@leogeier
Copy link
Collaborator

leogeier commented Sep 6, 2023

This can be an issue if ValueBehaviours are replicated in some way.

Example to reproduce:

  1. Create a spawner that contains a ValueBehaviour
  2. Make that spawner spawn a couple of times on run
  3. Run the game
  4. Resize the PrototypingUI
  5. The PrototypingUI should now contain multiple copies of the ValueBehaviour

ValueBehaviours are intended to be used as (global) constants, so multiple copies make little sense.

@JulianEgbert
Copy link
Collaborator

Nor sure if this should we done here as well or as part of a separate Issue:
Currently ALL CodeBehaviors are created as buttons for the UI. This creates an Issue since not all of them should be available for the User. Maybe we should only add Buttons if the CodeBehavior is a direct child of the PUI @jgrenda

@JulianEgbert JulianEgbert added the bug Something isn't working label Sep 8, 2023
@tom95
Copy link
Contributor

tom95 commented Sep 8, 2023

good point. I would advocate for the PUI to almost always be used via the automatically-added mechanism. Two suggestions for discussion:

  1. add a checkbox to CodeBehavior for inclusion in the PUI
  2. only list CodeBehavior's that have no outgoing / incoming connections

What do you think will make most sense?

@JulianEgbert
Copy link
Collaborator

  1. add a checkbox to CodeBehavior for inclusion in the PUI

I think this would be the way to go because 2 doesn' t work:

  1. only list CodeBehavior's that have no outgoing / incoming connections
    I think we have to allow both scenarios:
  • no incoming: Maybe we have a situation where we want to trigger behavior within the game, like spawning enemies, but we want to trigger this behavior also with a button manually.
  • no outgoing: This would not include CodeBehaviors that have chaining or trigger anything else within Pronto.

@jgrenda
Copy link
Collaborator

jgrenda commented Sep 9, 2023

I've documented this requirement in #167.
For now the changes relating to the inclusion of value duplicates created by spawners can be seen here:
#162_implemented
The fact/bug that the ui only updates on resize attempts is documented in #168.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

4 participants