TargetGameObject
How do I use Target Game Object
Below are practical examples compiled from projects for learning and reference purposes
Featured Snippets
Line | Code | Ex.. |
---|---|---|
13 | if (this.TargetGameObject == null || string.IsNullOrEmpty(this.TargetMethod)) | 1 |
File name: OnClickCallMethod.cs
Copy
11 public void OnClick()
12 {
13 if (this.TargetGameObject == null || string.IsNullOrEmpty(this.TargetMethod))
14 {
15 Debug.LogWarning(this + " can't call, cause GO or Method are empty.");
16 return;
17 }
18
19 this.TargetGameObject.SendMessage(this.TargetMethod);
20 }
TargetGameObject 121 lượt xem
Gõ tìm kiếm nhanh...