private void Start()
    {
        instance = this;
        buttons  = new List <GameObject>(16);

        animTimeout      = 0.0f;
        shapeParamsStart = new float[6];
        shapeParamsMax   = new float[6];

        var pos = Vector3.zero;

        pos.z = -0.8f;
        pos.x = -3.1f;

        for (var i = 0; i < 20; i++)
        {
            CreateButton(i, pos);
            pos.x = pos.x + 0.73f;
        }

        CreateButton(20, new Vector3(10, 0, 5));
        CreateButton(21, new Vector3(10, 0, 3.8f));

        buttons[20].GetComponent <Renderer>().material             = new Material(Shader.Find("Unlit/Texture"));
        buttons[20].GetComponent <Renderer>().material.mainTexture = Resources.Load("sphereChecker") as Texture2D;

        buttons[21].GetComponent <Renderer>().material             = new Material(Shader.Find("Unlit/Texture"));
        buttons[21].GetComponent <Renderer>().material.mainTexture = Resources.Load("faceNormalsIcon") as Texture2D;

        OnButtonHit(0);
    }
Example #2
0
    private void Start()
    {
        instance = this;
        buttons = new List<GameObject>(16);

        animTimeout = 0.0f;
        shapeParamsStart = new float[6];
        shapeParamsMax = new float[6];

        Vector3 pos = Vector3.zero;
        pos.z = -0.8f;
        pos.x = -3.1f;

        for (int i = 0; i < 20; i++)
        {
            CreateButton(i, pos);
            pos.x = pos.x + 0.73f;
        }

        CreateButton(20, new Vector3(10, 0, 5));
        CreateButton(21, new Vector3(10, 0, 3.8f));

        buttons[20].GetComponent<Renderer>().material = new Material(Shader.Find("Unlit/Texture"));
        buttons[20].GetComponent<Renderer>().material.mainTexture = Resources.Load("sphereChecker") as Texture2D;

        buttons[21].GetComponent<Renderer>().material = new Material(Shader.Find("Unlit/Texture"));
        buttons[21].GetComponent<Renderer>().material.mainTexture = Resources.Load("faceNormalsIcon") as Texture2D;

        OnButtonHit(0);
    }