Closed HollowGraphic closed 4 years ago
What is the full type for [Event()]
? Is this related to EntitasRedux? I'm wondering if this is supposed to be an issue on the Unity COC library, Genesis, or EntitasRedux
I don't believe COC uses Genesis, which makes me think this issue might belong on a different repository.
JCMG.EntitasRedux.EventAttribute
is the full type
Cool, thanks @HollowGraphic! I will transfer this issue to that repository and take a look later today. Thanks for reporting!
@HollowGraphic Can you post an example of the component that's experiencing this issue with the full stacktrace of the error please? I see that there is an event component example and when testing code-generation currently this does not result in any issues.
[Event(EventTarget.Self, EventType.Added)] [Event(EventTarget.Self, EventType.Removed)] [Game] public class Active : IComponent { }
Trace:
[JCMG.Genesis.Editor.UnityCodeGenerator] [Genesis] Code generation failed, process exited with code {0}. at JCMG.Genesis.Editor.UnityLogger.Log (JCMG.Genesis.Editor.LogLevel logLvl, System.String message, System.Exception exception) [0x00052] in
F:\Train Builder\Library\PackageCache\com.jeffcampbellmakesgames.genesis@1.2.0\Scripts\Editor\Logging\UnityLogger.cs:102
at JCMG.Genesis.Editor.UnityLogger.Warn (System.String message) [0x00000] in
F:\Train Builder\Library\PackageCache\com.jeffcampbellmakesgames.genesis@1.2.0\Scripts\Editor\Logging\UnityLogger.cs:59
at JCMG.Genesis.Editor.UnityCodeGenerator.Generate (JCMG.Genesis.Editor.GenesisSettings[] settingsData) [0x000f2] in
F:\Train Builder\Library\PackageCache\com.jeffcampbellmakesgames.genesis@1.2.0\Scripts\Editor\CodeGeneration\UnityCodeGenerator.cs:134
at JCMG.Genesis.Editor.UnityCodeGenerator.GenerateAll () [0x00005] in
F:\Train Builder\Library\PackageCache\com.jeffcampbellmakesgames.genesis@1.2.0\Scripts\Editor\CodeGeneration\UnityCodeGenerator.cs:48
at JCMG.Genesis.Editor.MenuItems.ExecuteGenesisCodeGeneration () [0x00000] in
F:\Train Builder\Library\PackageCache\com.jeffcampbellmakesgames.genesis@1.2.0\Scripts\Editor\MenuItems.cs:72
I can see two issues here:
The fix for this should be pretty straightforward for both; as far as an ETA I'll see if I can knock this out later tonight and post an updated package for both Genesis and EntitasRedux. This will require updating your package to the latest at that point.
Sweet, I'll keep an eye out
Both of these issues have been resolved for Genesis and EntitasRedux and a new version v1.2.2 is available that should resolve these issues. Let me know how this works for you!
Awesome, I'll keep you posted.
No errors. All event systems and components are being generated.
No errors. All event systems and components are being generated.
Excellent. I am closing this out as complete then.
Adding
[Event()]
attribute to any component causes Genesis to fail with an error stating "Value cannot be null. Parameter name: element"