Experimental: this API is experimental and might be changed or removed in the future.

AnimatorJobExtensions.BindSceneProperty

切换到手册
public static Experimental.Animations.PropertySceneHandle BindSceneProperty (Animator animator, Transform transform, Type type, string property);

参数

animator调用此方法所在的 Animator 实例。
transform目标 Transform
type Component 类型。
property要绑定的属性。

返回

PropertySceneHandle 表示新绑定的 PropertySceneHandle。

描述

Create a PropertySceneHandle representing the new binding on the Component property of a Transform in the scene.

您可以绑定尚不存在的属性。例如,您可以绑定稍后动态添加的 MonoBehaviour 上的属性。在这种情况下,您需要在 GameObject 上添加 MonoBehaviour 后使用 ResolveAllSceneHandles 手动解析句柄。

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961