# Default Attributes

### DefaultScriptAttribute Class

Tags a class to be the default selection for this script project.

### Syntax

\[System.AttributeUsage(System.AttributeTargets.Class)]\
public class **DefaultScriptAttribute** : [Attribute](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Attribute)

### Member Details

#### DefaultScriptAttribute Constructor

> Documentation for this section has not yet been entered.
>
> #### Syntax
>
> public **DefaultScriptAttribute** ()
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Script\
> **Assembly:** Sansar.Script (in Sansar.Script.dll)\
> **Assembly Versions:** 1.0.0.0
>
> ***

### DefaultValueAttribute Class

Set a default value to show in the script properties field.

### Syntax

\[System.AttributeUsage(System.AttributeTargets.Field)]\
public class **DefaultValueAttribute** : [Attribute](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Attribute)

### Member Details

#### DefaultValueAttribute Constructor

> Set a default bool value to show in the script properties for this field. Without the DefaultValue attribute bools default to 'false'.
>
> #### Syntax
>
> public **DefaultValueAttribute** ([bool](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean) value)
>
> **Parameters**
>
> > *value*
> >
> > The default boolvalue to show in script properties.
>
> #### Remarks
>
> #### Example

<table data-header-hidden><thead><tr><th></th></tr></thead><tbody><tr><td><strong>C# Example</strong></td></tr><tr><td><pre><code>            [DefaultValue(true)]
</code></pre></td></tr></tbody></table>

```
        public bool MyBool;
        
```

|

> #### Requirements
>
> **Namespace:** Sansar.Script\
> **Assembly:** Sansar.Script (in Sansar.Script.dll)\
> **Assembly Versions:** 1.0.0.0
>
> ***

#### DefaultValueAttribute Constructor

> Set a default byte value to show in the script properties for this field. Without the DefaultValue attribute bytes default to 0.
>
> #### Syntax
>
> public **DefaultValueAttribute** ([byte](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Byte) value)
>
> **Parameters**
>
> > *value*
> >
> > The default byte value to show in script properties.
>
> #### Remarks
>
> #### Example

<table data-header-hidden><thead><tr><th></th></tr></thead><tbody><tr><td><strong>C# Example</strong></td></tr><tr><td><pre><code>            [DefaultValue(0x00C9)]
</code></pre></td></tr></tbody></table>

```
        public byte MyField;
        
```

|

> #### Requirements
>
> **Namespace:** Sansar.Script\
> **Assembly:** Sansar.Script (in Sansar.Script.dll)\
> **Assembly Versions:** 1.0.0.0
>
> ***

#### DefaultValueAttribute Constructor

> Set a default double value to show in the script properties for this field. Without the DefaultValue attribute doubles default to 0.0.
>
> #### Syntax
>
> public **DefaultValueAttribute** ([double](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Double) value)
>
> **Parameters**
>
> > *value*
> >
> > The default double value to show in script properties.
>
> #### Remarks
>
> #### Example

<table data-header-hidden><thead><tr><th></th></tr></thead><tbody><tr><td><strong>C# Example</strong></td></tr><tr><td><pre><code>            [DefaultValue(12.34)]
</code></pre></td></tr></tbody></table>

```
        public double MyField;
        
```

|

> #### Requirements
>
> **Namespace:** Sansar.Script\
> **Assembly:** Sansar.Script (in Sansar.Script.dll)\
> **Assembly Versions:** 1.0.0.0
>
> ***

#### DefaultValueAttribute Constructor

> Set a default double value to show in the script properties for this field. Without the DefaultValue attribute doubles default to 0.0.
>
> #### Syntax
>
> public **DefaultValueAttribute** (**params** [double](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Double)\[] value)
>
> **Parameters**
>
> > *value*
> >
> > The default double value to show in script properties.
>
> #### Remarks
>
> #### Example

<table data-header-hidden><thead><tr><th></th></tr></thead><tbody><tr><td><strong>C# Example</strong></td></tr><tr><td><pre><code>            [DefaultValue(1.3, 2.4, 3.5)]
</code></pre></td></tr></tbody></table>

```
        public Vector MyField;
        
```

|

> #### Requirements
>
> **Namespace:** Sansar.Script\
> **Assembly:** Sansar.Script (in Sansar.Script.dll)\
> **Assembly Versions:** 1.0.0.0
>
> ***

#### DefaultValueAttribute Constructor

> Set a default short value to show in the script properties for this field. Without the DefaultValue attribute shorts default to 0.
>
> #### Syntax
>
> public **DefaultValueAttribute** ([short](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Int16) value)
>
> **Parameters**
>
> > *value*
> >
> > The default short value to show in script properties.
>
> #### Remarks
>
> #### Example

<table data-header-hidden><thead><tr><th></th></tr></thead><tbody><tr><td><strong>C# Example</strong></td></tr><tr><td><pre><code>            [DefaultValue(123)]
</code></pre></td></tr></tbody></table>

