Skip to content

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.

A 4x rifle scope optic mounted on an assault rifle in the Unturned character hands view

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 ItemOpticAsset relates to the newer ItemSightAsset class.
  • Every .dat field unique to optic assets, with type, default value, valid values, and purpose.
  • How the Zoom multiplicative system works and how ThirdPerson_Zoom controls the third-person camera separately.
  • The AimAlignment system: how AimAlignment_LocalOffset, AimAlignment_Owner, and AimAlignment_Path position the ADS camera.
  • The DistanceMarkers system for configuring bullet-drop compensation marks on scope overlays.
  • Nightvision configuration: the Vision enum, Nightvision_Color, and Nightvision_Fog_Intensity.
  • The Zoom_Using_Eyes and Holographic flags that control the scope overlay rendering path.
  • Offset_Scope_Overlay_By_One_Texel for pixel-perfect scope overlay alignment.
  • Worked .dat examples 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.

FieldTypeExampleNotes
IDuint1650002Unique item ID. Use 50000+ range for custom Workshop mods.
GUIDuint128 hex5b8c3a2e7d1f4b6a9e2c5d8a1f3b6c9e128-bit globally unique identifier. Generate fresh for every new item.
TypeenumOptic or SightMust be Optic for legacy ItemOpticAsset items; must be Sight for ItemSightAsset items.
UseableenumOpticMust be Optic for legacy ItemOpticAsset items. Not required on ItemSightAsset items.
NamestringMyScope_4xInternal name; also the prefab lookup key in the master bundle.
RarityenumUncommonRarity tier. See Rarity enum in Item Asset Anatomy.
SlotenumNoneOptics do not occupy a primary/secondary slot; they mount on the weapon's sight hook.
Size_Xuint82Inventory grid width. Most scopes are 2 units wide.
Size_Yuint81Inventory grid height. Most scopes are 1 unit tall.
Bypass_ID_LimitboolTrueRequired 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.

FieldTypeRequiredDefaultValid valuesPurpose
Zoomfloat32No11.0 or greaterMultiplicative zoom amount. A value of 4.0 produces 4x magnification. Values below 1.0 are not supported and may produce unexpected view behavior.
ThirdPerson_Zoomfloat32No1.251.0 or greaterZoom factor applied when the player is in third-person view mode while ADS. Separate from the first-person Zoom value.
Zoom_Using_EyesboolNofalsetrue, falseWhen 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

FieldTypeRequiredDefaultPurpose
HolographicflagNoabsentWhen 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.

FieldTypeRequiredDefaultValid valuesPurpose
VisionenumNoNoneNone, Military, CivilianThe lighting vision effect type. None disables the effect. Military applies a green-tinted nightvision effect. Civilian applies a white-tinted nightvision effect.
Nightvision_ColorcolorNoSee descriptionRGBA color valueOverride 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_Intensityfloat32NoSee descriptionFloat valueConfigure 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.

FieldTypeRequiredDefaultValid valuesPurpose
AimAlignment_LocalOffsetVector3No(0, 0, 0)Three float values in parenthesesPosition 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_OwnerenumNoSightSight, GunControls 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_PathstringNoModel_0/AimTransform path stringThe 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

ValueBehavior
SightThe 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.
GunThe 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.

FieldTypeRequiredDefaultPurpose
DistanceMarkerslist of DistanceMarkerNoEmptyA list of distance marker dictionaries, each defining one bullet-drop compensation indicator on the scope overlay.

DistanceMarker dictionary fields

FieldTypeDefaultValid valuesPurpose
Distancefloat320Any positive floatThe distance in meters to the hypothetical target. This value is displayed as text next to the marker line.
LineOffsetfloat3200.0 to 1.0The 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.
LineWidthfloat320.050.0 to 1.0The 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.
SideenumRightLeft, RightThe 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.
HasLabelbooltruetrue, falseWhen 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.
ColorcolorblackRGBA color valueThe 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

FieldTypeRequiredDefaultPurpose
Offset_Scope_Overlay_By_One_TexelboolNofalseWhen 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 True

Companion 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.3

Companion 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.0

Companion 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 typeHook_Sight positionNotes
Assault rifleTop of receiver rail, centered between the ejection port and the handguardTypically 10-15 cm behind the chamber area on the top rail
Battle rifleTop of receiver rail, same relative position as assault rifleLarger receivers may shift the position slightly rearward
Sniper rifleTop of receiver rail, near the rear of the receiverLong-action receivers place the scope mount further back
PistolTop of slide, centered above the ejection portCompact pistols may use the rear sight dovetail position
SMGTop of receiver, forward of the charging handleSubcompact receivers may limit rail length
ShotgunTop of receiver, above the trigger groupPump-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

