How to add elements from a List of another class to another List (C#)

I’m in Unity2D

I have “Script A” with List ListA with “x” elements (childs of GameObject). This Script is attached to the FatherGameObject.

Then I have “Script B” with List ListB with (NO) elements on it. This Script is attached to the Father of the FatherGameObject mencioned.

I want to add the elements from “List A” To “List B” or in someway link the both Lists.

P.D I need to declare it in the Public Class Script B as i need “List B” in lots of others methods.

The two Scripts are Mono Behavior.

Please and Thanks.

public GameObject FatherGameObject;


List<YourType> ListB = FatherGameObject.GetComponent<Script A>().ListA

Of course, you need to replace ListA with its accessor if it is private.