amethyst / specs

Specs - Parallel ECS

Home Page:https://amethyst.github.io/specs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`EntityResBuilder` does not implement `Builder`

gamma-delta opened this issue · comments

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.

... 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>