表示配置快捷方式系统的特定实例的管理器。
该管理器会维护可以使用 GetAvailableProfiles 获取的可用 配置文件的列表。某些方法要求传递的配置文件 ID 在调用时可供使用。使用 CreateProfile 创建新配置文件会使配置文件可供使用,而使用 DeleteProfile 删除配置文件会使配置文件不再可用。
它还维护对活动 配置文件的引用 (activeProfileId),它基于活动配置文件的快捷方式覆盖确定活动绑定。RebindShortcut 和 ClearShortcutOverride 要求活动配置文件不是只读(即,IsProfileReadOnly 对于 activeProfileId 返回 false
),因为这两个方法会修改活动配置文件。
最后,它会维护可以使用 GetAvailableShortcuts 获取的可用快捷方式的列表。采用快捷方式 ID 的所有方法要求该快捷方式可用。
activeProfileId | 获取或设置当前活动配置文件的 ID。 |
ClearShortcutOverride | 从活动配置文件中清除具有给定快捷方式 ID 的快捷方式的绑定。 |
CreateProfile | 使用给定配置文件 ID 创建新的配置文件。 |
DeleteProfile | 删除具有给定配置文件 ID 的配置文件。 |
GetAvailableProfileIds | 返回所有可用配置文件 ID 的枚举。 |
GetAvailableShortcutIds | 返回所有可用快捷方式 ID 的枚举。 |
GetShortcutBinding | 返回给定快捷方式 ID 的活动绑定。 |
IsProfileIdValid | 检查配置文件 ID 是否有效。 |
IsProfileReadOnly | 给定配置文件 ID 的配置文件是否为只读? |
IsShortcutOverridden | 活动配置文件是否覆盖给定快捷方式 ID 的绑定? |
RebindShortcut | 将给定快捷方式 ID 的快捷方式重新绑定到活动配置文件中的给定绑定。 |
RenameProfile | 重命名配置文件的 ID。 |
activeProfileChanged | 在活动配置文件的 ID 更改时引发。 |
shortcutBindingChanged | 当快捷方式覆盖在活动配置文件中更改时引发。 |
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.