Actor.GetComponentSafe
Declaration#
public void GetComponentSafe(Action<T> callback)Parameters#
| Name | Description |
|---|---|
| callback | Action to call with result |
Description#
Get component (threadsafe)
Usage#
Example
using NullSave.GDTK;using UnityEngine;
public class CodeSample : MonoBehaviour{
Transform target;
public void ExampleMethod(Actor target) { target.GetComponentSafe<Transform>(Callback); }
private void Callback(Transform t) { target = t; }
}