Ejemplo n.º 1
0
    void Awake()
    {
        instance = this;

        SetTargetTranformations();
        Hide();
    }
Ejemplo n.º 2
0
    private void RevealPreview()
    {
        TestVideoPreview test = TestVideoPreview.instance;

        SwapVideoContent(test);

        // If we already have a video selected, we assume we just want to swap content and
        if (isPreviewActive)
        {
            if (test.corBounce == null)
            {
                test.corBounce = StartCoroutine(test.Bounce());
            }

            return;
        }

        isPreviewActive = true;

        // This is only called the first time you reveal the UI.
        // The return statement above prevents this from repeating.
        StartCoroutine(
            test.Reveal(
                transform.position
                , transform.localScale
                )
            );
    }
Ejemplo n.º 3
0
 private void SwapVideoContent(TestVideoPreview test)
 {
     // Probably want to swap a video clip instead of a material colour.
     // Basically you need to send a VideoClip to the VideoPreview's UI.
     test.GetComponent <Renderer>().material.color = GetComponent <Renderer>().material.color;
 }