Skip to main content

Actor.GetComponentInChildrenSafe

Declaration#

public void GetComponentInChildrenSafe(Action<T> callback)

Parameters#

NameDescription
callbackAction to call with result

Description#

Get components in children (threadsafe)

Usage#

Example
using NullSave.GDTK;using UnityEngine;
public class CodeSample : MonoBehaviour{
    Transform target;
    public void ExampleMethod(Actor target)    {       target.GetComponentInChildrenSafe<Transform>(Callback);    }
    private void Callback(Transform t)    {        target = t;    }
}