Sinespace Client 2025.3.19431
Client-side scripting for Sinespace
SineSpace.Scripting.Player.SProfile Class Reference
Inheritance diagram for SineSpace.Scripting.Player.SProfile:
ScriptClass

Public Member Functions

override void Initialise (SScript runtime, object wrapper)
 
void Authorize (Closure onAuthorized=null, Closure onRejected=null)
 Requests access to profile functions, must be called prior to attempting to access profile. As soon as the player has accepted the request, the Authorized attribute will be 'true'.
 
void Authorize (Action onAuthorized=null, Action onRejected=null)
 Requests access to profile functions, must be called prior to attempting to access profile. As soon as the player has accepted the request, the Authorized attribute will be 'true'.
 
void LoadProfile (Action< SUserProfile > onFinished)
 
void LoadProfile (Closure onFinished)
 Load the profile of player.
 
- Public Member Functions inherited from ScriptClass
void ReportError (string error, bool fatal, UnityEngine.Object target=null)
 
void Initialise (SScript runtime, object wrapper)
 

Public Attributes

SUserProfile ActivePlayerProfile
 

Properties

bool Authorized [get]
 
- Properties inherited from ScriptClass
virtual bool Alive [get]
 
DynValue CachedData [get, set]
 

Additional Inherited Members

- Protected Member Functions inherited from ScriptClass
void Initialise (SScript runtime)
 

Member Function Documentation

◆ Authorize() [1/2]

void SineSpace.Scripting.Player.SProfile.Authorize ( Action onAuthorized = null,
Action onRejected = null )

Requests access to profile functions, must be called prior to attempting to access profile. As soon as the player has accepted the request, the Authorized attribute will be 'true'.

local profile=Space.Profile
function Au()
profile.Authorize()
Space.Log(profile.Authorized)
end
void Authorize(Closure onAuthorized=null, Closure onRejected=null)
Requests access to profile functions, must be called prior to attempting to access profile....
Definition SProfile.cs:36
bool Authorized
Definition SProfile.cs:16
Parameters
onAuthorizedThe onAuthorized c# action.
onRejectedThe onRejected c# action.

◆ Authorize() [2/2]

void SineSpace.Scripting.Player.SProfile.Authorize ( Closure onAuthorized = null,
Closure onRejected = null )

Requests access to profile functions, must be called prior to attempting to access profile. As soon as the player has accepted the request, the Authorized attribute will be 'true'.

local profile=Space.Profile
Space.Log(profile.Authorized)
Parameters
onAuthorizedThe onAuthorized lua callback.
onRejectedThe onRejected lua callback.

◆ Initialise()

override void SineSpace.Scripting.Player.SProfile.Initialise ( SScript runtime,
object wrapper )

◆ LoadProfile() [1/2]

void SineSpace.Scripting.Player.SProfile.LoadProfile ( Action< SUserProfile > onFinished)

◆ LoadProfile() [2/2]

void SineSpace.Scripting.Player.SProfile.LoadProfile ( Closure onFinished)

Load the profile of player.

local profile=Space.Profile
profile.Authorize()
function Load()
profile.LoadProfile(function ()
local soProfile=profile.ActivePlayerProfile
Space.Log(soProfile.UserName)
end)
end <br>
SUserProfile ActivePlayerProfile
Definition SProfile.cs:18
void LoadProfile(Action< SUserProfile > onFinished)
Definition SProfile.cs:110

Member Data Documentation

◆ ActivePlayerProfile

SUserProfile SineSpace.Scripting.Player.SProfile.ActivePlayerProfile

Property Documentation

◆ Authorized

bool SineSpace.Scripting.Player.SProfile.Authorized
get