# longValue

> Value of an integer property as a long.

## Definition

* **Type:** Property
* **Namespace:** [UnityEditor](/engine/6000.7/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public long longValue { get; set; }
```

### Remarks

Contains a valid value when [SerializedProperty.propertyType](/engine/6000.7/script-reference/unityeditor/serializedproperty/propertytype.md) is [SerializedPropertyType.Integer](/engine/6000.7/script-reference/unityeditor/serializedpropertytype/integer.md). Most appropriate for long properties ([SerializedPropertyNumericType.Int64](/engine/6000.7/script-reference/unityeditor/serializedpropertynumerictype/int64.md)), but can be used with all integer types of 64 bits or less, although [SerializedProperty.ulongValue](/engine/6000.7/script-reference/unityeditor/serializedproperty/ulongvalue.md) is recommended for [SerializedPropertyNumericType.UInt64](/engine/6000.7/script-reference/unityeditor/serializedpropertynumerictype/uint64.md).

When assigning a value to [SerializedProperty.longValue](/engine/6000.7/script-reference/unityeditor/serializedproperty/longvalue.md), the value is clamped in the range of the property's declared type. For example, a property that is declared as a ushort is clamped between 0 and 65,535.

Additional Resources: [SerializedProperty.intValue](/engine/6000.7/script-reference/unityeditor/serializedproperty/intvalue.md), [SerializedProperty.ulongValue](/engine/6000.7/script-reference/unityeditor/serializedproperty/ulongvalue.md), [SerializedProperty.propertyType](/engine/6000.7/script-reference/unityeditor/serializedproperty/propertytype.md), [SerializedPropertyType.Integer](/engine/6000.7/script-reference/unityeditor/serializedpropertytype/integer.md).
