Search Unity

How can i set up a trigger to play Video using an NPC ?

Discussion in 'UGUI & TextMesh Pro' started by Coception, Mar 22, 2017.

?

how can i add a video to one NPC and be able to trigger it just by just clicking the NPC?

  1. A

    0 vote(s)
    0.0%
  2. A

    0 vote(s)
    0.0%
Multiple votes are allowed.
  1. Coception

    Coception

    Joined:
    Mar 15, 2017
    Posts:
    3
    Hello every one, this is my very first post so i really want to say thank to Unity for this game community and thank you guys that make this plataform so strong!

    So i have been working in a game projets and right know i'm freeze!
    I can't found any information related to these subject,and it's simple actually but i'm a biginner so i would really appreciate if some one can help me out with some informations.

    This is te situation:

    I have my "game world" already created with some NPC around the world, but i want to include videos to the NPC's that means that the player gets close to de NPC, click on it and right after the click the npc the player can Watch a video that explains the NPC story and then after that the player would be able to come back to the 3D world and continue with his path.

    so that's my question, how can i add a video to one NPC and be able to trigger it just by just clicking the NPC?

    thank you so much
     
  2. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,775
    There are a few parts to this problem - let's break it down and see which parts you need help with.

    1) Detect when the user has clicked an NPC
    2) Have that function open a window/panel
    3) Have that panel play a video

    One thing I'll advise is that for #3, you should grab the Unity 5.6 beta. It includes a new VideoPlayer class which is far, far better in every way than the old MovieTexture class which you'd have to use otherwise.
     
  3. Coception

    Coception

    Joined:
    Mar 15, 2017
    Posts:
    3
    Thank you So much StarManta your answer give me a lots of informations to star doing this,