Closed starikcetin closed 6 years ago
Due to (on purpose) limitations with C# Generics, EgoConstrants can't define subtractive / negative Components.
EgoConstrants
However, you can early-out in a ForEachGameObject callback with EgoComponent.HasComponents<>():
EgoComponent.HasComponents<>()
// ExampleSystem.cs using UnityEngine; public class ExampleSystem : EgoSystem< EgoConstraint<Transform, Example> >{ public override void Update() { constraint.ForEachGameObject( ( egoComponent, transform, example ) => { if( egoComponent.HasComponents<SkipMe>() ) { return; } // ... } ); } }
I see. Thanks.
Due to (on purpose) limitations with C# Generics,
EgoConstrants
can't define subtractive / negative Components.However, you can early-out in a ForEachGameObject callback with
EgoComponent.HasComponents<>()
: