Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


explicitDivideByZeroChecks

When true, divisions by zero are actively validated in code generated by IL2CPP. When false, they are not.
Read time 1 minuteLast updated 4 days ago

Definition

  • Type: Property
  • Namespace: UnityEditor
  • Assembly: UnityEditor
public static bool explicitDivideByZeroChecks { get; set; }

Remarks

This setting is only supported for some closed platforms. On those platforms it's a configurable option in the platform build profile, and more information is available in the relevant platform-specific documentation.
Important: On the platforms that support this setting, it applies globally to all C# code. It's recommended to use the
[Il2CppSetOption]
attribute instead, which is supported on all platfoms and allows you to apply the equivalent behavior more restrictively to specific methods, classes, or assemblies. For more information, refer to IL2CPP runtime code checks in the Unity manual.