DoCompareTag
Description
Compare whether two tags are consistent. It is similar to Unity's CompareTag method.
Parameters
Param | Type | Description |
---|---|---|
_tag | String | Unique name |
Method
public void DoCompareTag(string _tag)
Example
caution
You must add the GameObjectRuntimeTag
script to the gameObject you will use for retrieval and enter Tag
into the GameObjectRuntimeTag.RuntimeTag
field.
private void OnLoad(){
RuntimeTagManager.GetRuntimeTagManager.GetGameObjectByTag("Player",out GameObject tmp_Player);
if(tmp_Player.GetComponent<IRuntimeTag>().DoCompareTag("Player")){
Debug.Log(tmp_Player.name);
}
}