34 lines
958 B
C#
34 lines
958 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class UISelectionEntry : MonoBehaviour
|
|
{
|
|
public Transform Target;
|
|
public TMPro.TextMeshProUGUI TargetName;
|
|
public Toggle Toggle;
|
|
public Button Button;
|
|
|
|
public void SetTarget(Transform t)
|
|
{
|
|
Target = t;
|
|
TargetName.text = t.name;
|
|
Toggle.isOn = true;
|
|
Toggle.onValueChanged.AddListener((value) => {
|
|
throw new NotImplementedException();
|
|
//CameraOrbit.RuntimeGizmo.RemoveTarget(t, true);
|
|
//Destroy(this.gameObject);
|
|
});
|
|
if (t.TryGetComponent(out ObjectContainer container))
|
|
{
|
|
Button.onClick.AddListener(() => {
|
|
throw new NotImplementedException();
|
|
//CameraOrbit.RuntimeGizmo.ClearTargets();
|
|
//CameraOrbit.RuntimeGizmo.AddTarget(t);
|
|
});
|
|
}
|
|
}
|
|
}
|