Example #1
0
    public void SetVisibleChildrenAsTarget()
    {
        targets = null;
        MeshRenderer[] meshRenderers = GetComponentsInChildren<MeshRenderer>() as MeshRenderer[];

        if( meshRenderers.Length > 0 ) {
            targets = new VJModifierTarget[meshRenderers.Length];
            for (int i = 0; i < meshRenderers.Length; ++i) {
                targets[i] = new VJModifierTarget();
                targets[i].gameObject = meshRenderers[i].gameObject;
                targets[i].octerb = Random.Range(0, 100);
            }
        }

        multiple = (targets != null && targets.Length > 0);
    }
Example #2
0
    public void SetVisibleChildrenAsTarget()
    {
        targets = null;
        MeshRenderer[] meshRenderers = GetComponentsInChildren <MeshRenderer>() as MeshRenderer[];

        if (meshRenderers.Length > 0)
        {
            targets = new VJModifierTarget[meshRenderers.Length];
            for (int i = 0; i < meshRenderers.Length; ++i)
            {
                targets[i]            = new VJModifierTarget();
                targets[i].gameObject = meshRenderers[i].gameObject;
                targets[i].octerb     = Random.Range(0, 100);
            }
        }

        multiple = (targets != null && targets.Length > 0);
    }