amethyst / specs

Specs - Parallel ECS
https://amethyst.github.io/specs/
Apache License 2.0
2.49k stars 219 forks source link

`EntityResBuilder` does not implement `Builder` #751

Closed gamma-delta closed 2 years ago

gamma-delta commented 2 years ago

Description

Despite having exactly the same methods as (for example) EntityBuilder and LazyBuilder, EntityResBuilder (like you get from Entities::build_entity) does not implement Builder.

This is irritating, because I have a set of helper functions that make "archetypes" (commonly-seen bunches of components on entities, like making a wall out of a sprite and a collider), and I can't use them to spawn things from a system without making a wrapper struct (which is what I plan on doing).

Meta

Rust version: rustc 1.63.0-nightly (546c826f0 2022-06-12) Specs version / commit: specs = { version = "0.17.0", features = ["derive"] } Operating system: Windows 10

Reproduction

Steps to reproduce the behavior:

  1. Go to the docs.rs page for EntityResBuilder
  2. Look, it doesn't implement Builder

Expected behavior

It ought to implement Builder.

gamma-delta commented 2 years ago

... Oh, never mind 😅 it needs additional information, doesn't it

But still, it would be nice if there was some sensible default? I'm not super sure how the internals work though, or why EntityResBuilder needs that additional WriteStorage<T>