Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


implicit operator int

Implicitly converts an EntityId to an integer.
Read time 1 minuteLast updated 8 days ago

Definition

  • Type: Operator
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule

implicit operator int(Int3)

Implicitly converts an
EntityId
to an integer.
public static implicit operator int(EntityId entityId)

Parameters

entityId

The
EntityId
to convert.

Returns

Type

Description

intThe integer representation of the
EntityId
.

Remarks

This conversion exists for backward compatibility with code that contains object identifiers in integers. The resulting integer is an implementation detail: don't inspect its bits, check its sign, or sort by it.

implicit operator EntityId(EntityI)

Implicitly converts an integer to an
EntityId
.
public static implicit operator EntityId(int intValue)

Parameters

intValue

The integer value to convert.

Returns

Type

Description

EntityIdAn
EntityId
representing the specified integer value.

Remarks

This conversion exists for backward compatibility with code that contains object identifiers in integers. Use
EntityId
values directly where possible.