Megacool Unity
The Unity interface to the Megacool SDK
Public Types | Public Member Functions | Properties | List of all members
MegacoolShareConfig Class Reference

Pass to Megacool.Share(MegacoolShareConfig) to configure how shares are made. More...

Public Types

enum class  ModalArrowDirection : int {
  Up = 1 << 0 , Down = 1 << 1 , Left = 1 << 2 , Right = 1 << 3 ,
  Any = Up | Down | Left | Right
}
 Possible directions for the arrow on the iPad share modal. More...
 

Public Member Functions

 MegacoolShareConfig ()
 Create a new configuration object to customize sharing. More...
 
override string ToString ()
 

Properties

string?? RecordingId [get, set]
 Identifier of the recording to share. More...
 
string?? Message [get, set]
 Set the predefined text in the share. More...
 
MegacoolSharingStrategy?? Strategy [get, set]
 Set whether to prioritize media or links when sharing to channels that support either but not both. More...
 
string FallbackImage [get, set]
 Path to a fallback file to share in case the given recording doesn't exist, relative to the StreamingAssets directory. More...
 
Dictionary< string, object > Data [get, set]
 Set extra share data that will be present on the received MegacoolShare. More...
 
Uri Url [get, set]
 Customize the link shared. More...
 
string?? ModalTitle [get, set]
 Customize the title of the modal that presents the apps the user can share to. More...
 
Rect?? ModalLocation [get, set]
 iPads only: Customize the location of the share modal. If unset the modal will be in the upper left corner. More...
 
ModalArrowDirection?? ModalPermittedArrowDirections [get, set]
 iPads only: Set where the arrow on the share modal can be, and by extension where the share modal will be positioned relative to the location set in ModalLocation. XOR the permitted directions together. Defaults to ModalArrowDirection.Any. More...
 

Detailed Description

Pass to Megacool.Share(MegacoolShareConfig) to configure how shares are made.

Member Enumeration Documentation

◆ ModalArrowDirection

Possible directions for the arrow on the iPad share modal.

Constructor & Destructor Documentation

◆ MegacoolShareConfig()

MegacoolShareConfig.MegacoolShareConfig ( )
inline

Create a new configuration object to customize sharing.

Property Documentation

◆ Data

Dictionary<string, object> MegacoolShareConfig.Data
getset

Set extra share data that will be present on the received MegacoolShare.

This has to be JSON serializable.

◆ FallbackImage

string MegacoolShareConfig.FallbackImage
getset

Path to a fallback file to share in case the given recording doesn't exist, relative to the StreamingAssets directory.

On iOS the filename given here will be preserved when shared. Thus when sharing to f. ex email the attached filename will be same and thus user visible.

◆ Message

string?? MegacoolShareConfig.Message
getset

Set the predefined text in the share.

Not all apps supports setting a predefined text in the share.

◆ ModalLocation

Rect?? MegacoolShareConfig.ModalLocation
getset

iPads only: Customize the location of the share modal. If unset the modal will be in the upper left corner.

The coordinates follow the Unity GUI convention, where (0, 0) is the upper left corner and X increasing to the right and Y increasing downwards.

◆ ModalPermittedArrowDirections

ModalArrowDirection?? MegacoolShareConfig.ModalPermittedArrowDirections
getset

iPads only: Set where the arrow on the share modal can be, and by extension where the share modal will be positioned relative to the location set in ModalLocation. XOR the permitted directions together. Defaults to ModalArrowDirection.Any.

◆ ModalTitle

string?? MegacoolShareConfig.ModalTitle
getset

Customize the title of the modal that presents the apps the user can share to.

The default is "Share GIF". On iOS the share modal doesn't have a title.

The title of the share modal.

◆ RecordingId

string?? MegacoolShareConfig.RecordingId
getset

Identifier of the recording to share.

◆ Strategy

MegacoolSharingStrategy?? MegacoolShareConfig.Strategy
getset

Set whether to prioritize media or links when sharing to channels that support either but not both.

◆ Url

Uri MegacoolShareConfig.Url
getset

Customize the link shared.

This should be a relative URL of the form "/some/path?key=value", since only the path, query and fragment will be included. This will be combined with the base url set in the config panel and the referral code to build the absolute url for the share: https://<base-url><url>?_m=<referal-code>


The documentation for this class was generated from the following file: