Open matrixjc122 opened 9 years ago
Pushed new branch 3-CanvasUI
In the future, the UIMain class provides a good place to generate the buttons on the fly. Use the worldXSignelton.ZombiKnownTypes and some button generative like this:
public void CreateButton(Transform panel ,Vector3 position, Vector2 size, UnityEngine.Events.UnityAction method)
{
GameObject button = new GameObject();
button.transform.parent = panel;
button.AddComponent
Write UIOnClickBehaviour.cs Implements OnClick() which is connected to its button representation at the Start(). Theroretically for each button a single script could be developed. In this case each Button needs a unique "canvas"-name so it can be identified using the "gameObject.name" attribute.