Skip to content
This repository was archived by the owner on Feb 16, 2024. It is now read-only.

Commit af657ab

Browse files
committed
feature: Add OnJointBreakAsObservable() trigger.
The real implementation was already there. I only added the extension method to make it easier to access.
1 parent 1881557 commit af657ab

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.Component.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,5 +457,11 @@ public static IObservable<Unit> OnParticleTriggerAsObservable(this Component com
457457
#endif
458458

459459
#endregion
460+
461+
public static IObservable<float> OnJointBreakAsObservable(this Joint joint)
462+
{
463+
if (joint == null || joint.gameObject == null) return Observable.Empty<float>();
464+
return GetOrAddComponent<ObservableJointTrigger>(joint.gameObject).OnJointBreakAsObservable();
465+
}
460466
}
461-
}
467+
}

0 commit comments

Comments
 (0)