Class CesiumTilesetScript
- Namespace
- LibreRally
- Assembly
- LibreRally.dll
Streams a Cesium 3D Tiles dataset into a Stride scene using the Cesium Native .NET bindings.
[ComponentCategory("LibreRally")]
public class CesiumTilesetScript : SyncScript, IIdentifiable, ICollectorHolder
- Inheritance
-
SyncScriptCesiumTilesetScript
- Implements
-
IIdentifiableICollectorHolder
- Inherited Members
Remarks
This is intentionally code-first and scene-runtime driven so LibreRally can host Cesium content without relying on Unity editor extensions or plugin workflows.
Properties
AutoFrameOnInitialTile
Gets or sets a value indicating whether the runtime may reposition the startup camera to frame the first committed tile.
public bool AutoFrameOnInitialTile { get; set; }
Property Value
DataSource
Gets or sets the tileset source type.
public CesiumTilesetDataSource DataSource { get; set; }
Property Value
EnablePhysicsProxyColliders
Gets or sets a value indicating whether nearby streamed tiles create coarse static collision proxies.
public bool EnablePhysicsProxyColliders { get; set; }
Property Value
Remarks
This MVP path keeps physics local and cheap by using axis-aligned box colliders derived from tile bounds instead of attempting full-fidelity globe-scale terrain collision.
GeoreferenceEntity
Gets or sets an explicit entity that owns the georeference component used by this tileset.
public Entity? GeoreferenceEntity { get; set; }
Property Value
IonAccessToken
Gets or sets the Cesium ion access token used when loading ion assets.
public string IonAccessToken { get; set; }
Property Value
IonAssetId
Gets or sets the Cesium ion asset ID to load when DataSource is CesiumIon.
public long IonAssetId { get; set; }
Property Value
LocalFilePath
Gets or sets the local tileset.json file path used when DataSource is LocalFile.
public string LocalFilePath { get; set; }
Property Value
MaximumCachedBytes
Gets or sets the maximum number of bytes Cesium Native may keep cached.
public long MaximumCachedBytes { get; set; }
Property Value
MaximumPhysicsProxyBoxesPerTile
Gets or sets the maximum number of per-tile box colliders retained before collapsing to one merged tile proxy.
public int MaximumPhysicsProxyBoxesPerTile { get; set; }
Property Value
MaximumScreenSpaceError
Gets or sets the maximum screen-space error passed to Cesium Native tile selection.
public float MaximumScreenSpaceError { get; set; }
Property Value
MaximumSimultaneousTileLoads
Gets or sets the maximum number of simultaneous tile loads.
public uint MaximumSimultaneousTileLoads { get; set; }
Property Value
OriginHeightMeters
Gets or sets the ellipsoid height in meters used when no CesiumGeoreferenceComponent is attached.
public double OriginHeightMeters { get; set; }
Property Value
OriginLatitudeDegrees
Gets or sets the georeference latitude in degrees used when no CesiumGeoreferenceComponent is attached.
public double OriginLatitudeDegrees { get; set; }
Property Value
OriginLongitudeDegrees
Gets or sets the georeference longitude in degrees used when no CesiumGeoreferenceComponent is attached.
public double OriginLongitudeDegrees { get; set; }
Property Value
PhysicsFrictionCoefficient
Gets or sets the friction coefficient applied to Cesium tile physics proxies.
public float PhysicsFrictionCoefficient { get; set; }
Property Value
PhysicsProxyActivationDistance
Gets or sets the maximum local-space distance from the active camera at which tile physics proxies stay enabled.
public float PhysicsProxyActivationDistance { get; set; }
Property Value
PhysicsSurfaceType
Gets or sets the default tyre surface type assigned to Cesium collision meshes.
public SurfaceType PhysicsSurfaceType { get; set; }
Property Value
PreferEntityGeoreference
Gets or sets a value indicating whether an attached or referenced georeference component should override the origin properties.
public bool PreferEntityGeoreference { get; set; }
Property Value
Url
Gets or sets the source URL for a public or local tileset.json.
public string Url { get; set; }
Property Value
UseAccuratePhysicsMeshes
Gets or sets a value indicating whether nearby streamed tiles should use mesh-based colliders instead of coarse bounds.
public bool UseAccuratePhysicsMeshes { get; set; }
Property Value
UserAgent
Gets or sets the user agent sent by the Cesium asset accessor.
public string UserAgent { get; set; }
Property Value
Methods
Cancel()
Cancels the tileset runtime and releases native and graphics resources.
public override void Cancel()
Start()
Initializes the Cesium Native runtime and begins loading the configured tileset.
public override void Start()
Exceptions
- InvalidOperationException
Thrown when the active scene has no camera or when the configured dataset source is invalid.
Update()
Advances Cesium Native background work, updates view-dependent selection, and applies tile removals.
public override void Update()