PlayMaker Feedback > Feature Requests

Set the default value directly when creating a new variable

(1/2) > >>

Deek:
I just came up with a great idea that would drastically improve managing variables and save quite a lot of time:

Directly setting the variable value when creating a new one in any action


(emphasis on the field between "animDelay" and the "Create Variable" button)

So whenever you want to add a new local or global variable or convert a hard-coded value to one, you can immediately set the value in the same small pop-up that allows you to set the name of the variable (a similar example would be the pop-up when adding an aspect ratio to the game view where you can specify multiple values).

Like that you wouldn't need to switch to the variables tab, search for the variable, select the variable and select the value field of the variable. That's more than 3 clicks and can add up to quite a lot of time when dealing with lots of variables every user would save with that option. And if you want to replace something with an FsmVariable you would also have to copy over that value to the variable-field in the variables tab, which is neither ideal nor any fun.


If you consider implementing this, here are additional suggestions that would make this most useful:
- the value field should match the type of variable to add (should be even enough space for the 3 fields of an FsmVector3 variable and you don't need to add any label next to it anyway)
- the default value for the variable type should be pre-set, so that it's complete optional to set the value directly
- on an object-field it should detect the type of object to be put in, if defined (e.g. Collider, AudioSource, ...);  it should also be possible to drag and drop matching objects into that field

Fat Pug Studio:
This is an awesome idea, so simple and so convenient.

Marc Saubion:
I feel bad I didn't thought of this before. My favorite mistake is to create a variable to replace an existing value and forgetting to set it back up with it. :P

This could be added to your idea, have the default variable's value be whatever your are replacing if it's not empty.

Alex Chouls:
Great ideas! The only tricky part is dragging Objects into an Object field. Right now the New Variable window is a popup that disappears if it loses focus. So we would need to keep it around somehow... but should be possible...

Deek:
@Marc Saubion
I though of that too and had that initially in the additional suggestion list, but the problem with that is, that you have to first set a field to 'None' before creating a new variable, which deletes/resets the value in that field.

Navigation

[0] Message Index

[#] Next page

Go to full version