> For the complete documentation index, see [llms.txt](https://kinematicsoup.gitbook.io/reactor/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kinematicsoup.gitbook.io/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksoptionalmethod.md).

# Class ksOptionalMethod

Namespace: [KS.Reactor.Client.Unity.Editor](/reactor/api-reference/ks.reactor.client.unity.editor.md)\
Assembly: KSUnity-Source.dll

Data for the UI about an optional method a [ksIScriptTemplate](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksiscripttemplate.md) can generate.

```csharp
public class ksOptionalMethod
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) â† [ksOptionalMethod](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksoptionalmethod.md)

#### Inherited Members

[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)), [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)), [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Constructors

### ksOptionalMethod(uint, string, bool, string) <a href="#ks_reactor_client_unity_editor_ksoptionalmethod__ctor_system_uint32_system_string_system_boolean_sys" id="ks_reactor_client_unity_editor_ksoptionalmethod__ctor_system_uint32_system_string_system_boolean_sys"></a>

Constructor

```csharp
public ksOptionalMethod(uint id, string name, bool defaultIncluded, string tooltip = "")
```

#### Parameters

`id` [uint](https://learn.microsoft.com/dotnet/api/system.uint32)

ID for the template to identify the method. Different templates can use the same ID for different methods.

`name` [string](https://learn.microsoft.com/dotnet/api/system.string)

Method name to show in the UI.

`defaultIncluded` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

Is the method included by default?

`tooltip` [string](https://learn.microsoft.com/dotnet/api/system.string)

Tooltip to display.

## Fields

### DefaultIncluded <a href="#ks_reactor_client_unity_editor_ksoptionalmethod_defaultincluded" id="ks_reactor_client_unity_editor_ksoptionalmethod_defaultincluded"></a>

Is the method included by default?

```csharp
public bool DefaultIncluded
```

#### Field Value

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### Id <a href="#ks_reactor_client_unity_editor_ksoptionalmethod_id" id="ks_reactor_client_unity_editor_ksoptionalmethod_id"></a>

ID for the template to identify the method. Different templates can use the same ID for different methods.

```csharp
public uint Id
```

#### Field Value

[uint](https://learn.microsoft.com/dotnet/api/system.uint32)

### Name <a href="#ks_reactor_client_unity_editor_ksoptionalmethod_name" id="ks_reactor_client_unity_editor_ksoptionalmethod_name"></a>

Method name to show in the UI.

```csharp
public string Name
```

#### Field Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### Tooltip <a href="#ks_reactor_client_unity_editor_ksoptionalmethod_tooltip" id="ks_reactor_client_unity_editor_ksoptionalmethod_tooltip"></a>

Tooltip

```csharp
public string Tooltip
```

#### Field Value

[string](https://learn.microsoft.com/dotnet/api/system.string)
