Skip to main content

Actor.GetComponentSafe

Declaration#

public void GetComponentSafe(Action<T> callback)

Parameters#

NameDescription
callbackAction 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;    }
}