This commit is contained in:
Aaro Varis
2025-03-02 18:15:49 +02:00
parent 9295ba43e3
commit c11256f9a1

View File

@@ -199,6 +199,16 @@ namespace BoneSync.Sync.Components
return false;
}
private IEnumerator DespawnSyncable()
{
for (int i = 0; i < 3; i++)
{
gameObject?.SetActive(false);
yield return null;
}
yield break;
}
private void _DiscardSyncable(bool force, bool despawn)
{
@@ -226,10 +236,7 @@ namespace BoneSync.Sync.Components
DestroyImmediate(this); // delete the component
if (despawn)
{
gameObject?.SetActive(false);
}
if (despawn) MelonCoroutines.Start(DespawnSyncable());
}
private void OnRegister()