File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -49,9 +49,11 @@ public void SetActive (bool value) =>
4949 public void Destroy ( ) =>
5050 UnityEngine . Object . Destroy ( this . gameObject ) ;
5151
52- /// Sets the value a property to a Unity Component.
53- public void SetComponentProperty < UnityComponentType > ( ref UnityComponentType entityProperty ) =>
54- entityProperty = this . GetComponent < UnityComponentType > ( ) ;
52+ /// Gets a component on an enity and sets it's reference to a property.
53+ public void GetComponentToProperty < UnityComponentType > ( ref UnityComponentType entityProperty , bool includeChildren = false , bool includeInactive ) =>
54+ entityProperty = includeChildren == true
55+ ? this . GetComponentInChildren < UnityComponentType > ( includeInactive )
56+ : this . GetComponent < UnityComponentType > ( ) ;
5557
5658 /// Adds an asset to the entity.
5759 public UnityEngine . Object AddAsset ( UnityEngine . Object asset ) =>
You can’t perform that action at this time.
0 commit comments