π Terra Studio Runtime Classes
List of the properties, events and methods wrappers available for each class in Terra Studio Pro
πΊοΈ TerraScene Class
The TerraScene
class provides scene management utilities that let you load, unload, and interact with game scenes and related assets. It also includes game-ready event hooks for initializing gameplay and UI.
β
Methods in TerraScene
TerraScene.IsSceneDownloaded(string sceneName)
Returnstrue
if the specified scene has been downloaded.TerraScene.LoadScene(string sceneName)
Loads the specified scene.TerraScene.MoveGameObjectToScene(GameObject obj, Scene scene)
Moves a given GameObject into a specified scene.TerraScene.ShowLeaderboard()
Displays the leaderboard UI.TerraScene.SetScore(int score)
Sets the current player's score.
π‘ Events in TerraScene
TerraScene.OnSceneLoaded
Invoked when a scene has finished loading. Callback signature:(Scene scene)
TerraScene.OnGameReady
Invoked when the main game scene is fully ready.TerraScene.OnTextureReady
Invoked when all textures in the scene are ready for rendering.
π§ͺ Usage Example - TerraScene
π οΈ TerraHelper Class
The TerraHelper
class provides utility functions that assist with common gameplay, device, and feedback operations.
β
Methods in TerraHelper
TerraHelper.GetCurrentDateTime()
Returns the current UTC time as aDateTime
object.TerraHelper.FindDeepChild(Transform parent, string childName)
Recursively searches for a deeply nested child by name.TerraHelper.GetDeviceQuality()
Returns aDeviceQuality
enum indicating device capability (e.g.,Low
,Medium
,High
).TerraHelper.TriggerHapticPresets(HapticPreset preset)
Triggers predefined haptic feedback patterns.
π§ͺ Usage Example - TerraHelper
π§ TerraCharacter Class
The TerraCharacter
class provides access to the local playerβs character and profile data, such as their username, selected avatar icon, and gender. This is especially useful for personalizing the in-game experience or populating UI elements with player-specific information.
β
Methods in TerraCharacter
TerraCharacter.GetMyPlayerName()
Returns the playerβs username as astring
.TerraCharacter.GetMyPlayerIcon()
Returns the playerβs avatar icon as aSprite
.TerraCharacter.GetMyAvatarGender()
Returns the playerβs selected gender as astring
. (e.g.,"Male"
,"Female"
, depending on the profile setup)
π§ͺ Usage Example - TerraCharacter
Last updated