Sinespace Client  2023.2.17543
Client-side scripting for Sinespace
SineSpace.Scripting.Components.STrailRenderer Class Reference
Inheritance diagram for SineSpace.Scripting.Components.STrailRenderer:
ScriptClassComponent< TrailRenderer >

Public Member Functions

void Clear ()
 Removes all points from the TrailRenderer. Useful for restarting a trail from a new position. More...
 
SVector GetPosition (int index)
 Get the position of a vertex in the trail. More...
 

Properties

bool Enabled [get, set]
 Whether the trailRender component is enabled or not More...
 
bool ReceiveShadows [get, set]
 Does this object receive shadows? More...
 
bool IsVisible [get]
 Is this renderer visible in any camera? More...
 
bool CastShadows [get, set]
 Does this object cast shadows? More...
 
bool MotionVectors [get, set]
 Does the mode specifie for motion vector rendering. More...
 
bool UseLightProbes [get, set]
 Does this object use light probes More...
 
float Time [get, set]
 How long does the trail take to fade out. More...
 
float StartWidth [get, set]
 The width of the trail at the spawning point. More...
 
float EndWidth [get, set]
 The width of the trail at the end of the trail. More...
 
float WidthMultiplier [get, set]
 Set an overall multiplier that is applied to the TrailRenderer.WidthCurve to get the final width of the trail. More...
 
SColor StartColor [get, set]
 Set the color at the start of the trail. More...
 
SColor EndColor [get, set]
 Set the color at the end of the trail. More...
 
bool Autodestruct [get, set]
 Does the GameObject of this Trail Renderer auto destruct? More...
 
int NumCornerVertices [get, set]
 Set this to a value greater than 0, to get rounded corners between each segment of the trail. More...
 
int NumCapVertices [get, set]
 Set this to a value greater than 0, to get rounded corners on each end of the trail More...
 
float MinVertexDistance [get, set]
 Set the minimum distance the trail can travel before a new vertex is added to it. More...
 
int TextureMode [get, set]
 Return the correspond value of the texturemode More...
 
int Alignment [get, set]
 Select whether the trail will face the camera, or the orientation of the Transform component. More...
 
int PositionCount [get]
 Get the number of line segments in the trail. More...
 
- Properties inherited from ScriptClassComponent< TrailRenderer >
SGameObject GameObject [get]
 Return the GameObject which component added. More...
 

Member Function Documentation

◆ Clear()

void SineSpace.Scripting.Components.STrailRenderer.Clear ( )

Removes all points from the TrailRenderer. Useful for restarting a trail from a new position.

local trail=thisObject.Children[0].TrailRenderer
function Clear()
trail.Clear()
end

◆ GetPosition()

SVector SineSpace.Scripting.Components.STrailRenderer.GetPosition ( int  index)

Get the position of a vertex in the trail.

local trail=Space.Host.GetReference("Trail").TrailRenderer
Space.Log(trail.GetPosition(0))
Parameters
indexThe index of the position to retrieve.
Returns
The position at the specified index in the array.

Property Documentation

◆ Alignment

int SineSpace.Scripting.Components.STrailRenderer.Alignment
getset

Select whether the trail will face the camera, or the orientation of the Transform component.

local trail=Space.Host.GetReference("Trail").TrailRenderer
Space.Log(trail.Alignment)

◆ Autodestruct

bool SineSpace.Scripting.Components.STrailRenderer.Autodestruct
getset

Does the GameObject of this Trail Renderer auto destruct?

local trail=Space.Host.GetReference("Trail").TrailRenderer
Space.Log(trail.NumCornerVertices)

◆ CastShadows

bool SineSpace.Scripting.Components.STrailRenderer.CastShadows
getset

Does this object cast shadows?

local trail=thisObject.Children[0].TrailRenderer
Space.Log(trail.CastShadows)

◆ Enabled

bool SineSpace.Scripting.Components.STrailRenderer.Enabled
getset

Whether the trailRender component is enabled or not

local trail=thisObject.Children[0].TrailRenderer
Space.Log(trail.Enabled)

