till now if i want to hide a game object i just throw it in a position out of the screen, and if i want to show it again i just return it to its original place.
But i found that method is time consuming and not effective.
so is Any other method to hide and show gameobjects?
yes, the method gameObject.SetActive() takes a boolean and will set it active or inactive in your hierarchy without losing any of the settings it had prior to being set inactive. So gameObject.SetActive(false) sets it to be disabled while gameObject.SetActive(true) means that it is set to active.