//--------------------------------------------------------
|
// [Author]: 第二世界
|
// [ Date ]: Friday, May 17, 2019
|
//--------------------------------------------------------
|
using UnityEngine;
|
using System.Collections;
|
using UnityEngine.UI;
|
|
namespace vnxbqy.UI
|
{
|
|
/// <summary>
|
/// 这个仅仅是给仙皇残魂用的
|
/// </summary>
|
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<UI3DModelShowSpecialNPC>();
|
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;
|
}
|
}
|
|
}
|
|
}
|