unreal.MagicLeapLocationComponent

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

Bases: unreal.ActorComponent

Component that provides access to the Location API functionality.

C++ Source:

  • Plugin: MagicLeapLocation

  • Module: MagicLeapLocation

  • File: MagicLeapLocationComponent.h

Editor Properties: (see get_editor_property/set_editor_property)

  • 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.

  • 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.

  • editable_when_inherited (bool): [Read-Write] True if this component can be modified when it was inherited from a parent actor class

  • is_editor_only (bool): [Read-Write] If true, the component will be excluded from non-editor builds

  • 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_got_location (MagicLeapLocationResultDelegateMulti): [Read-Write] Delegate instances

  • on_got_location_on_sphere (MagicLeapLocationOnSphereResultDelegateMulti): [Read-Write] On Got Location on Sphere

  • primary_component_tick (ActorComponentTickFunction): [Read-Write] Main tick function for the Component

  • replicates (bool): [Read-Write] Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!

get_last_location(use_fine_location=True) → MagicLeapLocationData or None

Attempts to retrieve the latitude, longitude and postcode of the device.

Parameters

use_fine_location (bool) – Flags whether or not to request a fine or coarse location.

Returns

True if the location data is valid, false otherwise.

out_location (MagicLeapLocationData): If successful this will contain the latitude, longitude and postcode of the device.

Return type

MagicLeapLocationData or None

get_last_location_async(use_fine_location=True)bool

Attempts to retrieve the latitude, longitude and postcode of the device asynchronously.

Parameters

use_fine_location (bool) – Flags whether or not to request a fine or coarse location.

Returns

True if the location is immediately resolved, false otherwise.

Return type

bool

get_last_location_on_sphere(radius, use_fine_location=True) → Vector or None

Attempts to retrieve a point on a sphere representing the location of the device.

Parameters
  • radius (float) – The radius of the sphere that the location will be projected onto.

  • use_fine_location (bool) – Flags whether or not to request a fine or coarse location.

Returns

True if the location is valid, false otherwise.

out_location (Vector): If successful this will be a valid point on a sphere representing the location of the device.

Return type

Vector or None

get_last_location_on_sphere_async(radius, use_fine_location=True)bool

Attempts to retrieve a point on a sphere representing the location of the device asynchronously.

Parameters
  • radius (float) – The radius of the sphere that the location will be projected onto.

  • use_fine_location (bool) – Flags whether or not to request a fine or coarse location.

Returns

True if the location is immediately resolved, false otherwise.

Return type

bool

property on_got_location

[Read-Write] Delegate instances

Type

(MagicLeapLocationResultDelegateMulti)

property on_got_location_on_sphere

[Read-Write] On Got Location on Sphere

Type

(MagicLeapLocationOnSphereResultDelegateMulti)