AVideo Clip is an imported video file, which the Video Player component uses to play video content (and accompanying audio content, if the video also has sound). Typical file extensions for video files include .mp4, .mov, .webm, and .wmv.
When you select a Video Clip, the InspectorA Unity window that displays information about the currently selected GameObject, asset or project settings, allowing you to inspect and edit the values. More info
See in Glossary shows the Video Clip Importer, including options, preview, and source details. Click the Play button at the top-right of the preview to play the Video Clip, along with its first audio track.
To view the source information of a Video Clip, navigate to the preview pane at the bottom of the Inspector window, click the name of the Video Clip in the top-left corner, and select Source Info.
If transcode is disabled, the video file is used as is, meaning compatibility with the target platform must be verified manually (see documentation on video file compatibility for more information). However, choosing not to transcode can save time as well as avoid transformation-related quality loss.
The onboarding experience is an important aspect of any AR app. The main purpose is to let the user know how to use the App with straightforward information. Each application will have specific instructions, however, the initial steps (e.g. find a plane, place an object) are commonly used in any application.
There are no specific rules on how the onboarding experience needs to be, the important part is that the user needs to be informed, from the beginning, on what it needs to do to use the application (e.g. button to press, actions to perform).
One effective solution is to add overlaid videos and/or text to alert the user. Both uGUI and UIToolkit can be used for displaying and controlling the user interface. In this tutorial, we are going to use the new UIToolkit system.
The UIDocument Asset is used to effectively build the UI. In the Project panel, inside a new folder, Create -> UI Toolkit -> UI Document, give a unique name (e.g. Onboarding) and add the asset to the Source Asset of the UI Document GameObject. The Sort Order value is used to control the order of visualisation of multiple UI Document GameObject.
Before building the UI we need to prepare the Video Players used to control the onboarding AR videos. Import the findaplane.webm and taptoplace.webm in a subfolder of the Assets and inside the same subfolder create a RenderTexture named UXRenderTexture
Select the FindPanel again and Duplicate it (right click). Change its name to TapToPlace. Remove the Info element and change the Label -> Text from the Inspector panel in Tap to Place. In the Inspector panel select Display -> Display -> hide icon to hide the UI object
Finally, for the Parent, FindPlane and TapToPlace, in the Inspector panel select VisualElement -> Picking Mode -> Ignore. The Picking Mode Ignore allows us to click behind the UI and place the object on the detected surface.
Installation is a two-step process, firstly you need to download the Unity Assets (there are two versions of LeanTouch, the Free version is enough for our needs) from the Unity Store, to add it to your asset collection.
Double-click your AR Object Prefab to open it in Edit mode and Add Component. If you type in Lean you will see a long list of options. Our first one is Lean Selectable and we want to tick the Self Selected option - this simple makes sure our object is automatically selected and ready to touch.
Designing dashboards and charts in Unity can be very challenging without dedicated add-ons. A recent project, XCharts, takes away the most complex coding part leaving the user a flexible tool to design and customise different chart types with ease. Most of the charts are part of the package delivered with an MIT licence.
As XCharts is based on the uGUI system, it will create a new Canvas GameObject as a parent of the selected chart. By default, the Canvas GameObject is set to Screen Space. select the Canvas GameObject and in the Inspector panel change the Canvas -> Render Mode to World Space.
To dynamically change the data of the chart, we need to create a new C# script, named chartManager, and add this to the Canvas GameObject. As we are going to use the same MQTT feed used to control the dial, the script will be based on the mqttController used before with some minor changes:
All the parameters of the chart can be changed using scripting instead of the Inspector panel e.g. to change the line style of the data series 1 to Dashed -> lineChart.series[1].lineStyle.type = LineStyle.Type.Dashed;
This preview release offers Quest support for essential features such as passthrough, plane detection, device tracking, raycasting, and anchors. It also includes Quest-specific updates for samples like Simple AR, which demonstrates basic plane detection and raycasting, and Anchors, which demonstrate how to create an object that specifies the position and orientation of an item in a physical environment.
Imagine creating games where players can navigate their living rooms or offices while battling virtual enemies, or designing applications that overlay virtual objects onto real-world surfaces with unmatched precision. The possibilities are truly limitless.
Plane detection in AR Foundation opens up a realm of possibilities for developers seeking to create context-aware experiences for Meta Quest. With plane detection, your applications can analyze and interpret the physical environment, allowing virtual objects to interact intelligently with the real world.
The Unity XR team is continuously improving AR Foundation. As we carry on with development, we want to hear from you and would love to see what you build with these tools. Feel free to include the hashtag #unityARF when posting about your project on social media.
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
Both of these prefabs will play a video of your choosing, synchronized for everyone in your world. They won't loop - the graph turns off looping for now to get sync to work. If you want them to loop, turn on 'Loop' and remove the UdonBehaviour.
You don't have to use the "UdonSyncPlayer" Udon Behaviours. You can use just the VRC Video Player component if you don't need the videos synced in your world. You can also make your own Sync Graphs using the provided one as a starting point or you can make one from scratch.
Why would you choose one or the other?AVPro supports live streams on multiple platforms, like YouTube Live, Twitch, and some others! You'll need to make a graph that calls PlayURL on the Video Player to make this work. The Unity Video player does not support these live streams.
In addition, AVPro does not play in the editor - you'll need to Build & Test your world to see it working. Unity Video works in Play Mode in the Editor when using links that point directly to supported video file types like 'mp4' and 'webm'. Hosted services like YouTube and Vimeo will only work in the client.
An application that VRChat uses to resolve links into videos is also available on Android now, so previous workarounds aren't needed.In the past, some workarounds existed for advanced users, because Quest had no URL resolver.
A given user is only permitted to handle a new video player URL once every five seconds. This is a global limit across all video players. This applies to the default URLs as well as those set with LoadURL and PlayURL.
This also applies to late-joiners. If you have 2 video players running in your world, a late-joiner will see that they must send out two video requests. Unmanaged, they will attempt to do so simultaneously and will fail. In cases where you have more than one video player playing simultaneously in a world, you'll have to account for this.
You may want to consider looking into a "content delivery network" (CDN) to host your content. This is useful if you plan on your video being accessible for many users, or to be fast for many users across the world. CDNs will distribute your file across many servers worldwide to ensure that there is a source close to the viewer to ensure fast downloads.
We have tested Amazon Cloudfront and BunnyCDN. CDN services are usually paid services, but tend to be low-cost for bulk storage/transmission of data. However, due to their openness, they are not present in our allowlist and will require that users enable the "Allow Untrusted URLs" setting.
When encoding your videos, we strongly recommend uploading a web-optimized version. For .MP4 files, this option is also known as 'fast start'. It is a one-tick setting that makes a huge difference in the streamability of a self-hosted video file. Without fast start, you generally have to download the entire video file for it to play. With fast start enabled, you can stream the video file in chunks, and streams will begin immediately.
3a8082e126