using UnityEngine; using System.Collections; using System.Collections.Generic; public class Test : MonoBehaviour { public static Test Instance; public GameObject GameObject; public void Awake() { Instance = this; DontDestroyOnLoad(transform.parent.gameObject); } public void SetGo(Vector3 pos, Transform parent) { //GameObject.transform.SetParent(parent); //GameObject.transform.localPosition = pos; GameObject.transform.position = pos; } }