1234567891011121314151617181920212223242526 |
- 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;
- }
- }
|