🧰
Developer
  • ENGAGE SDK overview
  • Setting up the ENGAGE SDK
    • Registering as an ENGAGE developer
    • Setting up your local git repository
    • Installing the Unity Editor
    • Opening the ENGAGE SDK Unity project
    • Checking for SDK updates
    • Installing a platform build module
  • ENGAGE SDK project folders
  • General guidelines for 3D models
    • Optimizing 3D models
  • Locations
    • Guidelines for locations
    • Creating a new location
    • Building a location bundle
    • Testing a location locally on Windows
    • Configuring an object as a teleport target
    • Configuring the start position
    • Seats
      • Creating a seat
      • Using the summon to seat system
    • Network states
      • Network State Manager
      • Location Network States
      • Example network state configurations
        • Network state toggle object
        • Network state animation start/stop
        • Network state change animation
          • Creating an animation in Unity
          • Using Animator.Play(string)
          • Defining Animator transitions
          • Using Animator.SetTrigger(string)
        • Network state sync animation
        • Network state position toggle
        • Network state automatic door
        • Network state toggle skybox
        • Network state change materials
    • Adding grabable objects to a location
      • Resetting network objects with a button
      • Resetting network objects when out of bounds
    • Locations reference information
      • Basic requirements for a location
  • Immersive Effects (IFX)
    • Guidelines for IFX
    • Creating an IFX
    • Building an IFX bundle
    • Testing IFX locally on Windows
    • Specialized IFX
      • Animated IFX
        • Animation overrides
          • Legacy animations
          • Animator animations
          • Configuring additional Effect Life Run Control properties
      • Audio IFX
      • Interactive IFX
  • List of available prefabs
  • Available scripts
    • External Video Player
  • Profiling
  • Publishing to ENGAGE
    • Publishing checklists
    • Pushing files to your GitHub repository
  • AFX
    • Getting started
      • Changelog
    • AFX Graphs
      • Creating an AFX graph
      • Editing an AFX graph
      • Navigation and keyboard shortcuts
      • Adding an AFX graph to a game object
      • Nodes
      • Ports
      • Connections
      • Flows
        • Starting a flow
        • Using multiple flows
        • Chaining flows
        • Controlling flows
      • References
      • Using AFX Events
    • Networking AFX
      • Network State Modules
      • Ownership of networked objects
    • Animation curves
    • Node dictionary
      • ENGAGE
        • AFX Companion
          • Constant Collision
          • Grab Object
          • PathData
        • Networking
          • Network State Modules
        • Physics
        • Player
        • Seat
      • Events
        • Collision
        • Unity
        • AFX Events
      • Flow
      • Reference
      • Unity
        • Component
          • Animation
            • Set Parameters
          • Audio
            • Audio Reverb Zone
            • Audio Source
          • Collider
          • FX
          • Rendering
            • Camera
            • Light
            • Material
          • UI
        • Constraint
        • GameObject
        • Input
        • Physics
          • Raycast
            • Layer Mask
          • RigidBody
            • Joint
              • Hinge
              • Spring
          • Wheel Collider
        • Time
        • Transform
          • Get
          • Set
          • Space Switching
      • Variable
        • Bool
        • Comparison
        • Float
        • Int
        • List
        • Math
          • MathF
        • String
        • Unity Component
        • Vector
          • Quaternion
          • Vector2
          • Vector 3
            • Vector3 Math
    • Sample graphs
Powered by GitBook
On this page
  • Basic setup
  • Correctly orientating a plane
  • Playing a 360 video
  • External Video Player parameters
  1. Available scripts

External Video Player

PreviousAvailable scriptsNextProfiling

Last updated 2 days ago

You can use an External Video Player script to load a video from a URL and display it on an object. You can play videos from YouTube, and videos that you load through a direct URL to the file. For more information, refer to in the public documentation.

Basic setup

To set up an External Video Player script to display a 2D video on an object, complete the following steps:

  1. Add a Mesh Renderer component to the object, if it doesn't have one already.

  2. Add the External Video Player script to the object.

  3. In the External Video Player script parameters, in the Url field, enter the URL for the video that you want to play.

  4. Select the Play On Enable No Sync check box so that the video plays automatically when the location loads.

  5. Expand the Screen Renderers list, and then select the plus button to create a new slot.

  6. Drag the object from the Hierarchy panel to the Screen Renderers slot that you just added.

