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; 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) private void _DiscardSyncable(bool force, bool despawn)
{ {
@@ -226,10 +236,7 @@ namespace BoneSync.Sync.Components
DestroyImmediate(this); // delete the component DestroyImmediate(this); // delete the component
if (despawn) if (despawn) MelonCoroutines.Start(DespawnSyncable());
{
gameObject?.SetActive(false);
}
} }
private void OnRegister() private void OnRegister()