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

Improve blackboard variables #15

Open
laicasaane opened this issue Aug 17, 2024 · 6 comments
Open

Improve blackboard variables #15

laicasaane opened this issue Aug 17, 2024 · 6 comments

Comments

@laicasaane
Copy link

Some possible improvements:

  1. Allow copying selected variables from master blackboard to sub blackboards. To reduce the amount of manual typing and selecting variable type!
  2. Allow copying variable names. To support some other usecases where I need the names but typing them is a labour I want to avoid. The current workaround is opening the Inspector in Debug mode and looking for the component.
@laicasaane
Copy link
Author

A thought on copying variables from master blackboard: maybe we can use references from the master instead of adding new variable components on the sub tree to reduce the amount of MBs.

@Qriva
Copy link
Owner

Qriva commented Aug 20, 2024

Hi

  1. Do you mean some spcial function like button/dropdown? How this would work?
  2. I understand this as making variable labels (names) as selectable, correct?

A thought on copying variables from master blackboard: maybe we can use references from the master instead of adding new variable components on the sub tree to reduce the amount of MBs.

Can you elaborate further?

@laicasaane
Copy link
Author

  1. For example, my character has a master blackboard with many variables

image

And the "Attack" sub-tree needs many variables from the master blackboard (all, except the attack_input)
image

So currently I have to do these steps to "copy" a variable from the master blackboard to this "Attack" blackboard:

  • type the variable key
  • select the variable type
  • click "Add" button

So I imagine if we have a "Copy from Master" button that will be enabled if there is a reference to the master blackboard:
image

This button will show a list of master variables, each with a checkbox, something like this:
image

We choose the variables to be copied, click "OK" and then:
a. New variable components will be added on the sub-tree GameObject and their references will be added to the list, or
b. Only the references to the selected ones will be added to the list. No new variable component will be added on the sub-tree GameObject.

I prefer 1b because ultimately the variable list only stores the references:
image

With 1b we can reduce the number of components on the sub-tree GameObject.

@laicasaane
Copy link
Author

laicasaane commented Aug 20, 2024

  1. There should be another menu item labeled "Copy Key".

image

@Qriva
Copy link
Owner

Qriva commented Aug 20, 2024

I admit that not being able to copy key is a bit bothersome, for me too and I guess the best option would be to make labels selectable, so it's possible to double click and copy name. I think I am going to check it soon.

When it comes to copy of variables from other blackbloard, it's not so complicated, but it requires more work, especially example with custom popup. I think it's good feature when seen in the current context (state of tool), but I don't think I have time to revisit this problem right now.
To be honest the current implementation of subtrees and their blackboards is really clunky 😅

@Qriva
Copy link
Owner

Qriva commented Aug 25, 2024

I wanted to make the label selectable, however I encountered small problem. Selectable label has no tooltip and I use it to display variable type on hover. For this reason I added "Copy Key" in dropdown, but It would be better to implement this a bit better.
On top of this I added option in component menu to "Log Variables" and it lists all variables in the console:
obraz
b79b1b8

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

No branches or pull requests

2 participants