Essential Kit
Loading...
Searching...
No Matches
ShareSheetsealed

The ShareSheet class provides an interface to access standard services from your app. More...

Public Member Functions

void AddText (string value)
 Adds the initial text to the share sheet.
 
void AddScreenshot ()
 Creates a screenshot and adds it to the share sheet.
 
void AddImage (Texture2D image, TextureEncodingFormat textureEncodingFormat=TextureEncodingFormat.JPG)
 Adds the specified image to the share sheet.
 
void AddImage (byte[] imageData, string mimeType)
 Adds the specified image to the share sheet.
 
void AddURL (URLString url)
 Adds the URL to the share sheet.
 
void AddAttachment (byte[] data, string mimeType, string filename)
 Adds the attachment to the share sheet.
 
void SetCompletionCallback (EventCallback< ShareSheetResult > callback)
 Specify the action to execute after the share sheet is dismissed.
 
void Show ()
 Shows the share sheet interface, anchored at screen position (0, 0).
 
void Show (Vector2 screenPosition)
 Shows the share sheet interface, anchored to given position.
 

Static Public Member Functions

static ShareSheet CreateInstance ()
 Initializes a new instance of the ShareSheet class.
 

Detailed Description

The system provides several standard services, such as copying items to the pasteboard, posting content to social media sites, sending items via email or SMS, and more.

Member Function Documentation

◆ AddText()

void AddText ( string value)
Parameters
valueThe text to add.

◆ AddImage()

void AddImage ( Texture2D image,
TextureEncodingFormat textureEncodingFormat = TextureEncodingFormat::JPG )
Parameters
imageThe image to add.
textureEncodingFormatThe texture encoding format.

◆ AddURL()

void AddURL ( URLString url)
Parameters
urlThe URL to add.

References URLString.IsValid.

◆ SetCompletionCallback()

void SetCompletionCallback ( EventCallback< ShareSheetResult > callback)
Parameters
callbackThe action to be called on completion.

◆ Show()

void Show ( Vector2 screenPosition)
Parameters
screenPositionThe position (in the coordinate system of screen) at which to anchor the share sheet menu. This property is used in iOS platform only.