```
        public short MyField;
        
```

|

> #### Requirements
>
> **Namespace:** Sansar.Script\
> **Assembly:** Sansar.Script (in Sansar.Script.dll)\
> **Assembly Versions:** 1.0.0.0
>
> ***

#### DefaultValueAttribute Constructor

> Set a default int value to show in the script properties for this field. Without the DefaultValue attribute ints default to 0.
>
> #### Syntax
>
> public **DefaultValueAttribute** ([int](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Int32) value)
>
> **Parameters**
>
> > *value*
> >
> > The default int value to show in script properties.
>
> #### Remarks
>
> #### Example

<table data-header-hidden><thead><tr><th></th></tr></thead><tbody><tr><td><strong>C# Example</strong></td></tr><tr><td><pre><code>            [DefaultValue(123)]
</code></pre></td></tr></tbody></table>

```
        public int MyField;
        
```

|

> #### Requirements
>
> **Namespace:** Sansar.Script\
> **Assembly:** Sansar.Script (in Sansar.Script.dll)\
> **Assembly Versions:** 1.0.0.0
>
> ***

#### DefaultValueAttribute Constructor

> Set a default long value to show in the script properties for this field. Without the DefaultValue attribute longs default to 0.
>
> #### Syntax
>
> public **DefaultValueAttribute** ([long](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Int64) value)
>
> **Parameters**
>
> > *value*
> >
> > The default long value to show in script properties.
>
> #### Remarks
>
> #### Example

<table data-header-hidden><thead><tr><th></th></tr></thead><tbody><tr><td><strong>C# Example</strong></td></tr><tr><td><pre><code>            [DefaultValue(123)]
</code></pre></td></tr></tbody></table>

```
        public long MyField;
        
```

|

> #### Requirements
>
> **Namespace:** Sansar.Script\
> **Assembly:** Sansar.Script (in Sansar.Script.dll)\
> **Assembly Versions:** 1.0.0.0
>
> ***

#### DefaultValueAttribute Constructor

> Set a default float value to show in the script properties for this field. Without the DefaultValue attribute floats default to 0.0.
>
> #### Syntax
>
> public **DefaultValueAttribute** ([float](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Single) value)
>
> **Parameters**
>
> > *value*
> >
> > The default float value to show in script properties.
>
> #### Remarks
>
> #### Example

<table data-header-hidden><thead><tr><th></th></tr></thead><tbody><tr><td><strong>C# Example</strong></td></tr><tr><td><pre><code>            [DefaultValue(12.34)]
</code></pre></td></tr></tbody></table>

```
        public float MyField;
        
```

|

> #### Requirements
>
> **Namespace:** Sansar.Script\
> **Assembly:** Sansar.Script (in Sansar.Script.dll)\
> **Assembly Versions:** 1.0.0.0
>
> ***

#### DefaultValueAttribute Constructor

> Set a default string value to show in the script properties for this field. Without the DefaultValue attribute strings default to an empty string.
>
> #### Syntax
>
> public **DefaultValueAttribute** ([string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) value)
>
> **Parameters**
>
> > *value*
> >
> > The default value in string form for strings, quaternions and vector fields.
>
> #### Remarks
>
> #### Example

<table data-header-hidden><thead><tr><th></th></tr></thead><tbody><tr><td><strong>C# Example</strong></td></tr><tr><td><pre><code>             [DefaultValue("Default Event")]
</code></pre></td></tr></tbody></table>

```
         public string MyString = null;
     [DefaultValue("&#x26;lt;1.2,3.4,5.6&#x26;gt;")]         public Sansar.Vector MyVector;                 [DefaultValue("[1.2,3.4,5.6,7.8]")]         public Sansar.Quaternion MyQuaternion;                  [DefaultValue("(1.2,3.4,5.6,7.8)")]         public Sansar.Quaternion MyQuaternion;        &#x3C;/pre>&#x3C;/td>&#x3C;/tr>&#x3C;/tbody>&#x3C;/table>
```

Requirements **Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0**

Have more questions? |

### DisplayNameAttribute Class

Set the name to be shown in script properties for this field.

### Syntax

\[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Field)]\
public class **DisplayNameAttribute** : [Attribute](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Attribute)

### Member Details

#### DisplayNameAttribute Constructor

> Set the name to be shown in script properties for this field.
>
> #### Syntax
>
> public **DisplayNameAttribute** ([string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) name)
>
> **Parameters**
>
> > *name*
>
> #### Remarks
>
> #### Example

<table data-header-hidden><thead><tr><th></th></tr></thead><tbody><tr><td><strong>C# Example</strong></td></tr><tr><td><pre><code>            [DisplayName("")]
</code></pre></td></tr></tbody></table>

```
        public float namedFloat;
        
```

|

> #### Requirements
>
> **Namespace:** Sansar.Script\
> **Assembly:** Sansar.Script (in Sansar.Script.dll)\
> **Assembly Versions:** 1.0.0.0
>
> ***

***
