From bc4fe9b186db3f32eef38fc4241289df480fa949 Mon Sep 17 00:00:00 2001 From: Jakob Hellermann Date: Mon, 22 Feb 2021 09:15:29 +0000 Subject: [PATCH] keep track of type name in NodeState (#1444) Adds the original type_name to `NodeState`, enabling plugins like [this](https://github.com/jakobhellermann/bevy_mod_debugdump). This does increase the `NodeState` type by 16 bytes, but it is already 176 so it's not that big of an increase. --- crates/bevy_render/src/render_graph/node.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/bevy_render/src/render_graph/node.rs b/crates/bevy_render/src/render_graph/node.rs index fbeef212cb..3b61a7a604 100644 --- a/crates/bevy_render/src/render_graph/node.rs +++ b/crates/bevy_render/src/render_graph/node.rs @@ -112,6 +112,7 @@ impl Edges { pub struct NodeState { pub id: NodeId, pub name: Option>, + pub type_name: &'static str, pub node: Box, pub input_slots: ResourceSlots, pub output_slots: ResourceSlots, @@ -135,6 +136,7 @@ impl NodeState { input_slots: ResourceSlots::from(node.input()), output_slots: ResourceSlots::from(node.output()), node: Box::new(node), + type_name: std::any::type_name::(), edges: Edges { id, input_edges: Vec::new(),