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

[Feature Request] - Display events with multiple parameters #95

Open
zRevenger opened this issue Dec 15, 2023 · 5 comments
Open

[Feature Request] - Display events with multiple parameters #95

zRevenger opened this issue Dec 15, 2023 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@zRevenger
Copy link

Hi, here with a new request. I think it would be useful to have a way to display UnityEvents with multiple parameters in the inspector without the need to create custom classes for every single use case.

@arimger arimger self-assigned this Dec 21, 2023
@arimger arimger added the enhancement New feature or request label Dec 21, 2023
@arimger
Copy link
Owner

arimger commented Dec 21, 2023

Hello, do you mean something similar to this package?
https://github.com/Thundernerd/Unity3D-ExtendedEvent

@zRevenger
Copy link
Author

Yes, something similar, if possible even filtering method choices would be useful, so that I could potentially just show a select amount of methods

@arimger
Copy link
Owner

arimger commented Dec 23, 2023

I will consider it but don't promise anything. It looks like a lot of work.
BTW. where do you use UnityEvents while working on your projects? In the UI-related scripts? I'm asking because in my personal experience we should rather avoid them.

@zRevenger
Copy link
Author

I use them to modularize stuff, like making attacks or similar behaviors, i make single modules that can act on their own and I'm able to add them to scriptable objects that require them. This way I make a functionality once, no need to repeat it or copy paste it or anything similar, it'll be easily maintainable and fixable in case of problems, and most of all since it's already implemented my designers can use it for as many things as they want. idk if it makes sense worded like this tho

@arimger
Copy link
Owner

arimger commented Dec 26, 2023

I don't know your approach and haven't seen any code but in terms of extensibility and maintainability I suggest hiding functionalities behind interfaces, it's really powerful approach since Unity supports direct references/types serialization ([SerializeReference]). It's really hard to debug and track things when using serializable events but of course it's a great tool when using in small area/system so maybe it suits your needs perfectly, if so then just ignore my comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants