Is it possible to make dyn object Materials? #19914
Unanswered
codecnotsupported
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Background information:
I've some preset logic to spawn/configure a set of entities with components, which are required in multiple functions.
To configure these components I need to Query the ECS.
At first I made this a function, however, to prevent bloating the function signature with
Query
s of these functions I moved the logic to be Events based.One of these Components that is configurable is the MeshMaterial2d, which is a handle to a Material2D.
The Problem:
However I cannot (as far as I understand it), make a
dyn Material2D
.because it inherits
AsBindGroup
which has associated types:Data = Type, Param = Type
.Is it possible to make Materials dyn object/type erased and to be added to a enity?
I'm open to any alternative solutions.
Beta Was this translation helpful? Give feedback.
All reactions