Method DestroyUniversal
- Namespace
- Gamelogic.Extensions
- Assembly
- Gamelogic.Extensions.dll
DestroyUniversal(Object)
Destroys given object using either Object.Destroy, or Object.DestroyImmediate, depending on whether Application.isPlaying is true or not. This is useful when writing methods that is used by both editor tools and the game itself.
[Version(2, 5, 0)]
public static void DestroyUniversal(Object obj)
Parameters
obj
ObjectThe object to destroy.