ErrorVisual resultCorrection
Hook positioned too far forwardOptic floats in front of the receiver, disconnected from the railMove Hook_Sight rearward to the receiver rail position
Hook positioned too far rearwardOptic appears mounted behind the player's eye, clipping into the stockMove Hook_Sight forward approximately 5-10 cm
Hook Y axis too highOptic floats above the weapon rail with visible gapLower Hook_Sight to contact the top rail surface
Hook forward axis misalignedReticle offset from bore axis, visible cantRotate Hook_Sight to align forward axis with bore
Hook name incorrectly casedOptic equips but is invisibleRename 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 (Type Sight) for all new sight attachments. Reserve ItemOpticAsset (Type Optic, Useable Optic) for maintaining existing legacy mods.
  • Set Zoom_Using_Eyes True on non-magnified optics (red dot, reflex, holographic) to produce a clean sight picture without a scope overlay tube.
  • Use ThirdPerson_Zoom to tune the third-person ADS camera independently from the first-person zoom. A value of 1.25 maintains a natural-looking third-person aiming pose.
  • Add Offset_Scope_Overlay_By_One_Texel True to every magnified scope to prevent pixel-alignment blurring on the overlay border.
  • Configure AimAlignment_Owner Sight when the Aim transform is part of the sight attachment prefab hierarchy. Configure AimAlignment_Owner Gun when the Aim transform exists on the weapon prefab itself.
  • Keep DistanceMarkers entries to four to six markers for a clean scope reticle. Space LineOffset values evenly and calibrate them against the paired ammunition's trajectory.
  • Set Vision Military or Vision Civilian only when the sight is intended to provide nightvision capability. The default None value 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_Path or AimAlignment_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 typeRecommended ZoomUse Zoom_Using_EyesHolographic recommended?Typical DistanceMarkers
Close-quarters SMG / PDW1.5xTrueYes50m only
Standard assault rifle2.0x-4.0xFalse for 4x+, True for 2xNo (scope preferred)100m, 200m, 300m
Designated marksman rifle4.0x-8.0xFalseNo100m, 200m, 300m, 400m
Sniper rifle8.0x-16.0xFalseNo200m, 400m, 600m, 800m
Battle rifle2.0x-4.0xFalseNo (low-power variable preferred)100m, 200m, 300m
Pistol1.25x-1.5xTrueYesNone
Shotgun1.0x-1.5xTrueOptionalNone
LMG1.5x-2.0xTrueYes100m, 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

FieldTypeRequiredDefaultPurpose
IDuint16Yes,Unique item identifier
GUIDuint128 hexYes,Globally unique 128-bit identifier
TypeenumYes,Optic (legacy) or Sight (modern)
UseableenumNo (legacy only),Optic - required only for ItemOpticAsset
NamestringYes,Internal name
RarityenumNoCommonRarity tier
SlotenumYes,Must be None
Size_Xuint8Yes,Inventory grid width
Size_Yuint8Yes,Inventory grid height
Caliberuint16No0Caliber compatibility (0 = universal)
Zoomfloat32No1.0Multiplicative zoom amount
ThirdPerson_Zoomfloat32No1.25Zoom factor in third-person view
Zoom_Using_EyesboolNofalseZoom without scope overlay texture
HolographicflagNoabsentUse holographic rendering path
VisionenumNoNoneLighting vision effect type
Nightvision_ColorcolorNoDefault greenOverride color for Military nightvision
Nightvision_Fog_Intensityfloat32NoMap defaultFog density under nightvision
AimAlignment_LocalOffsetVector3No(0, 0, 0)Position offset relative to Aim transform
AimAlignment_OwnerenumNoSightTransform owner: Sight or Gun
AimAlignment_PathstringNoModel_0/AimTransform path to Aim GameObject
DistanceMarkerslistNoEmptyBullet-drop compensation marker list
Offset_Scope_Overlay_By_One_TexelboolNofalsePixel-perfect scope overlay alignment

Appendix B: DistanceMarker field quick reference

FieldTypeDefaultPurpose
Distancefloat320Distance to target in meters
LineOffsetfloat320Percentage from center to line start (0.0-1.0)
LineWidthfloat320.05Percentage length of horizontal line (0.0-1.0)
SideenumRightDirection line and text extend from center
HasLabelbooltrueShow distance text next to line
ColorcolorblackLine and text color

Appendix C: Diagnostic table

