ドキュメント

Unity Engine

Unity Engine

resolver

The callback to invoke to resolve a picking index into a GameObject reference.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Property
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule
public HandleUtility.ResolvePickingCallback resolver { get; }

Remarks

The callback is invoked only if one of the picking indices rendered ends up being the topmost one under the mouse click position.
The callback is provided with a local picking index: the 0-based index that is offset from picking indices you used for rendering by subtracting RenderPickingArgs.pickingIndex.
The callback returns a GameObject reference from the given arguments. If you need more contextual data for the resolve callback to work, you can construct the callback as a lambda function from the render callback so that you can capture variables such as
pickingIndex
into it.
Returns null if the picking index doesn't resolve to any GameObject. This signals Unity to end the picking loop (for finding all objects under the mouse) and to start over.