Skip to content

Commit

Permalink
Add getter for RenderGraph Node uuid (bevyengine#1499)
Browse files Browse the repository at this point in the history
`RenderGraph` errors only give the `Uuid` of the node. So for my graphviz dot based visualization of the `RenderGraph` I really wanted to show it to the user. I think it makes sense to have it accessible for at least debugging purposes.
  • Loading branch information
mtsr committed Feb 22, 2021
1 parent 13b602e commit 72f2a7b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/bevy_render/src/render_graph/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ impl NodeId {
pub fn new() -> Self {
NodeId(Uuid::new_v4())
}

pub fn uuid(&self) -> &Uuid {
&self.0
}
}

pub trait Node: Downcast + Send + Sync + 'static {
Expand Down

0 comments on commit 72f2a7b

Please sign in to comment.