Why enemyObj.transform.parent = transform?

Hello there, Can someone to explain me why enemyObj.transform.parent = transform; ?
Explain logic … enemyObj.transform.parent I understand that okay object is move to parrent but why = transform ?

Thanks a lot

Transform alone mean the transform component of the object on which your script is attached.

See: https://docs.unity3d.com/ScriptReference/Transform.html

Privacy & Terms