完善编辑器
This commit is contained in:
@@ -16,11 +16,12 @@ public class UINpcItem : UIBaseItem
|
||||
public Button btnDel; //ɾ<><C9BE>
|
||||
public List<string> paths;
|
||||
public int itemIdx;
|
||||
public int pathIdx;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Awake()
|
||||
{
|
||||
public int pathIdx;
|
||||
|
||||
// Start is called before the first frame update
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
AddInputNameClickEvent(txtPos);
|
||||
AddInputNameClickEvent(txtPath, true);
|
||||
btnDel.onClick.AddListener(RemoveSelf);
|
||||
@@ -65,17 +66,18 @@ public class UINpcItem : UIBaseItem
|
||||
{
|
||||
base.SetItemPos(pos);
|
||||
txtPos.text = pos.ToString();
|
||||
}
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (sceneArea == null) return;
|
||||
DestroyImmediate(sceneArea.gameObject);
|
||||
}
|
||||
private void RemoveSelf()
|
||||
{
|
||||
DestroyImmediate(gameObject);
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (sceneArea == null) return;
|
||||
DestroyImmediate(sceneArea.gameObject);
|
||||
}
|
||||
|
||||
public bool CheckValid()
|
||||
{
|
||||
if (string.IsNullOrEmpty(txtID.text))
|
||||
|
||||
Reference in New Issue
Block a user