SymptomMost likely causeResolution
Optic equips but is invisible on weaponHook_Sight missing from weapon prefabAdd Hook_Sight GameObject to weapon prefab, rebuild bundle
Optic visible but ADS shows no magnificationZoom field absent or set to 1.0Set Zoom to desired value (e.g., 4.0)
Scope overlay appears but no zoom appliedZoom_Using_Eyes set to true unintentionallySet Zoom_Using_Eyes False or omit for scope overlay
Camera snaps to wrong position in ADSAimAlignment_Path string incorrect or transform not foundVerify the Aim transform exists at the specified path; check forward-slash separators
Camera position slightly off in ADSAimAlignment_LocalOffset needs tuningAdjust (X, Y, Z) values; typically Y adjustment for height-over-bore
Distance markers not visibleDistanceMarkers list empty or not parsedConfirm bracket syntax in .dat; verify each entry has required fields
Distance marker labels missingHasLabel set to false on each entrySet HasLabel True for text display
Nightvision effect not activatingVision field set to None or omittedSet Vision Military or Vision Civilian
Nightvision color not matching intended tintNightvision_Color not authoredAdd Nightvision_Color (R, G, B, A) with the intended RGBA values
Scope overlay appears blurryOffset_Scope_Overlay_By_One_Texel not setAdd Offset_Scope_Overlay_By_One_Texel True
Third-person ADS zoom not appliedThirdPerson_Zoom absent or same as first-person ZoomSet ThirdPerson_Zoom to a distinct value (typically 1.25 or 1.5)
Optic equips with no visual effect at allWrong hook name casing or wrong slot type on gunVerify Hook_Sight casing; confirm gun .dat has Sight field
Legacy optic with Type Optic not equippingUseable field missing from .datAdd Useable Optic to legacy ItemOpticAsset .dat
Holographic reticle not displayingHolographic flag absentAdd Holographic flag to .dat

Appendix D: AimAlignment_Owner selection guide

ConfigurationWhen to useExample
AimAlignment_Owner SightThe Aim transform exists in the sight attachment's own prefab hierarchyA standalone scope model with its own integrated eye relief position
AimAlignment_Owner GunThe Aim transform exists on the weapon prefab, not on the sightA 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

ResourceURLNotes
Smartly Dressed Games modding documentationhttps://docs.smartlydressedgames.com/en/stable/Official field reference for ItemOpticAsset and ItemSightAsset classes
Unturned on Steamhttps://store.steampowered.com/app/304930/Unturned/Game changelog and community hub
Attachment Slots: Sight, Grip, Tactical, Barrel/items/attachment-slotsThe slot-system reference for Hook_Sight placement and caliber compatibility
Gun Mod Tutorial/items/gun-mod-tutorialPrerequisite article for weapon prefab authoring
Item Asset Anatomy/items/item-asset-anatomyShared field reference for all item types

Cross-references

Authoring checklist for optic and sight attachments

Complete this checklist before testing a new optic or sight attachment mod in-game.

  • [ ] ID is in the 50000+ range and unique within the mod project.
  • [ ] GUID was generated fresh; no other item in the project shares this GUID.
  • [ ] Type is set to Sight (modern) or Optic (legacy). If Optic, Useable Optic is also present.
  • [ ] Slot is set to None.
  • [ ] Caliber is set to 0 (universal) or the intended custom caliber ID.
  • [ ] Zoom is set to 1.0 or greater.
  • [ ] ThirdPerson_Zoom is set to a value distinct from Zoom (typically 1.25).
  • [ ] Zoom_Using_Eyes is True for non-magnified optics, False (or omitted) for scope-overlay optics.
  • [ ] Holographic flag is present for holographic weapon sights.
  • [ ] Vision is set to Military or Civilian for nightvision optics; omitted or None for standard optics.
  • [ ] Nightvision_Color is authored if the default Military green tint needs adjustment.
  • [ ] Nightvision_Fog_Intensity is tuned to the intended visibility level under nightvision.
  • [ ] AimAlignment_LocalOffset is set to zero unless height-over-bore adjustment is needed.
  • [ ] AimAlignment_Owner matches where the Aim transform exists in the prefab hierarchy.
  • [ ] AimAlignment_Path matches the actual transform path in the owner prefab.
  • [ ] DistanceMarkers entries use correct bracket syntax and all required fields.
  • [ ] Offset_Scope_Overlay_By_One_Texel True is present on magnified scopes.
  • [ ] Bypass_ID_Limit True is present for IDs above 2000.
  • [ ] The weapon prefab has Hook_Sight at the correct position with exact name casing.
  • [ ] English.dat is authored in the same folder with Name and Description.
  • [ ] 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

VersionDateAuthorNotes
1.02026-07-2657 StudiosInitial publication. Complete optic and sight asset field reference, AimAlignment system, DistanceMarkers system, nightvision configuration, worked examples, diagnostic table, and authoring checklist.

Glossary

TermDefinition
ADSAiming Down Sights -- the player state where the weapon is raised to eye level and the optic view is active
AimAlignmentThe camera positioning system that places the player's view at the optic's eye relief point during ADS
Aim transformThe Unity Transform GameObject that defines the camera position and rotation for ADS alignment
Bullet-drop compensationThe practice of aiming above a distant target to account for the projectile's ballistic drop over distance
Distance markersHorizontal 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 boreThe vertical distance between the weapon's bore axis and the optic's optical axis
Holographic sightA non-magnified sight that projects a reticle onto a display window using holographic technology
Hook_SightThe Unity GameObject on a weapon prefab where sight attachment prefabs are instantiated
Scope overlayA full-screen texture rendered during ADS that simulates the view through a scope tube
TexelA single pixel of a texture map, analogous to a screen pixel but in texture coordinate space
Zoom multiplicativeThe magnification system where the Zoom value is divided into the base field of view to determine the effective ADS FOV