Optic Asset Reference
The optic asset is the data definition for every visual aiming attachment in Unturned™ -- scopes, red dot sights, holographic sights, nightvision optics, and every other sighting device that modifies the player's view when aiming down sights. The optic asset type, defined in the ItemOpticAsset class, inherits directly from ItemAsset and serves as the foundational layer for the entire sight attachment system. A properly configured optic asset controls magnification level, third-person zoom factor, scope overlay rendering, holographic reticle display, nightvision lighting effects, and the AimAlignment transform that positions the camera during ADS.
This article is the 57 Studios™ canonical reference for the optic asset type. It covers every .dat field specific to the optic asset subclass, the distinction between ItemOpticAsset and the newer ItemSightAsset class, the Zoom multiplicative system, the AimAlignment transform hierarchy, the DistanceMarkers system for bullet-drop compensation, nightvision configuration, scope overlay behavior, and the Hook_Sight placement conventions that every gun mod must observe for visual attachment seating. The shared fields that appear on every item asset (ID, GUID, Rarity, Slot, Size_X, Size_Y) are documented in Item Asset Anatomy; this article focuses on the fields unique to the optic subclass and the sight attachment system that extends it.

Documentation source: This article references Chapters 54 and 60 of the official Smartly Dressed Games modding documentation for field definitions and game behavior. Community-validated notes from the 57 Studios™ cohort are marked where the official documentation is silent on a specific interaction or default value.
Who this article is for
This article is written for Unturned™ mod authors who are creating or modifying optic and sight attachment items. You should be familiar with the item asset folder structure, the .dat file format, the master bundle pipeline, and the basic concept of hook GameObjects on weapon prefabs. If you are new to Unturned™ modding, begin with Project Folder Structure and GUIDs and Gun Mod Tutorial before returning here. Modders who have already authored a grip or barrel attachment will recognize the shared identity-field pattern and the caliber-compatibility mechanism.
What you will learn
- The class hierarchy for optic assets and how
ItemOpticAssetrelates to the newerItemSightAssetclass. - Every
.datfield unique to optic assets, with type, default value, valid values, and purpose. - How the Zoom multiplicative system works and how
ThirdPerson_Zoomcontrols the third-person camera separately. - The AimAlignment system: how
AimAlignment_LocalOffset,AimAlignment_Owner, andAimAlignment_Pathposition the ADS camera. - The DistanceMarkers system for configuring bullet-drop compensation marks on scope overlays.
- Nightvision configuration: the
Visionenum,Nightvision_Color, andNightvision_Fog_Intensity. - The
Zoom_Using_EyesandHolographicflags that control the scope overlay rendering path. Offset_Scope_Overlay_By_One_Texelfor pixel-perfect scope overlay alignment.- Worked
.datexamples for a red dot sight, a 4x rifle scope, a nightvision scope, and a holographic sight with distance markers. - A diagnostic table for the most common optic authoring errors.
How the optic and sight asset system works
The optic attachment system in Unturned™ is structured across two class generations. The original class, ItemOpticAsset, inherits directly from ItemAsset and provides the foundational zoom and scope-overlay mechanism. It uses the Type enum value Optic and the Useable enum value Optic. The newer class, ItemSightAsset, extends the field set significantly while maintaining backward compatibility with the existing optic system -- a sight asset authored with the ItemSightAsset field set can still be equipped into a Hook_Sight slot on any gun that accepts optic-type attachments.
Class hierarchy
As shown in the inheritance diagram above, the ItemSightAsset class carries all fields from ItemOpticAsset plus the full AimAlignment system, DistanceMarkers bullet-drop compensation, nightvision configuration, holographic rendering flags, and overlay texel offset behavior. The 57 Studios™ cohort recommends using ItemSightAsset for all new sight attachment mods and treating ItemOpticAsset as a legacy class.
Attachment slot and hook convention
Every optic or sight attachment in Unturned™ occupies the Sight attachment slot on a weapon. The weapon prefab must contain a Hook_Sight GameObject positioned at the location where the optic base mounts -- typically the top of the receiver rail or the Picatinny rail section. The relationship between the attachment .dat file and the weapon's hook GameObject is documented in Attachment Slots: Sight, Grip, Tactical, Barrel.
Gun Prefab Hierarchy (Unity)
└── WeaponRoot
└── Hook_Sight (GameObject, positioned at receiver rail top)
└── [Optic/Sight attachment prefab instantiated here at runtime]The engine performs a case-sensitive string match on the hook name. hook_sight, HookSight, and HOOK_SIGHT will all fail to resolve at runtime. Only Hook_Sight with the exact capitalization shown above is recognized by the runtime.
Caliber compatibility for sight attachments
Optic and sight attachments participate in the same caliber-compatibility system used by all attachment types. The attachment's Caliber field (a uint16 value) must match the gun's Caliber field for the attachment to equip. A value of 0 on either side makes the attachment universal -- any gun can equip it. This mechanism is identical to the system documented in Attachment Slots: Sight, Grip, Tactical, Barrel and is not re-documented exhaustively here; the key point for optic authoring is that a scope with Caliber 0 is compatible with every gun that accepts sight attachments, while a scope with Caliber 5001 is restricted to guns with the matching Caliber 5001 field.
Complete .dat field reference
Identity and shared fields
The following shared fields are required on every item asset, including optics and sights. See Item Asset Anatomy for full documentation of these fields.
| Field | Type | Example | Notes |
|---|---|---|---|
ID | uint16 | 50002 | Unique item ID. Use 50000+ range for custom Workshop mods. |
GUID | uint128 hex | 5b8c3a2e7d1f4b6a9e2c5d8a1f3b6c9e | 128-bit globally unique identifier. Generate fresh for every new item. |
Type | enum | Optic or Sight | Must be Optic for legacy ItemOpticAsset items; must be Sight for ItemSightAsset items. |
Useable | enum | Optic | Must be Optic for legacy ItemOpticAsset items. Not required on ItemSightAsset items. |
Name | string | MyScope_4x | Internal name; also the prefab lookup key in the master bundle. |
Rarity | enum | Uncommon | Rarity tier. See Rarity enum in Item Asset Anatomy. |
Slot | enum | None | Optics do not occupy a primary/secondary slot; they mount on the weapon's sight hook. |
Size_X | uint8 | 2 | Inventory grid width. Most scopes are 2 units wide. |
Size_Y | uint8 | 1 | Inventory grid height. Most scopes are 1 unit tall. |
Bypass_ID_Limit | bool | True | Required for IDs above 2000. |
Zoom fields
The Zoom system controls the magnification factor applied to the player's view when aiming down sights with the optic equipped. Unturned™ implements zoom as a multiplicative value relative to the default field of view.
| Field | Type | Required | Default | Valid values | Purpose |
|---|---|---|---|---|---|
Zoom | float32 | No | 1 | 1.0 or greater | Multiplicative zoom amount. A value of 4.0 produces 4x magnification. Values below 1.0 are not supported and may produce unexpected view behavior. |
ThirdPerson_Zoom | float32 | No | 1.25 | 1.0 or greater | Zoom factor applied when the player is in third-person view mode while ADS. Separate from the first-person Zoom value. |
Zoom_Using_Eyes | bool | No | false | true, false | When set to true, the optic uses the camera's eye transform for zoom rather than rendering through a scope overlay texture. This is the preferred setting for non-magnified optics such as red dot sights and holographic sights that should not display a scope tube overlay. |
The Zoom field is the primary magnification control. The relationship between the Zoom value and the effective field of view is inverse -- a Zoom of 4.0 means the player sees at one-quarter of the default field of view width, producing the characteristic magnification effect of a 4x rifle scope. The ThirdPerson_Zoom field is independent of the first-person Zoom: a scope with Zoom 4.0 and ThirdPerson_Zoom 1.5 provides 4x magnification in first-person but only 1.5x magnification when the camera is in third-person view.
The flowchart above illustrates the zoom decision path: the engine checks whether the sight is an ItemSightAsset, then checks the Zoom_Using_Eyes flag to decide whether to render a scope overlay or apply the zoom directly to the camera field of view. This distinction is what makes a red dot sight (no scope tube overlay, moderate zoom applied to FOV) functionally distinct from a magnified rifle scope (full scope overlay with thick tube borders, high zoom factor).
Holographic flag
| Field | Type | Required | Default | Purpose |
|---|---|---|---|---|
Holographic | flag | No | absent | When present, this sight should be rendered using the holographic rendering path rather than the standard scope overlay. The holographic path displays a projected reticle on a rectangular window surface, simulating the appearance of holographic weapon sights such as the EOTech family. |
The Holographic flag changes the visual rendering of the sight picture but does not affect any statistical property -- magnification, spread, recoil, and ballistic behavior are entirely independent of whether the holographic flag is present. The flag exists purely to match the in-game visual to the physical attachment model the player sees on the weapon.
Holographic and Zoom_Using_Eyes are independent flags. A holographic sight can use Zoom_Using_Eyes true (no scope overlay, zoom applied to FOV directly) or Zoom_Using_Eyes false (holographic reticle rendered inside a scope overlay). The cohort recommendation is to set Zoom_Using_Eyes true for holographic sights so the reticle renders cleanly against the game world without an artificial overlay border.
Nightvision system
The nightvision system enables a sight attachment to apply a lighting vision effect when the player aims down sights. The effect covers the entire screen with a color-tinted view and optional fog intensity modification, simulating the appearance of nightvision optics.
| Field | Type | Required | Default | Valid values | Purpose |
|---|---|---|---|---|---|
Vision | enum | No | None | None, Military, Civilian | The lighting vision effect type. None disables the effect. Military applies a green-tinted nightvision effect. Civilian applies a white-tinted nightvision effect. |
Nightvision_Color | color | No | See description | RGBA color value | Override the default nightvision color when Vision is set to Military. The default color for Military vision is a shade of green; specifying Nightvision_Color replaces this with a custom tint. |
Nightvision_Fog_Intensity | float32 | No | See description | Float value | Configure the intensity of fog while nightvision is active. A value of 0 removes fog entirely under nightvision. Higher values produce denser fog. The default value depends on the map's environmental fog settings. |
The Vision field is the master switch for nightvision functionality. When set to Military or Civilian, aiming down sights with the optic equipped applies the corresponding vision effect. The effect persists for the duration of ADS and reverts when the player exits ADS.
The sequence diagram above shows the activation and deactivation flow for nightvision on a sight asset. The post-processing stack applies the color override and fog intensity for the duration of the ADS state and reverts to default rendering when the player exits ADS. Note that the nightvision effect applies to the full screen during ADS, not just to the scope overlay area -- this is important for Zoom_Using_Eyes true sights where no scope overlay borders exist.
AimAlignment system
The AimAlignment system controls the precise position and orientation of the camera when the player aims down sights with the optic. It is a three-field system that defines a transform path, an ownership scope, and an optional positional offset.
| Field | Type | Required | Default | Valid values | Purpose |
|---|---|---|---|---|---|
AimAlignment_LocalOffset | Vector3 | No | (0, 0, 0) | Three float values in parentheses | Position offset relative to the Aim transform. Moves the camera position in local X, Y, Z space relative to the target transform. Positive X is right, positive Y is up, positive Z is forward along the Aim axis. |
AimAlignment_Owner | enum | No | Sight | Sight, Gun | Controls where the engine looks for the AimAlignment transform path. Sight searches relative to the sight attachment's own model. Gun searches relative to the equipable weapon prefab. |
AimAlignment_Path | string | No | Model_0/Aim | Transform path string | The slash-delimited hierarchy path to the Aim transform GameObject. The camera aligns with this transform's position and rotation during ADS. The path is resolved relative to the owner defined by AimAlignment_Owner. |
EAimAlignmentTransformOwner enumeration
| Value | Behavior |
|---|---|
Sight | The engine looks for the AimAlignment transform path relative to the sight attachment's model prefab. The AimAlignment_Path is resolved starting from the sight model root. |
Gun | The engine looks for the AimAlignment transform path relative to the equipable gun prefab. The AimAlignment_Path is resolved starting from the gun model root. This is the recommended setting for optics that use the gun's built-in aim point rather than a sight-specific camera position. |
The default AimAlignment_Path value of Model_0/Aim assumes a standard Unturned™ model hierarchy where the root model is named Model_0 and the aim transform is a child GameObject named Aim. This convention is established in the vanilla asset set and is the expected path for most prefabs. Mod authors who create non-standard prefab hierarchies must update AimAlignment_Path to match their actual transform path.
AimAlignment_Path must exist at runtime
If AimAlignment_Path resolves to a transform that does not exist in the owner's hierarchy (because the path string is incorrect, the transform was renamed, or the path separator uses backslashes instead of forward slashes), the ADS camera will snap to the world origin or fail to position itself, producing a broken aiming state. Always test aim alignment after changing AimAlignment_Path on a custom sight attachment.
The AimAlignment_LocalOffset field is additive to the Aim transform's position. A zero offset places the camera exactly at the Aim transform position. A positive Y offset raises the camera; a negative Y offset lowers it. This field is useful for fine-tuning the eye position without moving the Aim transform in the prefab.
DistanceMarkers system
The DistanceMarkers system enables scope overlays to display bullet-drop compensation markers -- horizontal line indicators at calibrated distances that help the player estimate holdover for long-range shots. Each marker represents the point of impact at a specific distance.
| Field | Type | Required | Default | Purpose |
|---|---|---|---|---|
DistanceMarkers | list of DistanceMarker | No | Empty | A list of distance marker dictionaries, each defining one bullet-drop compensation indicator on the scope overlay. |
DistanceMarker dictionary fields
| Field | Type | Default | Valid values | Purpose |
|---|---|---|---|---|
Distance | float32 | 0 | Any positive float | The distance in meters to the hypothetical target. This value is displayed as text next to the marker line. |
LineOffset | float32 | 0 | 0.0 to 1.0 | The percentage distance from the center of the scope overlay to the start of the horizontal marker line. A value of 0 places the line at center; a value of 0.5 places it halfway between center and the edge of the overlay. |
LineWidth | float32 | 0.05 | 0.0 to 1.0 | The percentage length of the horizontal marker line relative to the scope overlay width. A value of 0.05 produces a short tick; a value of 0.5 produces a long ranging line. |
Side | enum | Right | Left, Right | The direction from center in which the marker line and distance label extend. Right extends the line and text to the right side of the crosshair. Left extends to the left side. |
HasLabel | bool | true | true, false | When true, the distance value is displayed as text next to the marker line. When false, only the horizontal line is rendered without a text label. |
Color | color | black | RGBA color value | The color of the marker line and its associated text label. Black is the default, but any color can be specified for high-contrast visibility against different scope backgrounds. |
The DistanceMarkers list is defined in the .dat file using a bracketed list syntax. Each entry in the list is a dictionary that defines one distance marker. The markers are rendered in order of their definition, with the closest distance typically first.
The flowchart above shows the rendering sequence for distance markers. Each marker is an independent rendering pass with its own position, width, side direction, label visibility, and color. This allows for complex scope reticle designs with multiple ranging marks at different distances.
Scope overlay field
| Field | Type | Required | Default | Purpose |
|---|---|---|---|---|
Offset_Scope_Overlay_By_One_Texel | bool | No | false | When set to true, the scope overlay texture is shifted by one texel to center the pixel grid. This corrects a rendering artifact where the overlay texture appears slightly misaligned relative to the screen pixel grid, producing a soft or blurry scope edge. Enabled for pixel-perfect scope overlay rendering. |
The Offset_Scope_Overlay_By_One_Texel field is a rendering quality toggle. The artifact it corrects is most visible on high-resolution displays where the scope overlay border should snap cleanly to pixel boundaries but instead appears one texel off due to UV coordinate rounding in the shader. Setting this field to true shifts the overlay UVs by half a texel to fix the alignment. The field is safe to enable on all scope overlays; it has no gameplay impact and no performance cost.
Distance marker worked example
The following example demonstrates a .dat fragment defining three distance markers at 100m, 200m, and 300m for a magnified rifle scope. The markers extend to the right of center, each with a progressively longer line width for visual differentiation.
DistanceMarkers
{
Distance 100
LineOffset 0.1
LineWidth 0.05
Side Right
HasLabel True
Color black
}
{
Distance 200
LineOffset 0.2
LineWidth 0.08
Side Right
HasLabel True
Color black
}
{
Distance 300
LineOffset 0.3
LineWidth 0.12
Side Right
HasLabel True
Color black
}The three markers appear on the scope overlay at 10%, 20%, and 30% below center, each with a progressively wider horizontal line and a text label reading "100", "200", and "300" respectively. The modder can tune LineOffset values to match the actual bullet-drop trajectory of the paired ammunition type.
Complete .dat examples
Example 1: Red dot sight (non-magnified, Zoom_Using_Eyes)
A non-magnified red dot reflex sight suitable for close-quarters and mid-range engagement. Uses Zoom_Using_Eyes true to avoid the scope overlay tube, providing a clean sight picture. No distance markers, no nightvision.
ID 51000
GUID a1b2c3d4e5f64a7b8c9d0e1f2a3b4c5d
Type Sight
Name RedDotSight_Mod
Rarity Common
Slot None
Size_X 2
Size_Y 1
Caliber 0
Zoom 1.75
ThirdPerson_Zoom 1.25
Zoom_Using_Eyes TrueCompanion English.dat:
Name Red Dot Reflex Sight
Description Lightweight non-magnified reflex sight. Provides a clean red dot reticle for fast target acquisition at close to medium range.Example 2: 4x rifle scope (magnified, scope overlay, distance markers)
A 4x magnified rifle scope with the standard scope overlay and three distance markers at 100m, 200m, and 300m. Uses the default AimAlignment path and AimAlignment_Owner Sight for camera positioning relative to the scope model.
ID 51001
GUID b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7
Type Sight
Name RifleScope_4x
Rarity Uncommon
Slot None
Size_X 3
Size_Y 1
Caliber 0
Zoom 4.0
ThirdPerson_Zoom 1.5
Zoom_Using_Eyes False
AimAlignment_LocalOffset (0, 0, 0)
AimAlignment_Owner Sight
AimAlignment_Path Model_0/Aim
DistanceMarkers
{
Distance 100
LineOffset 0.12
LineWidth 0.06
Side Right
HasLabel True
Color black
}
{
Distance 200
LineOffset 0.24
LineWidth 0.10
Side Right
HasLabel True
Color black
}
{
Distance 300
LineOffset 0.36
LineWidth 0.15
Side Right
HasLabel True
Color black
}Companion English.dat:
Name 4x Rifle Scope
Description Magnified rifle scope with 4x zoom and ranging marks out to 300 meters. Standard Mil-Dot style crosshair with distance compensation indicators.Example 3: Nightvision scope (Military vision, custom color)
A nightvision scope with Military vision effect, custom override color, and reduced fog intensity. No distance markers -- the nightvision optic is intended for low-visibility engagement rather than precision long-range shooting.
ID 51002
GUID c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8
Type Sight
Name NightvisionScope
Rarity Rare
Slot None
Size_X 3
Size_Y 1
Caliber 0
Zoom 3.0
ThirdPerson_Zoom 1.25
Zoom_Using_Eyes False
Vision Military
Nightvision_Color (0.2, 0.85, 0.3, 1.0)
Nightvision_Fog_Intensity 0.3Companion English.dat:
Name Nightvision Rifle Scope
Description 3x nightvision scope with integrated low-light imaging. Active nightvision overlay provides visibility in complete darkness. Custom green-tint optics with reduced fog bloom for clearer target identification.Nightvision_Color format
The Nightvision_Color field uses standard Unturned™ color syntax: four comma-separated float values in parentheses representing R, G, B, and A channels, each in the range 0.0 to 1.0. The values (0.2, 0.85, 0.3, 1.0) in the example above produce a slightly desaturated military green tint. To match the default Military vision color, omit the field entirely.
Example 4: Holographic sight with distance markers
A holographic weapon sight using the Holographic flag and Zoom_Using_Eyes true for a clean reticle projection. Includes two distance markers at 50m and 100m for close-to-medium ranging.
ID 51003
GUID d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9
Type Sight
Name HolographicSight_Mod
Rarity Common
Slot None
Size_X 2
Size_Y 1
Caliber 0
Zoom 1.5
ThirdPerson_Zoom 1.1
Zoom_Using_Eyes True
Holographic
DistanceMarkers
{
Distance 50
LineOffset 0.08
LineWidth 0.04
Side Left
HasLabel True
Color black
}
{
Distance 100
LineOffset 0.15
LineWidth 0.07
Side Left
HasLabel True
Color black
}Companion English.dat:
Name Holographic Weapon Sight
Description Holographic projection sight with 1.5x zoom and integrated close-range ranging marks. The holographic reticle provides rapid target acquisition while maintaining peripheral awareness.Example 5: Legacy optic asset (ItemOpticAsset, Type Optic, Useable Optic)
A legacy optic asset using the original ItemOpticAsset class conventions. This example is provided for compatibility with existing mod projects that have not migrated to ItemSightAsset.
ID 51004
GUID e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0
Type Optic
Useable Optic
Name LegacyScope_2x
Rarity Uncommon
Slot None
Size_X 2
Size_Y 1
Zoom 2.0Companion English.dat:
Name 2x Legacy Optic
Description A scope authored using the legacy ItemOpticAsset class. Provides 2x magnification. For new mods, use the Sight type instead.ItemOpticAsset versus ItemSightAsset
The legacy ItemOpticAsset class (Type Optic, Useable Optic) supports the Zoom field and basic scope overlay rendering. The ItemSightAsset class (Type Sight) is the modern replacement and supports the full field set documented in this article: AimAlignment, DistanceMarkers, Holographic, Nightvision, Zoom_Using_Eyes, Offset_Scope_Overlay_By_One_Texel, and ThirdPerson_Zoom. The 57 Studios™ cohort recommendation is to use ItemSightAsset for all new sight attachment development. Migrating an existing ItemOpticAsset mod to ItemSightAsset requires changing the Type field from Optic to Sight, removing the Useable field (if present), and adding the desired new fields from the ItemSightAsset set.
Hook_Sight placement guidelines
The Hook_Sight GameObject on the weapon prefab determines the physical mounting point of the optic on the weapon model. Correct placement is essential for the optic to appear seated properly at the correct position and angle.
Position reference
| Weapon type | Hook_Sight position | Notes |
|---|---|---|
| Assault rifle | Top of receiver rail, centered between the ejection port and the handguard | Typically 10-15 cm behind the chamber area on the top rail |
| Battle rifle | Top of receiver rail, same relative position as assault rifle | Larger receivers may shift the position slightly rearward |
| Sniper rifle | Top of receiver rail, near the rear of the receiver | Long-action receivers place the scope mount further back |
| Pistol | Top of slide, centered above the ejection port | Compact pistols may use the rear sight dovetail position |
| SMG | Top of receiver, forward of the charging handle | Subcompact receivers may limit rail length |
| Shotgun | Top of receiver, above the trigger group | Pump-action shotguns vary widely by model |
Forward axis alignment
The Hook_Sight GameObject's forward (Z) axis must align with the weapon's bore direction. If the forward axis points upward or at an angle, the optic's internal reticle will not align with the point of impact, producing a visual mismatch that the player will perceive as a bug even if the statistical hit detection is correct.
Common hook placement errors
| Error | Visual result | Correction |
|---|---|---|
| Hook positioned too far forward | Optic floats in front of the receiver, disconnected from the rail | Move Hook_Sight rearward to the receiver rail position |
| Hook positioned too far rearward | Optic appears mounted behind the player's eye, clipping into the stock | Move Hook_Sight forward approximately 5-10 cm |
| Hook Y axis too high | Optic floats above the weapon rail with visible gap | Lower Hook_Sight to contact the top rail surface |
| Hook forward axis misaligned | Reticle offset from bore axis, visible cant | Rotate Hook_Sight to align forward axis with bore |
| Hook name incorrectly cased | Optic equips but is invisible | Rename to Hook_Sight with exact capitalization |
Optic asset authoring workflow
The following workflow describes the end-to-end process for authoring a new sight attachment, from prefab creation through in-game testing.
The flowchart above captures the complete authoring decision tree. The key branching points are the optic type design decision (magnified vs. non-magnified), the DistanceMarkers configuration, and the AimAlignment tuning that controls the ADS camera position.
Frequently asked questions
What is the difference between ItemOpticAsset and ItemSightAsset?
ItemOpticAsset (requiring Type Optic and Useable Optic) is the original class that supports the Zoom field. ItemSightAsset (requiring Type Sight only) is the modern replacement that supports every field documented in this article: AimAlignment, DistanceMarkers, nightvision, holographic rendering, Zoom_Using_Eyes, ThirdPerson_Zoom, and Offset_Scope_Overlay_By_One_Texel. The 57 Studios™ cohort recommends using ItemSightAsset for all new sight mods. The legacy ItemOpticAsset class is maintained for backward compatibility with existing mods.
How do I make a scope with no scope overlay tube?
Set Zoom_Using_Eyes True in the .dat file. This applies the zoom factor directly to the camera field of view without rendering a scope overlay texture. The result is a clean sight picture with magnification -- the characteristic appearance of a red dot sight, holographic sight, or low-magnification reflex optic. Set Zoom_Using_Eyes False (or omit the field) for traditional scopes that should display a scope overlay tube.
What happens if Zoom is set below 1.0?
The Zoom field accepts float values below 1.0 in the .dat file, but values below 1.0 produce a zoomed-out view (wider field of view) rather than a magnified view. This is not a supported use case and may produce unexpected behavior including clipping camera positions and misaligned overlay rendering. The valid range for all vanilla and cohort-validated optics is 1.0 and above.
Can I use both Holographic and Zoom_Using_Eyes on the same sight?
Yes. Holographic and Zoom_Using_Eyes are independent flags and can both be present in the same .dat file. The result is a holographic sight that renders its reticle using the holographic rendering path while applying zoom directly to the camera field of view without a scope overlay tube. This is the recommended configuration for holographic weapon sights.
How do DistanceMarkers interact with the ammunition's ballistic trajectory?
DistanceMarkers are visual reference points on the scope overlay. They do not automatically adjust the point of impact -- the player must manually compensate for bullet drop by aligning the appropriate distance marker with the target. The modder should calibrate the LineOffset values of the distance markers to match the actual bullet-drop trajectory of the magazine ammunition types that the scope is designed to pair with. A scope intended for a high-velocity 5.56mm rifle will require different LineOffset values than the same scope used on a subsonic 9mm SMG.
What is the maximum number of DistanceMarker entries?
The .dat format does not define a hard limit on the number of DistanceMarkers entries. However, practical scope overlay readability imposes a soft limit -- more than approximately eight to ten markers will clutter the scope picture and obscure the target. The cohort recommendation is to limit distance markers to four to six entries for a clean ranging reticle, and to space the LineOffset values evenly to avoid overlapping lines.
What is the third-person zoom and why does it differ from the first-person zoom?
ThirdPerson_Zoom controls the camera zoom factor when the player is in third-person view mode while aiming down sights. Third-person view in Unturned™ shows the player character from behind, and the ADS camera in this mode zooms toward the weapon rather than switching to a first-person scope view. The ThirdPerson_Zoom value is typically lower than the first-person Zoom value because the third-person camera is positioned further from the weapon and excessive zoom in this mode would over-zoom the camera into the player character's back.
Can I set both Zoom_Using_Eyes True and still use DistanceMarkers?
Yes. DistanceMarkers are independent of the Zoom_Using_Eyes flag. Distance markers render on the scope overlay regardless of whether the overlay tube is active. When Zoom_Using_Eyes is true, the distance markers render as part of the HUD overlay rather than inside a scope tube, which produces a cleaner ranging display. This configuration is suitable for low-magnification optics that need ranging marks without the visual obstruction of a scope border.
Does the Vision field on a sight conflict with environmental lighting?
The Vision field applies a post-processing effect that overrides the default camera rendering during ADS. It does not interact with dynamic lighting sources such as flashlights, flares, or environmental sun angle. When nightvision is active (Vision set to Military or Civilian), the player sees the nightvision color tint regardless of the ambient light level -- this is intentional behavior that makes nightvision optics effective in complete darkness. The Nightvision_Fog_Intensity field modifies the fog density independently of the map's fog settings.
How do I configure AimAlignment_LocalOffset for a cheek-rest optic?
For optics that mount at a lower height over bore (such as low-profile reflex sights or scout scopes mounted forward on the handguard), set AimAlignment_LocalOffset with a negative Y value to lower the camera position. For example, AimAlignment_LocalOffset (0, -0.02, 0) shifts the camera two centimeters below the Aim transform. This simulates a lower cheek weld position on the stock. Positive Y values raise the camera for optics mounted on high rail risers.
What causes the scope overlay to appear blurry or misaligned?
The most common cause is the absence of the Offset_Scope_Overlay_By_One_Texel field when the overlay texture resolution does not align perfectly with the screen pixel grid. The fix is to add Offset_Scope_Overlay_By_One_Texel True to the .dat file. If the blurriness persists, verify that the scope overlay texture in the Unity bundle has a power-of-two resolution (512x512, 1024x1024, or 2048x2048) and that the texture import settings disable compression that could introduce pixel alignment artifacts.
Best practices
- Use
ItemSightAsset(TypeSight) for all new sight attachments. ReserveItemOpticAsset(TypeOptic, UseableOptic) for maintaining existing legacy mods. - Set
Zoom_Using_Eyes Trueon non-magnified optics (red dot, reflex, holographic) to produce a clean sight picture without a scope overlay tube. - Use
ThirdPerson_Zoomto tune the third-person ADS camera independently from the first-person zoom. A value of1.25maintains a natural-looking third-person aiming pose. - Add
Offset_Scope_Overlay_By_One_Texel Trueto every magnified scope to prevent pixel-alignment blurring on the overlay border. - Configure
AimAlignment_Owner Sightwhen the Aim transform is part of the sight attachment prefab hierarchy. ConfigureAimAlignment_Owner Gunwhen the Aim transform exists on the weapon prefab itself. - Keep
DistanceMarkersentries to four to six markers for a clean scope reticle. SpaceLineOffsetvalues evenly and calibrate them against the paired ammunition's trajectory. - Set
Vision MilitaryorVision Civilianonly when the sight is intended to provide nightvision capability. The defaultNonevalue produces no post-processing effect. - Generate a fresh GUID for every optic or sight asset. Never reuse GUIDs from other items in the same mod project.
- Test aim alignment in-game after every change to
AimAlignment_PathorAimAlignment_LocalOffset. Incorrect aim alignment is difficult to detect from the Unity Editor alone.
Advanced considerations
The Field of View relationship with Zoom values
The relationship between the Zoom field value and the effective field of view is mathematically inverse. The effective horizontal FOV in degrees is approximately baseFOV / Zoom, where baseFOV is the player's default field of view setting (typically 90 degrees in Unturned™). A Zoom value of 4.0 produces an effective FOV of approximately 22.5 degrees, which corresponds to the narrow viewing angle characteristic of a high-magnification rifle scope. The engine does not expose the base FOV in the .dat file; it is controlled by the player's graphics settings and is not configurable per-asset.
DistanceMarker calibration methodology
The cohort-recommended methodology for calibrating LineOffset values to a specific cartridge is to test-fire the paired weapon and magazine combination at known distances in a controlled environment (flat terrain, measured distance markers) and to record the pixel offset of the point of impact from the center crosshair at each distance. The LineOffset value for a given distance should equal the observed pixel offset divided by the scope overlay texture height. This calibration process requires iterative testing but produces distance markers that closely match the actual bullet-drop trajectory.
Per-weapon-type optic balance considerations
Different weapon types benefit from different optic configurations. The following table provides cohort-validated starting configurations by weapon type, balancing magnification against situational awareness and scope-overlay obstruction.
| Weapon type | Recommended Zoom | Use Zoom_Using_Eyes | Holographic recommended? | Typical DistanceMarkers |
|---|---|---|---|---|
| Close-quarters SMG / PDW | 1.5x | True | Yes | 50m only |
| Standard assault rifle | 2.0x-4.0x | False for 4x+, True for 2x | No (scope preferred) | 100m, 200m, 300m |
| Designated marksman rifle | 4.0x-8.0x | False | No | 100m, 200m, 300m, 400m |
| Sniper rifle | 8.0x-16.0x | False | No | 200m, 400m, 600m, 800m |
| Battle rifle | 2.0x-4.0x | False | No (low-power variable preferred) | 100m, 200m, 300m |
| Pistol | 1.25x-1.5x | True | Yes | None |
| Shotgun | 1.0x-1.5x | True | Optional | None |
| LMG | 1.5x-2.0x | True | Yes | 100m, 200m |
Custom scope overlay texture requirements
Scope overlay textures must be authored as standalone assets and packaged into the sight attachment's Unity bundle. The overlay texture is rendered as a full-screen quad when the player aims down sights with Zoom_Using_Eyes False. Standard overlay texture requirements include a power-of-two resolution (typically 1024x1024 or 2048x2048), an alpha channel for the transparent reticle regions, and an opaque border around the scope tube edge. The overlay texture file path is not specified in the .dat file -- it is referenced from the prefab component on the sight attachment's Unity prefab.
Multiple sight attachments on one weapon
A weapon can accept multiple sight attachments by declaring the Sight field in its .dat with Calibers (plural) support, allowing the gun to accept sights of different calibers. However, a weapon can only have one sight equipped at any given moment -- the Sight slot is single-instance. The weapon stores the most recently equipped sight and reverts to the default iron sight (or a Sight field default) when the attachment is removed.
Performance impact of nightvision on server-rendered frames
Nightvision post-processing is a client-side effect. The Vision field and its associated Nightvision_Color and Nightvision_Fog_Intensity values are evaluated on the client machine and have no direct performance impact on the server. However, the post-processing pass has a minor GPU cost on the client -- this is negligible on modern hardware and should not be a consideration when deciding whether to add nightvision capability to a sight attachment.
Appendix A: Optic asset .dat field quick reference
| Field | Type | Required | Default | Purpose |
|---|---|---|---|---|
ID | uint16 | Yes | , | Unique item identifier |
GUID | uint128 hex | Yes | , | Globally unique 128-bit identifier |
Type | enum | Yes | , | Optic (legacy) or Sight (modern) |
Useable | enum | No (legacy only) | , | Optic - required only for ItemOpticAsset |
Name | string | Yes | , | Internal name |
Rarity | enum | No | Common | Rarity tier |
Slot | enum | Yes | , | Must be None |
Size_X | uint8 | Yes | , | Inventory grid width |
Size_Y | uint8 | Yes | , | Inventory grid height |
Caliber | uint16 | No | 0 | Caliber compatibility (0 = universal) |
Zoom | float32 | No | 1.0 | Multiplicative zoom amount |
ThirdPerson_Zoom | float32 | No | 1.25 | Zoom factor in third-person view |
Zoom_Using_Eyes | bool | No | false | Zoom without scope overlay texture |
Holographic | flag | No | absent | Use holographic rendering path |
Vision | enum | No | None | Lighting vision effect type |
Nightvision_Color | color | No | Default green | Override color for Military nightvision |
Nightvision_Fog_Intensity | float32 | No | Map default | Fog density under nightvision |
AimAlignment_LocalOffset | Vector3 | No | (0, 0, 0) | Position offset relative to Aim transform |
AimAlignment_Owner | enum | No | Sight | Transform owner: Sight or Gun |
AimAlignment_Path | string | No | Model_0/Aim | Transform path to Aim GameObject |
DistanceMarkers | list | No | Empty | Bullet-drop compensation marker list |
Offset_Scope_Overlay_By_One_Texel | bool | No | false | Pixel-perfect scope overlay alignment |
Appendix B: DistanceMarker field quick reference
| Field | Type | Default | Purpose |
|---|---|---|---|
Distance | float32 | 0 | Distance to target in meters |
LineOffset | float32 | 0 | Percentage from center to line start (0.0-1.0) |
LineWidth | float32 | 0.05 | Percentage length of horizontal line (0.0-1.0) |
Side | enum | Right | Direction line and text extend from center |
HasLabel | bool | true | Show distance text next to line |
Color | color | black | Line and text color |
Appendix C: Diagnostic table
| Symptom | Most likely cause | Resolution |
|---|---|---|
| Optic equips but is invisible on weapon | Hook_Sight missing from weapon prefab | Add Hook_Sight GameObject to weapon prefab, rebuild bundle |
| Optic visible but ADS shows no magnification | Zoom field absent or set to 1.0 | Set Zoom to desired value (e.g., 4.0) |
| Scope overlay appears but no zoom applied | Zoom_Using_Eyes set to true unintentionally | Set Zoom_Using_Eyes False or omit for scope overlay |
| Camera snaps to wrong position in ADS | AimAlignment_Path string incorrect or transform not found | Verify the Aim transform exists at the specified path; check forward-slash separators |
| Camera position slightly off in ADS | AimAlignment_LocalOffset needs tuning | Adjust (X, Y, Z) values; typically Y adjustment for height-over-bore |
| Distance markers not visible | DistanceMarkers list empty or not parsed | Confirm bracket syntax in .dat; verify each entry has required fields |
| Distance marker labels missing | HasLabel set to false on each entry | Set HasLabel True for text display |
| Nightvision effect not activating | Vision field set to None or omitted | Set Vision Military or Vision Civilian |
| Nightvision color not matching intended tint | Nightvision_Color not authored | Add Nightvision_Color (R, G, B, A) with the intended RGBA values |
| Scope overlay appears blurry | Offset_Scope_Overlay_By_One_Texel not set | Add Offset_Scope_Overlay_By_One_Texel True |
| Third-person ADS zoom not applied | ThirdPerson_Zoom absent or same as first-person Zoom | Set ThirdPerson_Zoom to a distinct value (typically 1.25 or 1.5) |
| Optic equips with no visual effect at all | Wrong hook name casing or wrong slot type on gun | Verify Hook_Sight casing; confirm gun .dat has Sight field |
| Legacy optic with Type Optic not equipping | Useable field missing from .dat | Add Useable Optic to legacy ItemOpticAsset .dat |
| Holographic reticle not displaying | Holographic flag absent | Add Holographic flag to .dat |
Appendix D: AimAlignment_Owner selection guide
| Configuration | When to use | Example |
|---|---|---|
AimAlignment_Owner Sight | The Aim transform exists in the sight attachment's own prefab hierarchy | A standalone scope model with its own integrated eye relief position |
AimAlignment_Owner Gun | The Aim transform exists on the weapon prefab, not on the sight | A red dot sight that uses the weapon's built-in iron sight alignment point |
The choice of AimAlignment_Owner affects only the root transform from which AimAlignment_Path is resolved. When Sight is selected, the path is relative to the sight attachment model's root. When Gun is selected, the path is relative to the weapon prefab's root. The default value of Sight is appropriate for most custom sight attachments that include their own Aim transform in the prefab hierarchy.
Appendix E: External references
| Resource | URL | Notes |
|---|---|---|
| Smartly Dressed Games modding documentation | https://docs.smartlydressedgames.com/en/stable/ | Official field reference for ItemOpticAsset and ItemSightAsset classes |
| Unturned on Steam | https://store.steampowered.com/app/304930/Unturned/ | Game changelog and community hub |
| Attachment Slots: Sight, Grip, Tactical, Barrel | /items/attachment-slots | The slot-system reference for Hook_Sight placement and caliber compatibility |
| Gun Mod Tutorial | /items/gun-mod-tutorial | Prerequisite article for weapon prefab authoring |
| Item Asset Anatomy | /items/item-asset-anatomy | Shared field reference for all item types |
Cross-references
- Grip Asset Reference - the previous article; covers the Grip slot attachment type that pairs with the Sight slot on weapons.
- Sight Asset Reference - the next article; extends this reference with the sight-specific fields and configurations for the ItemSightAsset class.
- Attachment Slots: Sight, Grip, Tactical, Barrel - the comprehensive slot system reference; covers Hook_Sight placement, caliber compatibility, and the per-slot field matrix.
- Gun Mod Tutorial - the prerequisite article for weapon prefab authoring; covers the gun-side fields that enable sight support.
- Magazine Asset Reference - covers the caliber linkage mechanism that also controls attachment compatibility.
- Barrel Asset Reference - the companion attachment reference for the Barrel slot type.
- Caliber Asset - covers caliber linkage between guns, magazines, and attachments.
- Item Asset Anatomy - the shared field reference for ID, GUID, Rarity, Slot, Size_X, Size_Y, and Pro fields.
- Smartly Dressed Games modding documentation - authoritative source for field names and enumeration values.
- Unturned on Steam - the game this documentation targets.
Authoring checklist for optic and sight attachments
Complete this checklist before testing a new optic or sight attachment mod in-game.
- [ ]
IDis in the 50000+ range and unique within the mod project. - [ ]
GUIDwas generated fresh; no other item in the project shares this GUID. - [ ]
Typeis set toSight(modern) orOptic(legacy). IfOptic,Useable Opticis also present. - [ ]
Slotis set toNone. - [ ]
Caliberis set to0(universal) or the intended custom caliber ID. - [ ]
Zoomis set to1.0or greater. - [ ]
ThirdPerson_Zoomis set to a value distinct fromZoom(typically1.25). - [ ]
Zoom_Using_EyesisTruefor non-magnified optics,False(or omitted) for scope-overlay optics. - [ ]
Holographicflag is present for holographic weapon sights. - [ ]
Visionis set toMilitaryorCivilianfor nightvision optics; omitted orNonefor standard optics. - [ ]
Nightvision_Coloris authored if the default Military green tint needs adjustment. - [ ]
Nightvision_Fog_Intensityis tuned to the intended visibility level under nightvision. - [ ]
AimAlignment_LocalOffsetis set to zero unless height-over-bore adjustment is needed. - [ ]
AimAlignment_Ownermatches where the Aim transform exists in the prefab hierarchy. - [ ]
AimAlignment_Pathmatches the actual transform path in the owner prefab. - [ ]
DistanceMarkersentries use correct bracket syntax and all required fields. - [ ]
Offset_Scope_Overlay_By_One_Texel Trueis present on magnified scopes. - [ ]
Bypass_ID_Limit Trueis present for IDs above 2000. - [ ] The weapon prefab has
Hook_Sightat the correct position with exact name casing. - [ ]
English.datis authored in the same folder withNameandDescription. - [ ] The master bundle contains the sight prefab and any scope overlay texture.
- [ ] Tested in single-player: optic seats correctly, ADS camera positioned correctly, zoom applies correctly, scope overlay renders correctly, distance markers visible and positioned correctly, nightvision activates (if configured).
Document history
| Version | Date | Author | Notes |
|---|---|---|---|
| 1.0 | 2026-07-26 | 57 Studios | Initial publication. Complete optic and sight asset field reference, AimAlignment system, DistanceMarkers system, nightvision configuration, worked examples, diagnostic table, and authoring checklist. |
Glossary
| Term | Definition |
|---|---|
| ADS | Aiming Down Sights -- the player state where the weapon is raised to eye level and the optic view is active |
| AimAlignment | The camera positioning system that places the player's view at the optic's eye relief point during ADS |
| Aim transform | The Unity Transform GameObject that defines the camera position and rotation for ADS alignment |
| Bullet-drop compensation | The practice of aiming above a distant target to account for the projectile's ballistic drop over distance |
| Distance markers | Horizontal ranging marks on a scope overlay that indicate the point of impact at calibrated distances |
| Field of view (FOV) | The angular extent of the observable game world visible through the camera at any given moment |
| Height over bore | The vertical distance between the weapon's bore axis and the optic's optical axis |
| Holographic sight | A non-magnified sight that projects a reticle onto a display window using holographic technology |
| Hook_Sight | The Unity GameObject on a weapon prefab where sight attachment prefabs are instantiated |
| Scope overlay | A full-screen texture rendered during ADS that simulates the view through a scope tube |
| Texel | A single pixel of a texture map, analogous to a screen pixel but in texture coordinate space |
| Zoom multiplicative | The magnification system where the Zoom value is divided into the base field of view to determine the effective ADS FOV |
