Class · inherits BaseWrap
WrapTarget
The WrapTarget object defines a target. A target is the 3D body with only an outer surface, or an Outer Cage.
About WrapTarget
The WrapTarget object defines a target. A target is the 3D body with only an outer surface, or an Outer Cage.
This target, often an Avatar, is what 3D accessories (using WrapLayer) will be applied to, allowing multiple accessories items to naturally layer over the source target.
Properties 2
Color
: Color3NotReplicatedNotScriptableSets color used for the debug rendering. SeeWrapTarget.DebugMode.Sets color used for the debug rendering. See
WrapTarget.DebugModeDebugMode
: WrapTargetDebugModeNotReplicatedNotScriptableAllows switching between different debugging visualization modes for cage meshes.
Methods 2
CreateTextureInCageSpaceAsync
(texture: EditableImage, options: Dictionary?) → EditableImageYieldsCreates a newEditableImagein cage UV space from a texture in the parentMeshPart's UV space.Creates a new
EditableImageby transferringtexturefrom the UV space of thisWrapTarget's parentMeshPartinto the UV space of the WrapTarget's cage. This method yields until the transfer is complete and does not modify the input image.For example, after a player paints makeup onto a head mesh in an in-experience creation tool, use this method to transfer the texture into cage UV space before uploading it for use with
WrapTextureTransfer. This method also supports cage-space texture transfers unrelated to makeup. To transfer a texture in the opposite direction, useWrapTarget.CreateTextureInTargetSpaceAsync.Use
optionsto specify a region of cage UV space. Each supplied bound must be a finiteVector2. If both bounds are supplied,MaxUVBoundsmust be greater thanMinUVBoundson both axes. Unrecognized option keys raise an error.This method requires the WrapTarget to be parented to a
MeshPartwith valid mesh and cage data. It raises an error if the input or options are invalid, required mesh data cannot be loaded, or the transfer fails. If the device-specific editable memory budget is exhausted, it returnsnil. SeeEditableImagefor additional usage requirements.CreateTextureInTargetSpaceAsync
(texture: EditableImage, wrapTextureTransfer: WrapTextureTransfer) → EditableImageYieldsCreates a newEditableImagein the parentMeshPart's UV space from a texture in cage UV space.Creates a new
EditableImageby transferringtexturefrom cage UV space into the UV space of thisWrapTarget's parentMeshPart. This method yields until the transfer is complete and does not modify the input image.The
wrapTextureTransfersupplies the optional reference cage throughWrapTextureTransfer.ReferenceCageMeshContentand the cage UV bounds throughWrapTextureTransfer.UVMinBoundandWrapTextureTransfer.UVMaxBound. Use a WrapTextureTransfer under aDecalon the same MeshPart as the WrapTarget.For example, use this method to transfer a makeup texture you own into a head mesh's UV space so players can edit it directly on the head in an in-experience creation tool. This method also supports target-space texture transfers unrelated to makeup. To transfer the edited texture back into cage UV space, use
WrapTarget.CreateTextureInCageSpaceAsync.This method requires the WrapTarget to be parented to a
MeshPartwith valid mesh and cage data. It raises an error if either input is invalid, required mesh data cannot be loaded, or the transfer fails. If the device-specific editable memory budget is exhausted, it returnsnil. SeeEditableImagefor additional usage requirements.
WrapTarget also has every member of BaseWrap. Deprecated and Roblox-only members are hidden.
Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.