I have create assetbundle scene with vuforia ARCamera and an imagetarget. Now after loading the assetbundle scene, the scene is able to start with black screen. I have noticed that the ARCamera -> Camera -> BackgroundPlane->VideoMaterial(Instance) -> "Custom/VideoBackground" is not enabled. But when i enabled that manually, then the camera has enabled and showing live. Is there anyway to make that shader enabled after scene loads.
Picture-1: Before enabling and scene was opened from assetbundle
Picture-2: After enabling shader option
Here is a more complete answer for future reference:
You can solve this issue by attaching to script to said GameObject that enables the shader upon awake, it would look something like this:
This is assuming that you have a reference to the shader from a material already somewhere in your scene. If you do not you can as per Gowthy's comment add the shader to the "always included shaders" list. This can be found by going to the
Graphics
menu under Project Settings, and then scroll down to the "Always Included Shaders" section. Or you can add the shader to a "Resources" folder that gets included in the player build"