void OnEnable() { _width = serializedObject.FindProperty("_width"); _height = serializedObject.FindProperty("_height"); _preset = serializedObject.FindProperty("_preset"); _frameRate = serializedObject.FindProperty("_frameRate"); var presets = FFmpegPreset.GetValues(typeof(FFmpegPreset)); _presetLabels = presets.Cast <FFmpegPreset>(). Select(p => new GUIContent(p.GetDisplayName())).ToArray(); _presetOptions = presets.Cast <int>().ToArray(); }
void OnEnable() { _width = serializedObject.FindProperty("_width"); _height = serializedObject.FindProperty("_height"); _preset = serializedObject.FindProperty("_preset"); _frameRate = serializedObject.FindProperty("_frameRate"); _recordAudio = serializedObject.FindProperty("_recordAudio"); #if FFMPEG_OUT_CUSTOM_FILE_NAME _fileName = serializedObject.FindProperty("_fileName"); #endif var presets = FFmpegPreset.GetValues(typeof(FFmpegPreset)); _presetLabels = presets.Cast <FFmpegPreset>(). Select(p => new GUIContent(p.GetDisplayName())).ToArray(); _presetOptions = presets.Cast <int>().ToArray(); }
protected override void OnEnable() { base.OnEnable(); if (target == null) { return; } _preset = serializedObject.FindProperty("preset"); // Preset labels var presets = FFmpegPreset.GetValues(typeof(FFmpegPreset)); _presetLabels = presets.Cast <FFmpegPreset>(). Select(p => new GUIContent(p.GetDisplayName())).ToArray(); _presetOptions = presets.Cast <int>().ToArray(); }
void OnEnable() { _colorStreamWidth = serializedObject.FindProperty("_colorStreamWidth"); _colorStreamHeight = serializedObject.FindProperty("_colorStreamHeight"); _depthStreamWidth = serializedObject.FindProperty("_depthStreamWidth"); _depthStreamHeight = serializedObject.FindProperty("_depthStreamHeight"); _preset = serializedObject.FindProperty("_preset"); _frameRate = serializedObject.FindProperty("_frameRate"); _colorStreamURL = serializedObject.FindProperty("_colorStreamURL"); _depthStreamURL = serializedObject.FindProperty("_depthStreamURL"); _crfValue = serializedObject.FindProperty("_crfValue"); _maxBitrate = serializedObject.FindProperty("_maxBitrate"); var presets = FFmpegPreset.GetValues(typeof(FFmpegPreset)); _presetLabels = presets.Cast <FFmpegPreset>(). Select(p => new GUIContent(p.GetDisplayName())).ToArray(); _presetOptions = presets.Cast <int>().ToArray(); }