文档

Unity Engine

Unity Engine

BindComponent(Component)

Adds bindings for all the properties of component.
阅读时间1 分钟最后更新于 1 个月前

Definition

public void BindComponent(Component component)

Parameters

component

The component to bind.

Examples

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>()); }}