Class MediaContent
Container class for a type of media used in a TutorialPage. Can be either an image, or a video (clip or url)
Inherited Members
Namespace: Unity.Tutorials.Core.Editor
Assembly: Unity.Tutorials.Core.Editor.dll
Syntax
[Serializable]
public class MediaContent
Properties
AutoStart
If the Content type is video, does it auto start on load, or require the user to press play to start
Declaration
public bool AutoStart { get; set; }
Property Value
Type | Description |
---|---|
bool |
ContentType
Which type of source this content media uses
Declaration
public MediaContent.MediaContentType ContentType { get; set; }
Property Value
Type | Description |
---|---|
Media |
Image
The Texture2D used as Image if the Content Type is set to Image
Declaration
public Texture2D Image { get; set; }
Property Value
Type | Description |
---|---|
Texture2D |
Loop
If the content is video, does it loop when it reaches the end.
Declaration
public bool Loop { get; set; }
Property Value
Type | Description |
---|---|
bool |
Url
The URL to the video if the source type is set to VideoURL
Declaration
public string Url { get; set; }
Property Value
Type | Description |
---|---|
string |
VideoClip
The Clip used if the source type is set to VideoClip
Declaration
public VideoClip VideoClip { get; set; }
Property Value
Type | Description |
---|---|
Video |
Methods
IsValid()
A Media Content is considered valid if the associated media to its set type is not null (e.g. an Image Media Content Image properties is not null or a VideoUrl Media url is not null or empty
Declaration
public bool IsValid()
Returns
Type | Description |
---|---|
bool | True if contains the right media, false otherwise |