 85c3251c10
			
		
	
	
		85c3251c10
		
			
		
	
	
	
	
		
			
			# Objective A lot of items in `bevy_ui` could be `FromReflect` but aren't. This prevents users and library authors from being able to convert from a `dyn Reflect` to one of these items. ## Solution Derive `FromReflect` where possible. Also register the `ReflectFromReflect` type data.
		
			
				
	
	
		
			10 lines
		
	
	
		
			347 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
		
			347 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| use bevy_ecs::prelude::Component;
 | |
| use bevy_ecs::reflect::ReflectComponent;
 | |
| use bevy_reflect::std_traits::ReflectDefault;
 | |
| use bevy_reflect::{FromReflect, Reflect, ReflectFromReflect};
 | |
| 
 | |
| /// Marker struct for labels
 | |
| #[derive(Component, Debug, Default, Clone, Copy, Reflect, FromReflect)]
 | |
| #[reflect(Component, FromReflect, Default)]
 | |
| pub struct Label;
 |