SetActive() not working on child objects

I’m trying to enable/disable weapon models on my player model when he picks up a new weapon. This is the code that doesn’t seem to work.

void exchangeWeapon(int newWeapon){

		if (newWeapon == 1) {
			Debug.Log ("Changing weapons to "+m4a1_equip.gameObject.name);
			ak47_equip.gameObject.SetActive(false);
			m4a1_equip.gameObject.SetActive(true);

			ak47_loot.gameObject.SetActive(true);
			m4a1_loot.gameObject.SetActive(false);
		}
		if (newWeapon == 2) {
			Debug.Log ("Changing weapons to "+ak47_equip.gameObject.name);
			ak47_equip.gameObject.SetActive(true);
			m4a1_equip.gameObject.SetActive(false);

			ak47_loot.gameObject.SetActive(false);
			m4a1_loot.gameObject.SetActive(true);
		}
		if (newWeapon == 0) {
			ak47_equip.gameObject.SetActive(false);
			m4a1_equip.gameObject.SetActive(false);
		}
	}

There are no errors when this code is executed. I’m disabling the model on the ground and enabling the model in the player’s hands. The Debug.Logs execute properly, so I know the code is being run and the gameObject is being read correctly. The model on the ground disappears/reappears properly. The gun model in the player’s hands doesn’t appear, though.

Without errors, I’m a bit lost as to what I’ve done wrong.

In general, setActive on child objects works fine. I toggle them on/off, mostly like you’re doing, all the time.

Pause the game and check the Inspector. Focus on one gun (sometimes they both don’t work, but for different reasons.)

Look at the “held” nug. Is it set active? If so, it will still be inactive if any parents are – maybe an empty parent is inactive. Click everything to make sure it can be visible. Unchild it (if needed) and double-click to it. Maybe it’s visible but 50 meters above you by mistake.

If it’s not active, make the variable public (stop and run it again) and click to find it. Maybe m4a1_equip is also set to the ground object. Check the loot’s are set up correctly (and not aimed at the held guns by mistake.)

If it’s all hooked-up correctly and still not being made active, maybe code elsewhere is messing it up. Comment out a bunch of lines, put the SetActive’s in Start if needed. Check for other SetActives.

In my case…
check if scale, width, height… etc of any parent or parent’s parent is not 0 while playing
check any other condition of rect transform is properly set while playing

If any one of them is not properly set then it wouldn’t work properly too.
Parent object must be set enough with the settings in order to process whats in the children