Unity rss
Unity forge
Object.DestroyImmediate Manual     Reference     Scripting  
Scripting > Runtime Classes > Object
Object.DestroyImmediate
  • Menu
  • Overview
  • Runtime Classes
  • Attributes
  • Enumerations
  • Editor Classes
  • Enumerations
  • History
  • Index
  • Object
  • All Members
  • Variables
  • hideFlags
  • name
  • Functions
  • GetInstanceID
  • ToString
  • Class Functions
  • Destroy
  • DestroyImmediate
  • DontDestroyOnLoad
  • FindObjectOfType
  • FindObjectsOfType
  • Instantiate
  • operator !=
  • operator ==
  • operator bool

static function DestroyImmediate (obj : Object, allowDestroyingAssets : bool = false) : void

Description

Destroys the object obj immediately. It is strongly recommended to use Destroy instead.

This function should only be used when writing editor code since the delayed destruction will never be invoked in edit mode. In game code it is recommended to use Object.Destroy instead. Destroy is always delayed (but executed within the same frame) Use this function with care since it can destroy assets permanently!


Unity3d Рекламный блок Unity3d