面向组件编程之Unity 1.怎样获取脚本所在物体的各种组件,例如:transform/BoxCollider
usingSystem.Collections;usingSystem.Collections.Generic;usingUnityEngine;publicclassTransformFeng2:MonoBehaviour{TransformTs;BoxColliderTg;//UsethisforinitializationvoidStart(){#region//1.transformTs;