public void _Before()
    {
        // Setup cube
        cube = GameObject.CreatePrimitive(PrimitiveType.Cube);
        cube.AddComponent <ObjectRotation>();

        // Camera setup
        camObj = new GameObject("Camera");
        camObj.AddComponent <Camera>();
        camObj.tag = "MainCamera";
        camObj.transform.Translate(0, 0, -3);
        camObj.transform.LookAt(cube.transform);

        // Light setup
        light = new GameObject("Light");
        Light l = light.AddComponent <Light>();

        l.type = LightType.Directional;

        // Recorder setup
        recorderObj                = new GameObject("Recorder");
        recorder                   = recorderObj.AddComponent <VimeoRecorder>();
        recorder.encoderType       = EncoderType.MediaEncoder;
        recorder.defaultResolution = Vimeo.Recorder.Resolution.x540p;
        recorder.realTime          = true;
        recorder.recordMode        = RecordMode.Duration;
        recorder.recordDuration    = 5;
        recorder.privacyMode       = VimeoApi.PrivacyModeDisplay.OnlyPeopleWithPrivateLink;
        recorder.openInBrowser     = false;

        System.DateTime dt = System.DateTime.Now;
        recorder.videoName = "(Unity " + Application.unityVersion + ")";

        uploaded = false;
    }
예제 #2
0
    public void _Before()
    {
        publisherObj = new GameObject();

        recorder  = publisherObj.AddComponent <VimeoRecorder>();
        publisher = publisherObj.AddComponent <VimeoPublisher>();
        publisher.Init(recorder);
    }
예제 #3
0
    public void Throw_Error_If_Old_Unity_Version()
    {
        UnityEngine.TestTools.LogAssert.Expect(LogType.Error, new Regex(" Recording is only avaialabe in 2017.2 or higher"));
        GameObject    recorderObj = new GameObject();
        VimeoRecorder r           = recorderObj.AddComponent <VimeoRecorder>();

        r.Start();
        UnityEngine.GameObject.DestroyImmediate(recorderObj);
    }
예제 #4
0
    public void _Before()
    {
        // Recorder setup
        recorderObj                = new GameObject("Recorder");
        recorder                   = recorderObj.AddComponent <VimeoRecorder>();
        recorder.encoderType       = EncoderType.MediaEncoder;
        recorder.defaultResolution = Vimeo.Recorder.Resolution.x540p;
        recorder.realTime          = true;
        recorder.recordMode        = RecordMode.Duration;
        recorder.recordDuration    = 5;

        System.DateTime dt = System.DateTime.Now;
        recorder.videoName = "(Unity " + Application.unityVersion + ")";

        recorder.Start();
    }
예제 #5
0
    public void _Before()
    {
        // Recorder setup
        recorderObj                = new GameObject("Recorder");
        recorder                   = recorderObj.AddComponent <VimeoRecorder>();
        recorder.encoderType       = EncoderType.MediaEncoder;
        recorder.defaultResolution = Vimeo.Recorder.Resolution.x540p;
        recorder.realTime          = true;
        recorder.recordMode        = RecordMode.Duration;
        recorder.recordDuration    = 5;

        System.DateTime dt = System.DateTime.Now;
        recorder.videoName = "(Unity " + Application.unityVersion + ")";

#if !UNITY_2017_3_OR_NEWER
        UnityEngine.TestTools.LogAssert.Expect(LogType.Error, new Regex("Recording is only avaialabe in 2017.2 or higher"));
#endif

        recorder.Start();
    }
예제 #6
0
    public void _Before()
    {
        // Camera setup
        camObj = new GameObject("Camera");
        camObj.AddComponent <Camera>();
        camObj.transform.Translate(0, 0, -3);

        // Light setup
        light = new GameObject("Light");
        Light l = light.AddComponent <Light>();

        l.type = LightType.Directional;

        // Recorder Setup
        recorderObj = new GameObject("Video Recorder");
        recorder    = recorderObj.AddComponent <VimeoRecorder>();
        recorder.OnUploadComplete += OnUploadComplete;
        recorder.videoName         = "AVPro Movie Capture (" + Application.platform + " " + Application.unityVersion + ")";
        recorder.privacyMode       = VimeoApi.PrivacyModeDisplay.OnlyPeopleWithPrivateLink;
        recorder.encoderType       = EncoderType.AVProMovieCapture;

        // AVPro setup
        movieCapture                         = recorderObj.AddComponent <RenderHeads.Media.AVProMovieCapture.CaptureFromScreen>();
        movieCapture._stopMode               = StopMode.SecondsEncoded;
        movieCapture._stopSeconds            = 10;
        movieCapture._useMediaFoundationH264 = true;

        recorder.avproEncoder = movieCapture;

        // Screen setup
        screenObj = GameObject.CreatePrimitive(PrimitiveType.Cylinder);
        screenObj.AddComponent <ObjectRotation>();

        camObj.transform.LookAt(screenObj.transform);

        uploaded = false;
    }
예제 #7
0
 public void _Before()
 {
     obj      = new GameObject();
     encoder  = obj.AddComponent <EncoderManager>();
     recorder = obj.AddComponent <VimeoRecorder>();
 }