Terra Studio Wiki
  • Home
  • Scripting in Terra Studio Pro
    • Scripting Basics
    • Key Differences - T# versus C#
      • Syntax Differences - T# v/s C#
      • Multiplayer Support Differences
      • Restrictions on Unity APIs
      • Restrictions on Collections & Types
      • Restrictions on Input, UI, Async
      • Miscellaneous Restrictions
    • Creating & Using Scripts
    • ๐Ÿ“˜ Terra Studio Runtime Classes
    • ๐ŸŽจ Terra Studio UI Systems Overview
    • Animation Support
    • ๐ŸŽง Audio & SFX Support in Terra Studio
    • ๐Ÿ”ฅ VFX Support in Terra Studio
    • ๐Ÿ“Š Game Analytics & FTUE Tracking in Terra Studio
    • ๐ŸŒ Multiplayer in Terra Studio
Powered by GitBook
On this page
  • ๐Ÿงพ 1. Syntax Differences
  • ๐ŸŒ 2. Multiplayer Scripting
  • ๐Ÿ”Œ 3. Unity API Restrictions
  • ๐Ÿงฑ 4. Restrictions on Collections & Types
  • ๐ŸŽฎ 5. Input, UI & Miscellaneous Restrictions
  1. Scripting in Terra Studio Pro

Key Differences - T# versus C#

This page lists everything that is currently not supported in T#

PreviousScripting BasicsNextSyntax Differences - T# v/s C#

Last updated 2 months ago

While T# is designed to feel instantly familiar to Unity C# developers, there are a few important differences to keep in mind. These tweaks exist to support the interpreted nature of T# and ensure smoother live editing inside Terra Studio.

Most of your Unity habits will carry over just fine โ€” but for the few edge cases, here's what you need to adjust:

๐Ÿงพ 1. Syntax Differences

T# follows Unity C# syntax closely, but some common programming patterns and language constructs are not supported due to the interpreted runtime. โœ… Supported: Start(), Update(), typed variables โŒ Not Supported: foreach, switch, enum, inline variable assignment, SerializeField, generics (GetComponent<T>()), etc.

โžก๏ธ See Full Syntax Differences in the link below โ†’


๐ŸŒ 2. Multiplayer Scripting

T# uses a different base class for networked behavior. Unity's NetworkBehaviour is replaced by TerraNetBehaviour in T#, and includes its own override methods like OnNetworkSpawn() and OnNetworkDespawn() for multiplayer object lifecycle management.

โžก๏ธ See Multiplayer Differences documentation hereโ†’


๐Ÿ”Œ 3. Unity API Restrictions

Certain Unity MonoBehaviour APIs are not available in T#, especially those involving advanced lifecycle hooks or reflection.

  • โŒ Not Supported: LateUpdate(), Invoke(), TryGetComponent(), GetComponent<T>(), OnCollisionEnter as coroutine, Start() as coroutine, and more.

  • โœ”๏ธ Workaround: Use coroutines manually (StartCoroutine()) and simulate delayed behavior with WaitForSeconds() or WaitForEndOfFrame().

โžก๏ธ See Unity API Restrictions here โ†’


๐Ÿงฑ 4. Restrictions on Collections & Types

T# does not support C# generics-based collections like List<T>, Dictionary<TKey, TValue>, or LINQ queries. Instead, use Terra-compatible containers:

  • โœ… TerraList

  • โœ… TerraDictionary

  • โŒ Avoid: storing custom scripts or structs in collections

โžก๏ธ See Collections & Types restrictions hereโ†’


๐ŸŽฎ 5. Input, UI & Miscellaneous Restrictions

Unity-specific interfaces like IPointerClickHandler, Action with more than 4 parameters, and try-catch blocks are unsupported in T#. Manual input handling and structured coroutines are your go-to alternatives. Also:

  • โŒ Vector3 boxing

  • โŒ partial classes

  • โœ… PlayerPrefs is fully supported (and integrated with Analytics)

โžก๏ธ See Input, UI & Misc Limitations โ†’

Syntax Differences - T# v/s C#
Multiplayer Support Differences
Restrictions on Unity APIs
Restrictions on Collections & Types
Restrictions on Input, UI, Async