MeshComponent

 

 

MeshComponent Class

 

The MeshComponent handles interactions with static meshes.

 

Syntax

[Sansar.Script.Interface]
public class MeshComponent : Sansar.Script.InstanceInterface

 

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Members

See Also: Inherited members from Sansar.Script.InstanceInterface.

Public Fields

static readonly
ComponentType ComponentType . The MeshComponent.ComponentType of this component

Public Properties

[read-only]
ComponentId Sansar.Script.ComponentId . Retrieves the component id for this MeshComponent.
[read-only]
IsScriptable bool . The scriptable flag for this MeshComponent.
[read-only]
IsValid bool . Whether or not this interface is valid. (Inherited from Sansar.Script.InstanceInterface.)
[read-only]
Name string . This MeshComponent name, as specified in the editor.

Public Methods

  GetIsVisible () : bool
Retrieves the visibility state of this MeshComponent.
  SetIsVisible (bool)
Sets the visibility state of this MeshComponent.
  SetIsVisible (Sansar.Script.SessionId, bool)
Sets the visibility state of this MeshComponent.
  SetIsVisible (AgentPrivate, bool)
Sets the visibility state of this MeshComponent.
  SetIsVisible (bool, Action<Sansar.Script.OperationCompleteEvent>)
Sets the visibility state of this MeshComponent.
  SetIsVisible (Sansar.Script.SessionId, bool, Action<Sansar.Script.OperationCompleteEvent>)
Sets the visibility state of this MeshComponent.
  SetIsVisible (AgentPrivate, bool, Action<Sansar.Script.OperationCompleteEvent>)
Sets the visibility state of this MeshComponent.
override
ToString () : string
A string representation of this object.

 

Member Details

ComponentId Property

Retrieves the component id for this MeshComponent.

Syntax

[get: Sansar.Script.Interface]
public Sansar.Script.ComponentId ComponentId { get; }

Value

The id.

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

ComponentType Field

The MeshComponent.ComponentType of this component

Syntax

public static readonly ComponentType ComponentType

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

GetIsVisible Method

Retrieves the visibility state of this MeshComponent.

Syntax

[Sansar.Script.Interface]
public bool GetIsVisible ()

Returns

The visibility state.

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

IsScriptable Property

The scriptable flag for this MeshComponent.

Syntax

[get: Sansar.Script.Interface]
public bool IsScriptable { get; }

Value

Whether or not this mesh can have properties changed by script.

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Name Property

This MeshComponent name, as specified in the editor.

Syntax

[get: Sansar.Script.Interface]
public string Name { get; }

Value

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

SetIsVisible Method

Sets the visibility state of this MeshComponent.

Syntax

[Sansar.Script.Interface]
public void SetIsVisible (bool isVisible)

Parameters

isVisible
The visibility state to set.

Returns

The return value is an internal event id.

Remarks

This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

SetIsVisible Method

Sets the visibility state of this MeshComponent.

Syntax

[Sansar.Script.Interface]
public void SetIsVisible (Sansar.Script.SessionId sessionId, bool isVisible)

Parameters

sessionId
The sessionId of the user to change static mesh visibility for.
isVisible
The visibility state to set.

Remarks

It will only change static mesh visibility for a single user and will not persist across client restarts, server restarts, or leaving the scene (even for changing avatars).

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

SetIsVisible Method

Sets the visibility state of this MeshComponent.

Syntax

[Sansar.Script.Interface]
public void SetIsVisible (AgentPrivate agent, bool isVisible)

Parameters

agent
The agent to change static mesh visibility for.
isVisible
The visibility state to set.

Remarks

It will only change static mesh visibility for a single user and will not persist across client restarts, server restarts, or leaving the scene (even for changing avatars).

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

SetIsVisible Method

Sets the visibility state of this MeshComponent.

Syntax

[Sansar.Script.Interface]
public void SetIsVisible (bool isVisible, Action<Sansar.Script.OperationCompleteEvent> handler)

Parameters

isVisible
The visibility state to set.
handler
Handler to be called when the event completes.

Returns

The return value is an internal event id.

Remarks

This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

SetIsVisible Method

Sets the visibility state of this MeshComponent.

Syntax

[Sansar.Script.Interface]
public void SetIsVisible (Sansar.Script.SessionId sessionId, bool isVisible, Action<Sansar.Script.OperationCompleteEvent> handler)

Parameters

sessionId
The sessionId of the user to change static mesh visibility for.
isVisible
The visibility state to set.
handler
Handler to be called when the event completes.

Remarks

It will only change static mesh visibility for a single user and will not persist across client restarts, server restarts, or leaving the scene (even for changing avatars).

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

SetIsVisible Method

Sets the visibility state of this MeshComponent.

Syntax

[Sansar.Script.Interface]
public void SetIsVisible (AgentPrivate agent, bool isVisible, Action<Sansar.Script.OperationCompleteEvent> handler)

Parameters

agent
The agent to change static mesh visibility for.
isVisible
The visibility state to set.
handler
Handler to be called when the event completes.

Remarks

It will only change static mesh visibility for a single user and will not persist across client restarts, server restarts, or leaving the scene (even for changing avatars).

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

ToString Method

A string representation of this object.

Syntax

[Sansar.Script.Interface]
public override string ToString ()

Returns

A string representation of this object.

Remarks

The format of this string may change between releases.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

 


 

 

Was this article helpful?
0 out of 1 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.