The video will begin to play when the location loads in ENGAGE. You can't test the video in Unity. For more information about the available parameters, see External Video Player parameters.

Correctly orientating a plane

If you use one of Unity's standard Plane 3D objects with an External Video Player script, and you want to ensure the correct orientation, change the coordinate system to Local, and rotate the plane so that the Z axis is pointing down and the X axis is pointing left as you face the screen.

Playing a 360 video

You can display a 360 video on the interior surface of a sphere. Any user inside the sphere will then be able to look around and be immersed in the 360 video. The setup for a 360 video is slightly different to the basic setup.

To set up an External Video Player script to display a 360 video, complete the following steps:

  1. Create an empty game object.

  2. Add an ENGAGE_360_Video_Photo_Sphere.FBX model as a child of the game object. You can find the model in the Assets > ENGAGE_CreatorSDK > Meshes folder.

  3. In the Inspector panel, set the X rotation of the ENGAGE_360_Video_Photo_Sphere model to 0.

  4. Add an External Video Player script to the parent game object.

  5. In the External Video Player script settings in the Inspector panel, enter the URL for the video that you want to play in the Url field.

  6. Select the Play On Enable No Sync check box so that the video plays automatically when the location loads.

  7. Expand the Screen Renderers list, and then select the plus button to create a new slot.

  8. Drag the ENGAGE_360_Video_Photo_Sphere object from the Hierarchy panel to the Screen Renderers slot that you just added.

  9. Turn off the Use Aspect Ratio Correction check box.

The video will begin to play when the location loads in ENGAGE. You can't test the video in Unity. For more information about the available parameters, see External Video Player parameters.

External Video Player parameters

Parameter
Description

Url

Required URL of the video to load.

Start Time Offset Seconds

Enter 0 to play the video from the start. Enter a value greater than 0 to begin playback at that point in the video.

Play On Enable No Sync

Recommended: Select to begin playback of the video when the script is enabled. This typically occurs when the location loads. When this parameter is turned on, the video plays independently for each user. The video begins to play when the object the script is attached to becomes active for the user. If you want to synchronize playback, you can use AFX or network states to synchronize activation of the object. However, there may still be slight differences between users, and users that join late will see the video play from the start.

When this parameter is turned off, the video will not play unless the video screen is uploaded to ENGAGE servers as an IFX, and ENGAGE staff apply additional configuration settings.

Volume

The audio volume. Enter a value between 0 (muted) and 100 (maximum volume).

Is Loop

Select to restart the video when it ends. If you clear this check box, videos loaded through a direct URL to the file will display the final frame of the video when they end. Note: This setting is not compatible with YouTube videos. When a YouTube video ends, it will display a view determined by YouTube. For example, the thumbnails for suggested videos to watch next.

Youtube Resolution

Deprecated

Is 3d

Select if the the video is 3D.

Screen Renderers

List of Mesh Renderers on which to display the video.

Screens 360

Use Aspect Ratio Correction

Important: Clear this option if you want to display a 360 video. Select this option to force the video to a target aspect ratio.

Target Aspect Ratio

Enter a float representation of a target aspect ratio. To calculate the value, divide the target width by the target height. For example, for a 16:9 aspect ratio, enter 1.7778.

Use Chroma

Select to use chroma keying, where the background is made transparent based on its color.

Use Custom Chroma Key Color

Select to define a specific chroma key color. You can then choose a color in the Custom Chroma Key Color parameter.

Custom Chroma Key Color

The color to be used for chroma keying, which will become transparent in the video.

Spatial Audio Option > Is Spatial Audio

Select to enable spatial audio, where the volume reduces as you get further away from the object.

Spatial Audio Option > Spatial Audio Range

The maximum range from the object at which audio will be heard. Measured in Unity units.

Additional Audio Points

A list of transforms that define the centres of additional audio zones. The audio from the video will be heard by a user when they're within the defined range of an audio point.

Canvas Renderers

Advanced feature. Contact ENGAGE for more information.

Note: You can add screens that play synchronized video from an external URL in the Experience Editor. For more information, refer to in the public documentation.

Not required to display 360 video. For more information, see .

Playing a 360 video
External URL screens
Supported video file types
Example video playing on a cube and a plane
Correctly orientated plane shown in its local coordinate system
360 video displayed using the External Video Player script. Video is by AirPano VR
Underwater Life, Marsa Alam, Egypt. 360 video in 8K.