Пример #1
0
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();

        if (GUILayout.Button("Add point"))
        {
            ins.AddPoint(Vector3.zero, Quaternion.identity);
            ins.GetPointsInWorld();

            var Childs = ins.transform.GetComponentsInChildren <Transform>();
            for (int i = 1; i < Childs.Length; i++)
            {
                var child = Childs[i];
                child.gameObject.name = string.Format("point Position ({0})", i);
            }

            Debug.Log("Testing Testing");
        }

        if (GUILayout.Button("Clear Data"))
        {
            ins.point.Clear();
        }
    }