Version: 5.3 (switch to 5.4b)
언어English
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

MonoBehaviour.OnJointBreak(float)

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

닫기

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

닫기

취소

Switch to Manual

Description

같은 게임오브젝트로 어태치된 조인트가 파괴되었을 때 호출됩니다.

조인트에 가해진 힘이 breakForce를 초과하면 조인트는 분리됩니다. 조인트를 분리하면 OnJointBreak가 호출되어 조인트에 적용된 브레이크 힘이 전달됩니다. OnJointBreak 후, 게임 오브젝트로부터 자동적으로 분리된 후 파기됩니다.

관련 항목: Joint.breakForce.

	function OnJointBreak(breakForce : float) { 
		Debug.Log("Joint Broke!, force: " + breakForce);
	}
using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void OnJointBreak(float breakForce) { Debug.Log("Joint Broke!, force: " + breakForce); } }