mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-15 07:00:10 -05:00
20 lines
409 B
C#
20 lines
409 B
C#
using UnityEngine;
|
|
|
|
namespace VRMShaders
|
|
{
|
|
public static class UnityObjectDestroyer
|
|
{
|
|
public static void DestroyRuntimeOrEditor(UnityEngine.Object o)
|
|
{
|
|
if (Application.isPlaying)
|
|
{
|
|
UnityEngine.Object.Destroy(o);
|
|
}
|
|
else
|
|
{
|
|
UnityEngine.Object.DestroyImmediate(o);
|
|
}
|
|
}
|
|
}
|
|
}
|