Line 2: | Line 2: | ||
=Public Member Functions= | =Public Member Functions= | ||
− | {{ScriptFunction|void|GetEnabledUserRegions|(Closure onComplete);|Gets an SUserRegions object which contains data about the user's regions (the information in the " | + | {{ScriptFunction|void|GetEnabledUserRegions|(Closure onComplete);|Gets an SUserRegions object which contains data about the user's regions (the information in the "Region List" window).|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|void|GetRegionTexture|(SPublicRegion region, Closure onComplete);|Returns the | + | {{ScriptFunction|void|GetRegionTexture|(SPublicRegion region, Closure onComplete);|Returns the Region Texture (the image seen while loading the region) as a resource. This function requires an SPublicRegion object to identify which region. (white-label grids only)|5=<pre>Space.Grid.GetRegionTexture(AnSPublicRegionObject,OnCompleteFunction)</pre>|6=<pre>--When this object is clicked, it's material becomes the Region Texture of the user's first region |
− | {{ScriptFunction|void|GetRegionTexture|(string json, Closure onComplete);|Returns the | + | thisObject = Space.Host.ExecutingObject |
+ | |||
+ | function GetTextureComplete(textureResource) | ||
+ | thisObject.Renderer.Material.SetTexture("_MainTex",textureResource) | ||
+ | end | ||
+ | |||
+ | function GetUserRegionsComplete(SUserRegions) | ||
+ | r = SUserRegions.AvailableRegions | ||
+ | Space.Grid.GetRegionTexture(r[1],GetTextureComplete) | ||
+ | end | ||
+ | |||
+ | Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)</pre>}} | ||
+ | |||
+ | {{ScriptFunction|void|GetRegionTexture|(string json, Closure onComplete);|Returns the Region Texture (the image seen while loading the region) as a resource. This function requires a string to identify which region. |5=<pre></pre>|6=<pre></pre>}} | ||
{{ScriptFunction|void|GetOutfits|(Closure onComplete);|Gets the Grid's outfits as a table of SOutfit which contain Outfit data. |5=<pre></pre>|6=<pre></pre>}} | {{ScriptFunction|void|GetOutfits|(Closure onComplete);|Gets the Grid's outfits as a table of SOutfit which contain Outfit data. |5=<pre></pre>|6=<pre></pre>}} |
Gets an SUserRegions object which contains data about the user's regions (the information in the "Region List" window).
Returns the Region Texture (the image seen while loading the region) as a resource. This function requires an SPublicRegion object to identify which region. (white-label grids only)
Space.Grid.GetRegionTexture(AnSPublicRegionObject,OnCompleteFunction)
--When this object is clicked, it's material becomes the Region Texture of the user's first region thisObject = Space.Host.ExecutingObject function GetTextureComplete(textureResource) thisObject.Renderer.Material.SetTexture("_MainTex",textureResource) end function GetUserRegionsComplete(SUserRegions) r = SUserRegions.AvailableRegions Space.Grid.GetRegionTexture(r[1],GetTextureComplete) end Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)
Returns the Region Texture (the image seen while loading the region) as a resource. This function requires a string to identify which region.
Gets the Grid's outfits as a table of SOutfit which contain Outfit data.
Returns the Region ID of the Orientation Region
orientationRegion = Space.Grid.OrientationRegion
Returns true if this Grid is a white-label Grid.
isWhiteLabel = Space.Grid.IsWhiteLabel
Returns true if this player's Grid role is Admin.(white-label grid only)
isAdmin = Space.Grid.PlayerIsAdmin
Returns true if this player's Grid role is Moderator. (white-label grid only)
isModerator = Space.Grid.PlayerIsModerator
Returns true if this player's Grid role is Developer.(white-label grid only)
isDeveloper = Space.Grid.PlayerIsDeveloper
Returns true if this player's Grid role is Trusted.(white-label grid only)
isTrusted = Space.Grid.PlayerIsTrusted
Returns the Grid's Name. (white-label grid only)
gridName = Space.Grid.Name
Returns the Grid's Site URL. (white-label grid only)
siteUrl = Space.Grid.SiteURL
Returns the Region ID of the Default Region. (white-label grid only)
defaultRegion = Space.Grid.DefaultRegion
Returns the IDs of all Avatars in the grid. (white-label grid only)
avatars = Space.Grid.Avatars
|