mirror of
https://github.com/FyroxEngine/Fyrox.git
synced 2026-10-12 02:02:20 +00:00
expose instance id + add docs
This commit is contained in:
@@ -169,6 +169,7 @@ use crate::{
|
||||
},
|
||||
},
|
||||
};
|
||||
use fyrox::scene::base::SceneNodeId;
|
||||
|
||||
pub mod animation;
|
||||
pub mod font;
|
||||
@@ -319,6 +320,8 @@ pub fn make_property_editors_container(
|
||||
|
||||
container.insert(make_status_enum_editor_definition());
|
||||
|
||||
container.insert(InspectablePropertyEditorDefinition::<SceneNodeId>::new());
|
||||
|
||||
container.insert(EnumPropertyEditorDefinition::<LodGroup>::new_optional());
|
||||
container.insert(InheritablePropertyEditorDefinition::<Option<LodGroup>>::new());
|
||||
|
||||
|
||||
@@ -296,7 +296,6 @@ pub enum NodeScriptMessage {
|
||||
Deserialize,
|
||||
)]
|
||||
#[repr(transparent)]
|
||||
#[reflect(hide_all)]
|
||||
pub struct SceneNodeId(pub Uuid);
|
||||
|
||||
impl Visit for SceneNodeId {
|
||||
@@ -520,8 +519,10 @@ pub struct Base {
|
||||
#[reflect(hidden)]
|
||||
pub(crate) original_handle_in_resource: Handle<Node>,
|
||||
|
||||
#[reflect(read_only)]
|
||||
#[reflect(hidden)]
|
||||
/// Unique id of a node, that could be used as a reliable "index" of the node. This id is mostly
|
||||
/// useful for network games. Keep in mind, that this id **will** be randomized in case if you're
|
||||
/// instantiating a prefab. In other words, all instances of a prefab will have unique instance
|
||||
/// id.
|
||||
pub(crate) instance_id: SceneNodeId,
|
||||
|
||||
// Scripts of the scene node.
|
||||
|
||||
Reference in New Issue
Block a user