You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[PublicAPI]
public interface ICleanup<TStrategy> where TStrategy : ICleanupStrategy { }
public interface ICleanupStrategy
{
void OnCleanup(Entity<TScope> entity);
}
public class RemoveComponent : ICleanupStrategy
{
public void OnCleanup(Entity<TScope> entity)
{
if (entity.Has<TComponent>())
entity.Remove<TComponent>();
}
}
public class DestroyEntity : ICleanupStrategy
{
public void OnCleanup(Entity<TScope> entity)
{
entity.Destroy();
}
}
❗ problem: from where take the scope of the entity and the component?
The text was updated successfully, but these errors were encountered:
not as just marker
i.e
❗ problem: from where take the scope of the entity and the component?
The text was updated successfully, but these errors were encountered: