Is your feature request related to a problem? Please describe.
When documenting usage of the [Event] attribute recently I noticed that the listener interface method could be clearer.
Example Event Component
using System;
using JCMG.EntitasRedux;
using UnityEngine;
using EventType = JCMG.EntitasRedux.EventType;
namespace ExampleContent.VisualDebugging
{
[Serializable]
[VisualDebug]
[Event(EventTarget.Self, EventType.Added)]
[Event(EventTarget.Self, EventType.Removed)]
public class Vector3Component : IComponent
{
public Vector3 vector3;
}
}
Example Listener Interfaces Generated
public interface IVector3Listener
{
// This interface method could be clearer about what is happening
void OnVector3(VisualDebugEntity entity, UnityEngine.Vector3 vector3);
}
public interface IVector3RemovedListener
{
// This interface method is clear and doesn't need to change.
void OnVector3Removed(VisualDebugEntity entity);
}
Describe the solution you'd like
I'd like to change the generated interface for the Added event to be something more like OnVector3Added and add a bit of XML documentation on the interface method to reflect that this interface method will be invoked when the component is added, updated, or replaced.
public interface IVector3Listener
{
/// <summary>
/// Invoked when the <see cref="ExampleContent.VisualDebugging.Vector3Component"/> on an entity is added, updated,
/// or replaced.
/// </summary>
/// <param name="entity">The entity on which the component change took place</param>
void OnVector3Added(VisualDebugEntity entity, UnityEngine.Vector3 vector3);
}
Is your feature request related to a problem? Please describe. When documenting usage of the
[Event]
attribute recently I noticed that the listener interface method could be clearer.Example Event Component
Example Listener Interfaces Generated
Describe the solution you'd like I'd like to change the generated interface for the
Added
event to be something more likeOnVector3Added
and add a bit of XML documentation on the interface method to reflect that this interface method will be invoked when the component is added, updated, or replaced.