上海虹口龙之梦项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

34 lines
729 B

using UniRx;
using UnityEngine;
using UnityEngine.UI;
public class SourceNamePanel : UIView
{
public Button SetButton;
public InputField NameInput;
public GameObject SourceObject;
public override void Awake()
{
base.Awake();
//关闭
transform.Find("TitleBar/CloseButton").GetComponent<Button>().OnClickAsObservable()
.Subscribe(_ => Hide());
//Set
SetButton.OnClickAsObservable()
.Subscribe(_ => SetData());
}
private void SetData()
{
TextMesh Text = SourceObject.transform.Find("info").GetComponent<TextMesh>();
if (Text != null)
Text.text = NameInput.text;
Destroy(gameObject);
}
}