コード例 #1
0
    void Awake()
    {
        // not the best of soulution, but will go with the adhoc approach for now
        mouseClickDetection = FindObjectOfType <MouseClickDetection>();

        if (mouseClickDetection == null)
        {
            Debug.LogError("mouseClickSelection NOT FOUND!!!");
        }

        // set the child gameobject with the name "AxisControl"
        axisControl = transform.Find("AxisControl");
        if (axisControl == null)
        {
            Debug.LogError("Child(AxisControl) not found");
        }
    }
コード例 #2
0
 // TODO : I see no use of this as of now, maybe delete later
 public void SetUp(MouseClickDetection inMouseClickDetection)
 {
     mouseClickDetection = inMouseClickDetection;
     selectedGameObject  = mouseClickDetection.GetSelectedGameObject();
 }