Event meshWillBeDestroyed
Invoked when this ProBuilderMesh is deleted.
In the Editor, when a ProBuilderMesh is destroyed it also destroys the sharedMesh that it finds with the parent GameObject. To override the default behavior, subscribe to onDestroyObject. When onDestroyObject has a subscriber, ProBuilder invokes it instead of cleaning up unused meshes by itself.
Namespace: UnityEngine.ProBuilder
Assembly: Unity.ProBuilder.dll
Syntax
public static event Action<ProBuilderMesh> meshWillBeDestroyed
Returns
Type | Description |
---|---|
Action<ProBuilderMesh> |