GameObjectRecorder.BindComponent
Declaration
public void BindComponent(Component component);Параметры
| Параметр | Описание |
|---|---|
| компонент | Компонент для привязки. |
Описание
Добавление привязок для всех свойств компонента компонента.
using UnityEngine; using UnityEditor; using UnityEditor.Animations;
public class BindComponentScript : MonoBehaviour { void Start() { var recorder = new GameObjectRecorder(gameObject);
// Add bindings for all the properties of the Transform and BoxCollider components. recorder.BindComponent(transform); recorder.BindComponent(GetComponent<BoxCollider>()); } }