Use Sprite or Video command can not play video file from StreamingAssets.

145 views
Skip to first unread message

yaqin king

unread,
Jun 21, 2018, 2:05:28 AM6/21/18
to 宴ユーザーグループ
Unityの習熟度:初心者
宴のバージョン:3.3.8
UnityのバージョンとOS: Unity2018.1.0f2  Windows

Test1:
( Put file under Texture/Sprite folder, then use Resource Converter build StreamingAssets files. )
Set AdvEngine Starter load type to [Streaming Assets and Local Scenario]. 
When I use Sprite command the editor error log is:

Empty file: archive:/CAB-fc7de048ade3f40f3ab64cce2eb4cc92/CAB-fc7de048ade3f40f3ab64cce2eb4cc92.resource
VideoPlayer cannot play clip : E:/temp/UnityProject/UtageMovieTest/Assets/TestProject/Resources/TestProject/Texture/Sprite/op.mp4

Set back load type to [Local] can normal play video file.

Test2:
( Put file under Video folder, then use Resource Converter build StreamingAssets files. )
Set AdvEngine Starter load type to [Streaming Assets and Local Scenario]. 
When I use Video command the editor error log is:

Empty file: archive:/CAB-072a6a7ea3880efe48de11eba4ca4615/CAB-072a6a7ea3880efe48de11eba4ca4615.resource

VideoPlayer cannot play clip : E:/temp/UnityProject/UtageMovieTest/Assets/TestProject/Resources/TestProject/Video/op.mp4

Set back load type to [Local] can normal play video file.

All Sound and Bg/BgEvent resources works fine.


マッドネスラボ

unread,
Jun 21, 2018, 2:45:33 AM6/21/18
to 宴ユーザーグループ
[Streaming Assets and Local Scenario].
In this setting, it will not load from the Resources folder.
In the error path, loading from the Resources folder or lower is done.
This does not occur by default.
The cause of this is as follows.
· I use a special component such as AdvVideoLoadPathChanger
· The code of the file load has been rewritten, or it is proprietary extension.

yaqin king

unread,
Jun 21, 2018, 4:21:18 AM6/21/18
to 宴ユーザーグループ
As first post says I have been use Resource Converter build StreamingAssets files. 
The StreamingAssets folder structure like this (See image), the video file didn't played.
Maybe it is a common problem that video can not play in StreamingAssets mode. 

マッドネスラボ

unread,
Jun 21, 2018, 6:05:49 AM6/21/18
to 宴ユーザーグループ
That is probably a Unity bug.
It seems to be caused by Unity version and platform.
Please report to Unity and listen to the countermeasure.

There are other means.
You can change it to load from Resources instead of StreamingAssets so that only video is not using AssetBundle.
That component changes the load path of the video file.
AddComponent 'CustomLoadManager' and 'AdvVideoLoadPathChanger' to 'FileManger' as follows,
Please set the relative directory from Resources below to load video in 'AdvVideoLoadPathChanger''s 'RootPath'.


Reply all
Reply to author
Forward
0 new messages