◆ EndColor

SColor SineSpace.Scripting.Components.STrailRenderer.EndColor
getset

Set the color at the end of the trail.

local trail=Space.Host.GetReference("Trail").TrailRenderer
Space.Log(trail.EndColor)

◆ EndWidth

float SineSpace.Scripting.Components.STrailRenderer.EndWidth
getset

The width of the trail at the end of the trail.

local trail=thisObject.Children[0].TrailRenderer
Space.Log(trail.EndWidth)

◆ IsVisible

bool SineSpace.Scripting.Components.STrailRenderer.IsVisible
get

Is this renderer visible in any camera?

local trail=thisObject.Children[0].TrailRenderer
Space.Log(trail.IsVisible)

◆ MinVertexDistance

float SineSpace.Scripting.Components.STrailRenderer.MinVertexDistance
getset

Set the minimum distance the trail can travel before a new vertex is added to it.

local trail=Space.Host.GetReference("Trail").TrailRenderer
Space.Log(trail.MinVertexDistance)

◆ MotionVectors

bool SineSpace.Scripting.Components.STrailRenderer.MotionVectors
getset

Does the mode specifie for motion vector rendering.

local trail=thisObject.Children[0].TrailRenderer
Space.Log(trail.MotionVectors)

◆ NumCapVertices

int SineSpace.Scripting.Components.STrailRenderer.NumCapVertices
getset

Set this to a value greater than 0, to get rounded corners on each end of the trail

local trail=Space.Host.GetReference("Trail").TrailRenderer
Space.Log(trail.NumCapVertices)

◆ NumCornerVertices

int SineSpace.Scripting.Components.STrailRenderer.NumCornerVertices
getset

Set this to a value greater than 0, to get rounded corners between each segment of the trail.

local trail=Space.Host.GetReference("Trail").TrailRenderer
Space.Log(trail.NumCornerVertices)

◆ PositionCount

int SineSpace.Scripting.Components.STrailRenderer.PositionCount
get

Get the number of line segments in the trail.

local trail=Space.Host.GetReference("Trail").TrailRenderer
Space.Log(trail.PositionCount)

◆ ReceiveShadows

bool SineSpace.Scripting.Components.STrailRenderer.ReceiveShadows
getset

Does this object receive shadows?

local trail=thisObject.Children[0].TrailRenderer
Space.Log(trail.ReceiveShadows)

◆ StartColor

SColor SineSpace.Scripting.Components.STrailRenderer.StartColor
getset

Set the color at the start of the trail.

local trail=thisObject.Children[0].TrailRenderer
Space.Log(trail.StartColor)

◆ StartWidth

float SineSpace.Scripting.Components.STrailRenderer.StartWidth
getset

The width of the trail at the spawning point.

local trail=thisObject.Children[0].TrailRenderer
Space.Log(trail.StartWidth)

◆ TextureMode

int SineSpace.Scripting.Components.STrailRenderer.TextureMode
getset

Return the correspond value of the texturemode

local trail=Space.Host.GetReference("Trail").TrailRenderer
Space.Log(trail.TextureMode)

◆ Time

float SineSpace.Scripting.Components.STrailRenderer.Time
getset

How long does the trail take to fade out.

local trail=thisObject.Children[0].TrailRenderer
Space.Log(trail.Time)

◆ UseLightProbes

bool SineSpace.Scripting.Components.STrailRenderer.UseLightProbes
getset

Does this object use light probes

local trail=thisObject.Children[0].TrailRenderer
Space.Log(trail.UseLightProbes)

◆ WidthMultiplier

float SineSpace.Scripting.Components.STrailRenderer.WidthMultiplier
getset

Set an overall multiplier that is applied to the TrailRenderer.WidthCurve to get the final width of the trail.

local trail=thisObject.Children[0].TrailRenderer
Space.Log(trail.WidthMultiplier)
SineSpace.Scripting.Components.STrailRenderer.Clear
void Clear()
Removes all points from the TrailRenderer. Useful for restarting a trail from a new position.
Definition: STrailRenderer.cs:167