Forum rules - please read before posting.

Comments

  • sry, false link: 

    its a video i downloaded from youtube per keepvid.com im mp4-format. this usually works with unity and is also shown in the preview.
  • edited August 2015
    I also had problems playing a movie. The file should be inside the Resources folder, or, on iOS, can be linked from a server.
    Now I'm using this script on an empty gameobject to play the movie:

    using UnityEngine;
    using System.Collections;

    public class playMovie : MonoBehaviour {

    public AC.ActionListAsset actionToRunAfter;
    public string url = "http://www.yoursite.com/yourvideo.mov";

    // Use this for initialization
    void Start () {
    Debug.Log ("Trying to play movie!");
    StartCoroutine(PlayStreamingVideo(url));
    }

    private IEnumerator PlayStreamingVideo(object URL) {
    Handheld.PlayFullScreenMovie((string)URL, Color.white, FullScreenMovieControlMode.Full, FullScreenMovieScalingMode.AspectFill);
    yield return new WaitForEndOfFrame();
    yield return new WaitForEndOfFrame();
    Debug.Log("Video playback completed.");
    AC.AdvGame.RunActionListAsset(actionToRunAfter);
    }
    }

    hope this helps!
  • edited August 2015
    It could well be a Unity error, since the black screen suggests that AC has at least found the file to play back.

    The method to play movies varies depending on your device.  What platform are you building to, and does the problem only occur in builds or in the editor as well?
  • edited August 2015
    i only tried in the editor. 

    the only warning i get when starting ist: material not set

    "No material set
    UnityEngine.Debug:LogWarning(Object)
    AC.ActionMovie:Run() (at C:/Users/Benjamin/Documents/Arch101_3d/Assets/AdventureCreator/Scripts/Actions/ActionMovie.cs:80)
    AC.<RunAction>c__Iterator1:MoveNext() (at C:/Users/Benjamin/Documents/Arch101_3d/Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:206)
    UnityEngine.MonoBehaviour:StartCoroutine(String, Object)
    AC.ActionList:ProcessAction(Int32) (at C:/Users/Benjamin/Documents/Arch101_3d/Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:172)
    AC.ActionList:ProcessActionEnd(ActionEnd, Int32) (at C:/Users/Benjamin/Documents/Arch101_3d/Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:313)
    AC.ActionList:EndAction(Action) (at C:/Users/Benjamin/Documents/Arch101_3d/Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:263)
    AC.<RunAction>c__Iterator1:MoveNext() (at C:/Users/Benjamin/Documents/Arch101_3d/Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:242)
    UnityEngine.MonoBehaviour:StartCoroutine(String, Object)
    AC.ActionList:ProcessAction(Int32) (at C:/Users/Benjamin/Documents/Arch101_3d/Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:172)
    AC.ActionList:ProcessActionEnd(ActionEnd, Int32) (at C:/Users/Benjamin/Documents/Arch101_3d/Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:313)
    AC.ActionList:EndAction(Action) (at C:/Users/Benjamin/Documents/Arch101_3d/Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:263)
    AC.<RunAction>c__Iterator1:MoveNext() (at C:/Users/Benjamin/Documents/Arch101_3d/Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:242)
    UnityEngine.MonoBehaviour:StartCoroutine(String, Object)
    AC.ActionList:ProcessAction(Int32) (at C:/Users/Benjamin/Documents/Arch101_3d/Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:172)
    AC.ActionList:BeginActionList(Int32, Boolean) (at C:/Users/Benjamin/Documents/Arch101_3d/Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:150)
    AC.ActionList:Interact() (at C:/Users/Benjamin/Documents/Arch101_3d/Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:100)
    AC.SceneSettings:RunCutsceneOnStart() (at C:/Users/Benjamin/Documents/Arch101_3d/Assets/AdventureCreator/Scripts/Game engine/SceneSettings.cs:112)
    "

    That´s basically my setup:


    Do you maybe have an sample video file which i can try?
  • You will need to supply a material within the Play on material field.

    For some reason, Unity makes it especially difficult to play a movie on desktop platforms - and you can only play the movie as a texture on a material.

    You will have to create a Plane / Quad in your scene, position it so that it spans the FOV of the camera, and assign it a custom material (a default unlit textured should be all you need).  Then assign that same material in the Action's slot - the movie will play on that material, and in turn play it full-screen on your Plane/quad.
  • edited August 2015
    ok, got it now, hoped for it to be simpler since the play-movie-thing would be really nice to work just with AC.
    Wouldn´t it be possible to somehow implement it with GUI_Texture_fullscreen? Not the best coder here...

    Other problem: Movie is running, but doesn´t wait until finish, just switches directly to the next action.
    Why?
    Could it be because my player is moving at the beginning of the scene?

    Thx
  • Of course - AC tries to make things as simple as possible, but it's still contstrained by Unity.  I shall look into your GUITexture suggestion, though - thanks.

    I can't say for why it won't wait until finish - the code is correct - but if it's not working, try unchecking "Wait until finish" and instead use an Engine: Pause game Action afterwards that pauses the game by the clip's duration time.
  • ok, already thought of it, but thought maybe i forgot something.

    Anyhow, AC is really great! i tried some other creators for some time (not unity) and i am really happy about AC since it also implements greatly with unity itself.

    GREAT WORK GUYS&GIRLS!

    our games may never be good enough to reach the frontpage but we still enjoy working with AC :) 
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.