RE-SS3D / SS3D

Space Station 3D, another remake of SS13, but with an extra D.
https://ss3d.space/
252 stars 139 forks source link

Allow disabling Destroy logic on Actors #1372

Closed stilnat closed 9 months ago

stilnat commented 9 months ago

Summary

This PR add a flag to allow Actors to not call the logic in OnDestroy if wanted. This is necessary for holograms. Holograms are destroyed when placing them, and the OnDestroy callback of unity executes. Issue is, sometimes the logic in OnDestroy should not be called as the components are inactive and some references might be not set up properly.

you can test it by adding this in the item script, and see that no log appears in console when destroying holograms

protected override void OnDestroyed() { base.OnDestroyed(); Debug.Log("destroy item logic"); }

PR checklist

Pictures/Videos)

Testing

Networking checklist

Changes

Related issues/PRs