Version: 2022.2
言語: 日本語
public string ResolveAlias (string defaultLabel);
public string ResolveAlias (Search.SearchExpression expr, string defaultLabel);

パラメーター

defaultLabel If no exeuction frames are present this becomes the default alias to be resolved.
expr Default expression to look to resolve the alias. If null, use the runtime to resolve the alias.

戻り値

string Returns a resolved alias.

説明

Try to resolve an alias value using the SearchExpressionRuntime attached to this context. Each frame if asked to resolve a SearchExpression.alias.

[Description("Returns ids of current selection")]
[SearchExpressionEvaluator(SearchExpressionEvaluationHints.ThreadNotSupported)]
public static IEnumerable<SearchItem> SelectionIds(SearchExpressionContext c)
{
    var instanceIds = UnityEditor.Selection.instanceIDs;
    foreach (var id in instanceIds)
    {
        yield return SearchExpression.CreateItem(id, c.ResolveAlias("selected id"));
    }
}
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961