Component:ChildrenSaveBlocker: Difference between revisions

From Resonite Wiki
add info
cleanup
 
Line 1: Line 1:
{{Infobox Component
{{Infobox Component
|Image=ChildrenSaveBlockerComponent.png
|Image=ChildrenSaveBlockerComponent.png
|Name=Children Save Blocker
|Name=ChildrenSaveBlocker
}}
}}
Children save blocker is a component that prevents any user from saving the slots under the slot with this component.


== Usage ==
The '''ChildrenSaveBlocker''' component prevents the slot's children from being saved with the slot.
 
== Fields ==
 
{{Table ComponentFields
{{Table ComponentFields
}}
}}


== Behavior ==
== Usage ==
This component prevents any user from saving all the slots under this component's slot.
 
When attached to a slot, the children of the slot will not be saved when the slot is part of an item being saved. The slot itself will still be saved.


== Examples ==
== Examples ==
This component is used most commonly where a room or workspace may get filled with items that may not automatically make themselves non persistent. When the room, workspace, or world is saved, the items under the slot for said area will not exist in the save file. This is useful for auto cleanup of a world for saving it rather than cleaning it up manually.


This can also be used to make an avatar that is wearable by others, but the moment that the user tries to save the avatar, they will see an avatar icon but it will just spawn a blank slot when worn.
There are a few cases where this component can be useful:
 
* A room or workspace for user holding where items that are not persistent may find themselves in. This component can be used to save the workspace (and thus retain functionality) but not the items in it.
* Placed on a slot with a [[Component:SnapTarget|SnapTarget]] to save snapping behavior while not saving any items placed in the snap target.
* Placed on a slot with a [[Component:GrabbableReceiverSurface|GrabbableReceiverSurface]] or its <code>OverrideParent</code> to save receiver behavior while not saving any items on the surface.
 
== See also ==


== See Also ==
* [[Component:GrabbableSaveBlock|GrabbableSaveBlock]] for blocking saves of grabbable items.


[[Category:Components:Utility{{#translation:}}|Children Save Blocker]]
[[Category:Components:Utility]]
[[Category:Components{{#translation:}}|Children Save Blocker]]
[[Category:Components]]

Latest revision as of 14:49, 16 June 2025

Component image 
ChildrenSaveBlocker component as seen in the Scene Inspector

The ChildrenSaveBlocker component prevents the slot's children from being saved with the slot.

Fields

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled. Some components stop their functionality when this field is disabled, but some don't.

Usage

When attached to a slot, the children of the slot will not be saved when the slot is part of an item being saved. The slot itself will still be saved.

Examples

There are a few cases where this component can be useful:

  • A room or workspace for user holding where items that are not persistent may find themselves in. This component can be used to save the workspace (and thus retain functionality) but not the items in it.
  • Placed on a slot with a SnapTarget to save snapping behavior while not saving any items placed in the snap target.
  • Placed on a slot with a GrabbableReceiverSurface or its OverrideParent to save receiver behavior while not saving any items on the surface.

See also