unity 3D 的脚本属性用法[AppleScript] 纯文本查看复制代码 script ponentMenu (“ Transform/Follow Transform ”) // CSharp [ponentMenu( “ Transform/Follow Transform ”)] 以下是具体说明(部分无关紧要的不翻译): ponentMenu (函数) 允许你从其他的“ Components ”菜单途径添加脚本(如果不使用 ponentMenu ponents->Scripts 下添加)。注意需 restart 起效。资源来自于狗刨学习网 ContextMenu 允许为脚本增加一组命令,该属性标记在函数上,而且必须是 non-stati c 函数。假设你为一个脚本 move 增加了一个 ContextMenu 属性的方法 Do somethine ,该方法作用是 。这个 move 脚本 attach 在一个 use r 身上。那么你选中 user 时,在 inspector 面板中对 ponent 右击, 就会发现一组命令,点击打印。这个属性一个有用之处是自动初始化。 ImageEffectOpaque Any Image Effect with this attribute will be rendered after opaque geometry but before transparent geometry. This allows for effects which extensively use the depth buffer (SSAO ect) to only affect opaque pixels. This Attribute can be used to reduce the amount of visual artifacts ina scene with post processing. ImageEffectTransformsToLDR When using HDR rendering it can sometime be desirable to switch to LDR rendering during ImageEffect rendering. Using this Attribute on an image effect will cause the destination buffer to be an LDR buffer, and switch the rest of the Image Effect pipeline into LDR mode. It is the responsibility of the Image Effect that this Attribute is associated to ensure that the output is in the LDR range. ExecuteInEditMode 默认脚本组件仅在 play mode 下执行。增加这组属性后,脚本的 callback functions 在 eidtor 下亦可执行。注意,调用频率不同于 Play Mode : Update 只发生在 Scene 中的一些东西变更。
unity3D的脚本属性用法 来自淘豆网m.daumloan.com转载请标明出处.