ドキュメント

Unity Engine

Unity Engine

GetExistingTag(string)

Get a handle to a existing defined tag.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public static TagHandle GetExistingTag(string tagName)

Parameters

tagName

The name of the tag to get a handle to.

Returns

Type

Description

TagHandleA new TagHandle for the existing tag.

Remarks

This method can only be used to get references to tags that were already defined. If you pass a tag name which is not already defined, it will throw an exception.
Additional Resources: GameObject.CompareTag.