Describe the bug
after setup entitas alone wiki, run dotnet Jenny/Jenny.Generator.Cli.dll gen success, but component gen twice which lead to compile error.
why GameSuitComponent.cs generate twice, and the code like this:
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Entitas.CodeGeneration.Plugins.ComponentEntityApiGenerator.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
public partial class GameEntity {
public SuitComponent suit { get { return (SuitComponent)GetComponent(GameComponentsLookup.Suit); } }
public bool hasSuit { get { return HasComponent(GameComponentsLookup.Suit); } }
public void AddSuit(Suit newSuit) {
var index = GameComponentsLookup.Suit;
var component = (SuitComponent)CreateComponent(index, typeof(SuitComponent));
component.Suit = newSuit;
AddComponent(index, component);
}
public void ReplaceSuit(Suit newSuit) {
var index = GameComponentsLookup.Suit;
var component = (SuitComponent)CreateComponent(index, typeof(SuitComponent));
component.Suit = newSuit;
ReplaceComponent(index, component);
}
public void RemoveSuit() {
RemoveComponent(GameComponentsLookup.Suit);
}
}
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Entitas.CodeGeneration.Plugins.ComponentEntityApiGenerator.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
public partial class GameEntity {
public SuitComponent suit { get { return (SuitComponent)GetComponent(GameComponentsLookup.Suit); } }
public bool hasSuit { get { return HasComponent(GameComponentsLookup.Suit); } }
public void AddSuit(int newS) {
var index = GameComponentsLookup.Suit;
var component = (SuitComponent)CreateComponent(index, typeof(SuitComponent));
component.s = newS;
AddComponent(index, component);
}
public void ReplaceSuit(int newS) {
var index = GameComponentsLookup.Suit;
var component = (SuitComponent)CreateComponent(index, typeof(SuitComponent));
component.s = newS;
ReplaceComponent(index, component);
}
public void RemoveSuit() {
RemoveComponent(GameComponentsLookup.Suit);
}
}
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Entitas.CodeGeneration.Plugins.ComponentMatcherApiGenerator.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
public sealed partial class GameMatcher {
static Entitas.IMatcher<GameEntity> _matcherSuit;
public static Entitas.IMatcher<GameEntity> Suit {
get {
if (_matcherSuit == null) {
var matcher = (Entitas.Matcher<GameEntity>)Entitas.Matcher<GameEntity>.AllOf(GameComponentsLookup.Suit);
matcher.componentNames = GameComponentsLookup.componentNames;
_matcherSuit = matcher;
}
return _matcherSuit;
}
}
}
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Entitas.CodeGeneration.Plugins.ComponentMatcherApiGenerator.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
public sealed partial class GameMatcher {
static Entitas.IMatcher<GameEntity> _matcherSuit;
public static Entitas.IMatcher<GameEntity> Suit {
get {
if (_matcherSuit == null) {
var matcher = (Entitas.Matcher<GameEntity>)Entitas.Matcher<GameEntity>.AllOf(GameComponentsLookup.Suit);
matcher.componentNames = GameComponentsLookup.componentNames;
_matcherSuit = matcher;
}
return _matcherSuit;
}
}
}
Describe the bug after setup entitas alone wiki, run
dotnet Jenny/Jenny.Generator.Cli.dll gen
success, but component gen twice which lead to compile error.why GameSuitComponent.cs generate twice, and the code like this:
the same code exists.
below is my Jenny.Properties:
dotnet 6 installed:
To Reproduce Steps to reproduce the behavior:
dotnet Jenny/Jenny.Generator.Cli.dll gen
Expected behavior generate code correctly and no compile error.