Beamable SDK
Public Member Functions | Static Public Member Functions | Public Attributes | Properties | Events | List of all members
DisruptorBeam.Content.ContentObject Class Reference
Inheritance diagram for DisruptorBeam.Content.ContentObject:
Inheritance graph
[legend]
Collaboration diagram for DisruptorBeam.Content.ContentObject:
Collaboration graph
[legend]

Public Member Functions

void SetIdAndVersion (string id, string version)
 
ContentObject SetContentName (string name)
 
ContentObject SetContentMetadata (string name, string version)
 
void BroadcastUpdate ()
 
virtual void Validate ()
 Validate this ContentObject. More...
 
bool HasValidationErrors (out List< string > errors)
 
List< ContentValidationExceptionGetMemberValidationErrors ()
 
string ToJson ()
 
void SetIdAndVersion (string id, string version)
 

Static Public Member Functions

static string GetContentTypeName (Type contentType)
 Serialize this content into a json block, containing ONLY the properties object. Ex: { "sample": { "data": 4 }, "sample2": { "data": { "nested": 5 } } } More...
 
static string GetContentType< TContent > ()
 
static TContent Make< TContent > (string name)
 
static string GetContentType (Type contentType)
 
static string GetContentType< TContent > ()
 

Public Attributes

string ContentVersion => Version
 
string ContentType => GetContentTypeName(GetType())
 
string Id => $"{ContentType}.{ContentName}"
 
- Public Attributes inherited from UnityEngine.ScriptableObject
string name
 

Properties

string ContentName [get]
 
string Version [get, set]
 
string[]?? Tags [get, set]
 
- Properties inherited from Beamable.Common.Content.IContentObject
string Id [get]
 
string Version [get]
 
string[] Tags [get]
 

Events

ContentDelegate OnChanged
 

Member Function Documentation

◆ GetContentTypeName()

static string DisruptorBeam.Content.ContentObject.GetContentTypeName ( Type  contentType)
inlinestatic

Serialize this content into a json block, containing ONLY the properties object. Ex: { "sample": { "data": 4 }, "sample2": { "data": { "nested": 5 } } }

Parameters
s

Set all the values of this content object from the given ArrayDict. This is a modifying action.

Parameters
dictAn array dict that should only contain the properties json object

Create a new piece of content

Parameters
nameThe name of the content, should be unique
dictThe property object to set the content values
Template Parameters
TContentSome type of content
Returns

◆ Validate()

virtual void DisruptorBeam.Content.ContentObject.Validate ( )
inlinevirtual

Validate this ContentObject.

Exceptions
AggregateContentValidationExceptionShould throw if the content is semantically invalid.

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