scripts
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngine.UI
|
||||
{
|
||||
// Token: 0x02000065 RID: 101
|
||||
internal static class Misc
|
||||
{
|
||||
// Token: 0x06000374 RID: 884 RVA: 0x0001483C File Offset: 0x00012C3C
|
||||
public static void Destroy(Object obj)
|
||||
{
|
||||
if (obj != null)
|
||||
{
|
||||
if (Application.isPlaying)
|
||||
{
|
||||
if (obj is GameObject)
|
||||
{
|
||||
GameObject gameObject = obj as GameObject;
|
||||
gameObject.transform.parent = null;
|
||||
}
|
||||
Object.Destroy(obj);
|
||||
}
|
||||
else
|
||||
{
|
||||
Object.DestroyImmediate(obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000375 RID: 885 RVA: 0x00014895 File Offset: 0x00012C95
|
||||
public static void DestroyImmediate(Object obj)
|
||||
{
|
||||
if (obj != null)
|
||||
{
|
||||
if (Application.isEditor)
|
||||
{
|
||||
Object.DestroyImmediate(obj);
|
||||
}
|
||||
else
|
||||
{
|
||||
Object.Destroy(obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user