- Home /
OnPostprocessAllAssets :: On video import, how to update the render texture dimensions and video clip reference?
Hi all,
I recently started trying out editor scripts and thought of automating a couple of tasks so that some project updates become accessible to people who have minimal experience with Unity.
.
I have set up the project to display a 360 degree video using the skybox material and RenderTexture, and it works perfectly. What I am trying to do is add an editor script which triggers an update on the RenderTexture dimensions and the videoclip reference in the corresponding Video Player. I couldn't find any specific function to track the video import like there is for textures (OnPostprocessTexture) but I was able to get to the trigger part by using the OnPostprocessAllAssets function and checking for the asset path and the file extension in the path string.
The problem is that I can't get a reference to either the imported video or any of the hierarchy assets, specially since OnProcessAllAssets is a static function which just adds to my woes. My question is that:
Is what I am trying to do even possible?
If it is then what would be the correct way to go about it?
.
Thanks in advance
Dev