Check out example codes for "unity objects disappearing when close". It will help you in understanding the concepts better.

Code Example 1

// Select any GameObject and press F

Learn ReactJs, React Native from akashmittal.com