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