User Media Info
The User Media Info node allows you to to extract information from a User Media Texture. By utilizing this node, you can retrieve valuable data about the uploaded media, such as the index, upload status, and image resolution. Learn more about User Media Texture.
Input
Name | Data Type | Description |
---|---|---|
User Media Texture | Texture2D | Inputs a User Media Texture representing user-uploaded media. |
Output
Name | Data Type | Description |
---|---|---|
Index | Number | Returns the index of the User Media Texture in the media picker. |
Is Uploaded | Boolean | Returns true if the User Media Texture has been uploaded via the media picker, otherwise false. |
Image Resolution | Vec2 | Obtains the pixel width and height of the image to perform further calculations or adjustments. If no image has been uploaded, the resolution defaults to 0,0. |
Use the User Media Info Node
You can use the User Media Info node to retrieve information from a User Media Texture. First add a User Media Texture asset to the Assets panel. Then drag and drop the User Media Texture into the Visual Scripting panel. Connect the User Media Texture node to the User Media Info node's User Media Texture input.
You can use a Peek node to check how each output functions. Add and connect a Peek node to each of the User Media Info node's outputs, using the appropriate data type for each Peek node.
Peek: Number is connected to the User Media Info node's Index: Number output and corresponds to sequence. This is particularly relevant if you have multiple User Media Textures in your effect.
Peek: Boolean is connected to the User Media Info node's Is Uploaded: Boolean output and indicates whether a User Media Texture has been uploaded or not.
Peek: Vec2 is connected to the User Media Info node's Image Resolution: Vec2 output and retrieves the original resolution of the User Media Texture's selected camera roll image.