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

#67 [FEATURE] Set event name suggestion on Variable Changed event creation #317

Merged

Conversation

ThimoDEV
Copy link
Collaborator

@ThimoDEV ThimoDEV commented Dec 2, 2021

https://youtu.be/_seSt3tMZdU

Currently the implementation suggests a name for a new Event or variable when created with the 'Create' button. If the parent of the property is a BaseAtom (Variable, valuelist, FSM etc) the naming structure is: "name of variable/valuelist/FSM" + name of property ("Changed" when you add a variable changed event) + type of Event/variable ("BoolEvent" for example). When you try to create a second default named event the system will add a number at the end just like it is with duplicating GameObjects. Everything can be seen in the video above.

There are some occasions where this default naming scheme can be a bit weird, as you can see with SetIntVariableValue as an example. However if you create custom names for a variable things get quite clear. If there are suggestions for a better naming scheme I will be happy too change things where needed.

@miikalo miikalo added this to the v5.0 milestone Dec 28, 2021
@miikalo
Copy link
Collaborator

miikalo commented Dec 28, 2021

Regarding 53686d8, you don't need to worry about supporting Unity 2019, feel free to use the 2020+ features. v5 won't need to support 2019.

@ThimoDEV
Copy link
Collaborator Author

I would like to suggest to target this PR to the V4.4.x release as I've just sent a PR for this feature targeted at V5. V5 required some additional changes to the AtomDrawer file overall.

@soraphis
Copy link
Collaborator

I would like to suggest to target this PR to the V4.4.x release ....

Some time ago it was decided that 4.x won't receive new features but only bug fixes, hence those features target V5

@soraphis soraphis mentioned this pull request Mar 16, 2022
Copy link
Collaborator

@AdamRamberg AdamRamberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice PR! Got a couple of minor things to look at. If you do the changes I will then approve the PR and merge to canary.

Packages/Core/Editor/Drawers/AtomDrawer.cs Outdated Show resolved Hide resolved
Packages/Core/Editor/Utils/AtomNameUtils.cs Outdated Show resolved Hide resolved
@AdamRamberg AdamRamberg modified the milestones: v5.0, v4.4.6 Oct 24, 2022
* Simplified CleanPropertyName - first if-block was catched by second block
* Replaced FilterLastIndexOf with typeof(T).Name
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.

None yet

5 participants