Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How to create a script for VHS player for player object to play videos stored in a cassette object?

Discussion in 'Scripting' started by semenkuzmin, Jan 14, 2022.

  1. semenkuzmin

    semenkuzmin

    Joined:
    May 4, 2020
    Posts:
    10
    I'm making a VR game in witch I need a VHS cassette player. Can't get an idea of how one separate object can access a video which is stored on another (cassette) object and play it on the world space screen?

    Please help!)
     
  2. GroZZleR

    GroZZleR

    Joined:
    Feb 1, 2015
    Posts:
    3,201
    Create a Cassette component with data for the video.
    Create a VCR component with a Play function that accepts a Cassette and plays the video.
    Call Play on the VCR component giving the currently held Cassette when the player interacts with it.
     
  3. semenkuzmin

    semenkuzmin

    Joined:
    May 4, 2020
    Posts:
    10
    That is the question! How the VCR component "accepts a Cassette and plays the video"? ))
     
  4. semenkuzmin

    semenkuzmin

    Joined:
    May 4, 2020
    Posts:
    10
    Finally, I found an answer by my self :cool: