Class ExternalLinkSpaceComponent

Inheritance Relationships

Base Types

Class Documentation

class ExternalLinkSpaceComponent : public csp::multiplayer::ComponentBase, public csp::multiplayer::IEnableableComponent, public csp::multiplayer::ITransformComponent, public csp::multiplayer::IVisibleComponent

Used to handle external URLs that can be opened from within a space.

Public Functions

ExternalLinkSpaceComponent(csp::common::LogSystem *LogSystem, SpaceEntity *Parent)

Creates an external link component that can be added to an existing space entity.

Parameters

Parent – - The space entity to which this new component will belong to.

const csp::common::String &GetName() const

Gets the name of this external link component.

void SetName(const csp::common::String &Value)

Sets the name for this external link component.

Parameters

Value – - The new name to assign to this external link componenent.

const csp::common::String &GetLinkUrl() const

Gets the URL address to which this external link component redirects the user on trigger.

void SetLinkUrl(const csp::common::String &Value)

Sets the URL address to which this external link component redirects the user to on trigger.

Parameters

Value – - The URL to be assigned to this external link component.

const csp::common::String &GetDisplayText() const

Gets the text that will be displayed by the component as hyperlink to the URL it redirects to.

void SetDisplayText(const csp::common::String &Value)

Sets the text that will be displayed by the component as hyperlink to the URL it redirects to.

Parameters

Value – - The new text to be displayed as hyperlink.

Public Static Functions

static const ComponentSchema &GetSchema()
static std::unique_ptr<ExternalLinkSpaceComponent> TryMake(const ComponentSchema &InSchema, csp::common::LogSystem *LogSystem, SpaceEntity *Parent)

Creates an external link space component using the provided schema if it is compatible with the built-in schema.

Parameters
  • InSchema – The schema to use. Must be compatible with the built-in schema.

  • LogSystem – The log system.

  • Parent – The space entity that owns this component.

Returns

A new ExternalLinkSpaceComponent if the schema is compatible, nullptr otherwise.