Пример #1
0
    /// <summary>
    /// Start recording a GIF
    /// </summary>
    /// <remarks>
    /// This will keep a buffer of 50 frames (default). The frames are overwritten until <c>StopRecording</c> gets called.
    /// </remarks>
    public void StartRecording()
    {
        InitializeManager();

#if UNITY_IOS && !UNITY_EDITOR
        startRecording();
#elif UNITY_ANDROID && !UNITY_EDITOR
        AndroidWrapper.StartRecording();
#endif
        _isRecording = true;
    }
Пример #2
0
    /// <summary>
    /// Start customized GIF recording.
    /// </summary>
    /// <remarks>
    /// This will keep a buffer of 50 frames (default). The frames are overwritten until <c>StopRecording</c> gets called.
    /// </remarks>
    /// <param name="config">Config to customize the recording.</param>
    public void StartRecording(MegacoolRecordingConfig config)
    {
        config.SetDefaults();

        InitializeManager();

#if UNITY_IOS && !UNITY_EDITOR
        startRecordingWithConfig(config.RecordingId, new Crop(new Rect(0, 0, 0, 0)), config.MaxFrames, config.FrameRate, config.PeakLocation, config.OverflowStrategy.ToString());
#elif UNITY_ANDROID && !UNITY_EDITOR
        AndroidWrapper.StartRecording(config);
#endif
        _isRecording = true;
    }