lisandroct / EventSystem

Event system for Unity using ScriptableObjects
MIT License
14 stars 1 forks source link

Warning "No script asset for FloatTest. Check that the definition is in a file of the same name." #4

Closed paulmasri closed 3 years ago

paulmasri commented 3 years ago

I get this warning at runtime when selecting or typing a float value into Argument 0 of any FloatInspector.

Unity doesn't like FloatTest being defined in FloatInspector.cs?

paulmasri commented 3 years ago

This happens for all event types. Taking this example, it's because FloatTest is not in its own file FloatTest.cs.

I propose to separate tests from listeners, putting them in their own file in a Tests folder.

@lisandroct I plan to implement this and submit a PR imminently. Please add any comments ASAP if you want this done a certain way (or not at all).

lisandroct commented 3 years ago

I got used to just ignore Unity warnings since I mostly find them to report not very important noise so I didn't notice it. I think it's a good fix. Thank you for bringing it up and working on it.