//-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Friday, May 17, 2019 //-------------------------------------------------------- using UnityEngine; using System.Collections; using UnityEngine.UI; namespace Snxxz.UI { /// /// 这个仅仅是给仙皇残魂用的 /// public class UI3DModelShowSpecialNPC : MonoBehaviour { [SerializeField] Transform m_StandPoint; public Transform standPoint { get { return m_StandPoint; } } static UI3DModelShowSpecialNPC showPlatform; public static void Display(GameObject model) { if (showPlatform == null) { var prefab = BuiltInLoader.LoadPrefab("UI3DModelShowSpecialNPC"); var instance = Instantiate(prefab); instance.transform.position = new Vector3(1000, 3000, 5000); showPlatform = instance.GetComponent(); showPlatform.gameObject.name = "UI3DModelShowSpecialNPC"; } model.transform.SetParentEx(showPlatform.standPoint, Vector3.zero, Quaternion.identity, Vector3.one); } public static void Dispose() { if (showPlatform != null) { DestroyImmediate(showPlatform); showPlatform = null; } } } }