Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


relatedGameObjectInstanceId

The instance ID of a related Unity Object.
Read time 1 minuteLast updated 12 days ago

Definition

Warning
Removed. relatedGameObjectInstanceId is obsolete. Use relatedGameObjectEntityId instead.
public int relatedGameObjectInstanceId { get; }

Remarks

Stores the ID of a related Unity Object. You can use this to find the name of a related Unity Object if the Profiler didn't capture the FrameDataView.UnityObjectInfo.name of the current Unity Object. Components might not have a defined name when a Scene loads, but the name will always evaluate to the same as the GameObject that the Component is assigned to. If the relatedInstanceId isn't zero, then use the GetUnityObjectInfo function to see more information about the related Unity Object.