Im making a 3D fps game called “Tactical Warfare”
And right now im trying to add attachments,
but i need to find gameobjects that are in another gameobject
and put the in an array.
heres my current script im trying to do it
and primarySightsPath is a Transform.
if(Input.GetKeyDown("j")){
primarySightsPath = GameObject.Find(primaryGunObj.name + "Gun Animation Parent/Attachments/Slider/Sights").transform;
for(var attach : Transform in primarySightsPath){
primarySights.Push("attach.gameObject");
}
}