unreal.MagicLeapARPinComponent

class unreal.MagicLeapARPinComponent(outer=None, name='None')

Bases: unreal.SceneComponent

Component to make content persist at locations in the real world.

C++ Source:

  • Plugin: MagicLeap
  • Module: MagicLeap
  • File: MagicLeapARPinComponent.h

Editor Properties: (see get_editor_property/set_editor_property)

  • absolute_location (bool): [Read-Write] If RelativeLocation should be considered relative to the world, rather than the parent
  • absolute_rotation (bool): [Read-Write] If RelativeRotation should be considered relative to the world, rather than the parent
  • absolute_scale (bool): [Read-Write] If RelativeScale3D should be considered relative to the world, rather than the parent
  • asset_user_data (Array(AssetUserData)): [Read-Write] Array of user data stored with the component
  • auto_activate (bool): [Read-Write] Whether the component is activated at creation or must be explicitly activated.
  • auto_pin_type (AutoPinType): [Read-Write] Mode for automatically pinning this component or it’s owner actor to real-world.
  • can_ever_affect_navigation (bool): [Read-Write] Whether this component can potentially influence navigation
  • component_tags (Array(Name)): [Read-Write] Array of tags that can be used for grouping and categorizing. Can also be accessed from scripting.
  • detail_mode (DetailMode): [Read-Write] If detail mode is >= system detail mode, primitive won’t be rendered.
  • editable_when_inherited (bool): [Read-Write] True if this component can be modified when it was inherited from a parent actor class
  • hidden_in_game (bool): [Read-Write] Whether to hide the primitive in game, if the primitive is Visible.
  • is_editor_only (bool): [Read-Write] If true, the component will be excluded from non-editor builds
  • mobility (ComponentMobility): [Read-Write] How often this component is allowed to move, used to make various optimizations. Only safe to set in constructor.
  • object_uid (str): [Read-Write] Unique ID for this component to save the meta data for the Pin and make content persistent. This name has to be unique across all instances of the MagicLeapARPinComponent class. If empty, the name of the owner actor will be used.
  • on_component_activated (ActorComponentActivatedSignature): [Read-Write] Called when the component has been activated, with parameter indicating if it was from a reset
  • on_component_deactivated (ActorComponentDeactivateSignature): [Read-Write] Called when the component has been deactivated
  • on_persistent_entity_pinned (PersistentEntityPinned): [Read-Write] Fired when an entity is successfully pinned by this component.
  • physics_volume_changed_delegate (PhysicsVolumeChanged): [Read-Write] Delegate that will be called when PhysicsVolume has been changed *
  • primary_component_tick (ActorComponentTickFunction): [Read-Write] Main tick function for the Component
  • relative_location (Vector): [Read-Write] Location of the component relative to its parent
  • relative_rotation (Rotator): [Read-Write] Rotation of the component relative to its parent
  • relative_scale3d (Vector): [Read-Write] Non-uniform scaling of the component relative to its parent. Note that scaling is always applied in local space (no shearing etc)
  • replicates (bool): [Read-Write] Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!
  • should_pin_actor (bool): [Read-Write] Pin this component’s owner actor instead of just the component itself. Relevant only when using ‘OnlyOnDataRestoration’ or ‘Always’ as AutoPinType.
  • should_update_physics_volume (bool): [Read-Write] Whether or not the cached PhysicsVolume this component overlaps should be updated when the component is moved. GetPhysicsVolume():
  • use_attach_parent_bound (bool): [Read-Write] If true, this component uses its parents bounds when attached. This can be a significant optimization with many components attached together.
  • visible (bool): [Read-Write] Whether to completely draw the primitive; if false, the primitive is not drawn, does not cast a shadow.
auto_pin_type

(AutoPinType) – [Read-Write] Mode for automatically pinning this component or it’s owner actor to real-world.

get_pinned_pin_id() → Guid or None

Get the ID of the Pin the entity (component or actor) is currently pinned to.

Returns:True if an entity is currently pinned by this component and the output param is successfully populated.

pin_id (Guid): Output param for the ID of the Pin.

Return type:Guid or None
is_pinned() → bool

True if an entity (component or actor) is currently pinned by this component. If true, the entity’s transform will be locked. App needs to call UnPin() if it wants to move it again. If false, and you still want your content to persist, you will have to call PinSceneComponent() or PinActor() before EndPlay().

Returns:True if an entity (component or actor) is currently pinned by this component.
Return type:bool
object_uid

(str) – [Read-Write] Unique ID for this component to save the meta data for the Pin and make content persistent. This name has to be unique across all instances of the MagicLeapARPinComponent class. If empty, the name of the owner actor will be used.

on_persistent_entity_pinned

(PersistentEntityPinned) – [Read-Write] Fired when an entity is successfully pinned by this component.

pin_actor(actor_to_pin) → bool

Pin given Actor to the closest AR Pin in real-world. OnPersistentEntityPinned event will be fired when a suitable AR Pin is found for this Actor. The Actor’s transform will then be locked. App needs to call UnPin() if it wants to move the Actor again.

Parameters:actor_to_pin (Actor) – Actor to pin to the world. Pass in this component’s owner if app is using ‘OnlyOnDataRestoration’ or ‘Always’ AutoPinType.
Returns:true if the Actor was accepted to be pinned, false otherwise.
Return type:bool
pin_restored_or_synced() → bool

True if the AR Pin for the unique ID ObjectUID was restored from the app’s local storage or was repliated over network. Implies if content was already pinned earlier. Does not imply if that restored Pin is available in the current environment.

Returns:True if the Pin data was restored from local storage or network.
Return type:bool
pin_scene_component(component_to_pin) → bool

Pin given SceneComponent to the closest AR Pin in real-world. OnPersistentEntityPinned event will be fired when a suitable AR Pin is found for this component. The component’s transform will then be locked. App needs to call UnPin() if it wants to move the component again.

Parameters:component_to_pin (SceneComponent) – SceneComponent to pin to the world. Pass in ‘this’ component if app is using ‘OnlyOnDataRestoration’ or ‘Always’ AutoPinType.
Returns:true if the component was accepted to be pinned, false otherwise.
Return type:bool
should_pin_actor

(bool) – [Read-Write] Pin this component’s owner actor instead of just the component itself. Relevant only when using ‘OnlyOnDataRestoration’ or ‘Always’ as AutoPinType.

un_pin() → None

Detach or un-pin the currently pinned entity (component or actor) from the real-world. Call this if you want to change the transform of a pinned entity. Note that if you still want your content to persist, you will have to call PinSceneComponent() or PinActor() before EndPlay().