Forum rules - please read before posting.

VideoPlayer on Switch

I know that the Switch isn't officially supported by AC, but I'm baffled as to how it won't play videos using Unity's Video Player via AC.

If I simply add a Video Player component to a scene and set it to 'Play on awake' then it will play fine.

However, if I add a Engine > Play Movie Clip to an actionlist it gives me a 'This option not available on Switch' error as below:

Is there any way around this?

Comments

  • The Switch platform previously had issues with video playback, IIRC. The restriction was added to avoid script compilation issues.

    To remove it, open up AC's ActionMovie.cs file, and replace the top of the script:

    #if !UNITY_SWITCH
    #define ALLOW_VIDEO
    #endif
    

    with:

    #define ALLOW_VIDEO
    

    Does it work? If so, I shall remove the restriction.

  • Thanks, Chris. I'm now getting the following error in the console, which is blocking me from previewing:

    Assets\AdventureCreator\Scripts\Actions\ActionMovie.cs(371,21): error CS0246: The type or namespace name 'RememberVideoPlayer' could not be found (are you missing a using directive or an assembly reference?)

    I also had the same issue with:

    Assets\AdventureCreator\Scripts\Save system\FileFormat\FileFormatHandler_Json.cs(136,20): error CS0246: The type or namespace name 'VideoPlayerData' could not be found (are you missing a using directive or an assembly reference?)

    Switch does now make 100% use of Unity's Video Player if that helps. I'm being careful what I say here because of the NDA.

  • Make similar changes to the top of the RememberVideoPlayer and FileFormatHandler_Json scripts.

  • Thanks Chris.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.