Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


IsDontDestroyOnLoad(ObjectFlags)

True if the object is marked as DontDestroyOnLoad; otherwise false.
Read time 1 minuteLast updated 13 days ago

Definition

Warning
Deprecated. This API is outdated and will be removed. Please check out the Memory Profiler Package (https://docs.unity3d.com/Packages/com.unity.memoryprofiler@latest/)
public static bool IsDontDestroyOnLoad(this ObjectFlags flags)

Parameters

The ObjectFlags to compute from (accessible via this).

Returns

Type

Description

boolReturns true if the object associated with this ObjectFlags is marked as DontDestroyOnLoad.