Custom GameLogic SetContainer called twice
Outdated
When there is only one custom game logic component attached to an entity SetContainer will be called twice, resulting in two calls to OnAddedToContainer.
public static MyGameLogicComponent Create(ICollection<MyGameLogicComponent> logicComponents, MyEntity entity) { foreach (MyGameLogicComponent myGameLogicComponent in logicComponents) { myGameLogicComponent.SetContainer(entity.Components); // first call here } switch (logicComponents.Count) { case 0: return null; case 1: return logicComponents.First<MyGameLogicComponent>(); // second call when the returned component gets added default: return new MyCompositeGameLogicComponent(logicComponents); } }
Hello, Engineer!
Thank you for your feedback! Your topic has been added between considered issues.Please keep voting for the issue as it will help us to identify the most serious bugs.
We really appreciate your patience.
Kind Regards
Keen Software House: QA Department
Hello, Engineer!
Thank you for your feedback! Your topic has been added between considered issues.Please keep voting for the issue as it will help us to identify the most serious bugs.
We really appreciate your patience.
Kind Regards
Keen Software House: QA Department
Replies have been locked on this page!