Class BreakableObject
Small class that will handle replacing a GameObject with another when the CharacterData on the same GameObject reach health = 0. Used in game for barrels, swapping a normal model for a prefab made of multiple part with physics to simulate the barrel breaking.
Inheritance
System.Object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
BreakableObject
Namespace: CreatorKitCodeInternal
Assembly: Assembly-CSharp.dll
Syntax
[RequireComponent(typeof(CharacterData))]
public class BreakableObject : MonoBehaviour
Fields
BreakingAudioClip
Declaration
public AudioClip BreakingAudioClip
Field Value
Type | Description |
---|---|
UnityEngine.AudioClip |
DestroyedChild
Declaration
public GameObject DestroyedChild
Field Value
Type | Description |
---|---|
UnityEngine.GameObject |