File tree Expand file tree Collapse file tree 5 files changed +23
-3
lines changed
Inputs/CBRenderTexture/Engine
Integrations/FrameCapturer/Recorders Expand file tree Collapse file tree 5 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,13 @@ public override void BeginRecording(RecordingSession session)
70
70
GameViewSize . GetGameRenderSize ( out screenWidth , out screenHeight ) ;
71
71
outputWidth = screenWidth ;
72
72
outputHeight = screenHeight ;
73
+
74
+ if ( cbSettings . m_PadSize )
75
+ {
76
+ outputWidth = ( outputWidth + 1 ) & ~ 1 ;
77
+ outputHeight = ( outputHeight + 1 ) & ~ 1 ;
78
+ }
79
+
73
80
break ;
74
81
}
75
82
@@ -78,9 +85,16 @@ public override void BeginRecording(RecordingSession session)
78
85
outputHeight = ( int ) cbSettings . m_RenderSize ;
79
86
outputWidth = ( int ) ( outputHeight * AspectRatioHelper . GetRealAR ( cbSettings . m_RenderAspect ) ) ;
80
87
88
+ if ( cbSettings . m_PadSize )
89
+ {
90
+ outputWidth = ( outputWidth + 1 ) & ~ 1 ;
91
+ outputHeight = ( outputHeight + 1 ) & ~ 1 ;
92
+ }
93
+
81
94
var size = GameViewSize . FindSize ( outputWidth , outputHeight ) ;
82
95
if ( size == null )
83
96
size = GameViewSize . AddSize ( outputWidth , outputHeight ) ;
97
+
84
98
GameViewSize . SelectSize ( size ) ;
85
99
break ;
86
100
}
Original file line number Diff line number Diff line change @@ -7,5 +7,6 @@ public class CBRenderTextureInputSettings : InputSettings<CBRenderTextureInput>
7
7
public EImageAspect m_RenderAspect = EImageAspect . x5_4 ;
8
8
public string m_CameraTag ;
9
9
public bool m_FlipVertical = false ;
10
+ public bool m_PadSize = false ;
10
11
}
11
12
}
Original file line number Diff line number Diff line change @@ -12,7 +12,9 @@ public class MP4RecorderSettings : BaseFCRecorderSettings
12
12
13
13
public override List < RecorderInputSetting > GetDefaultSourcesSettings ( )
14
14
{
15
- return new List < RecorderInputSetting > ( ) { ScriptableObject . CreateInstance < CBRenderTextureInputSettings > ( ) } ;
15
+ var settings = ScriptableObject . CreateInstance < CBRenderTextureInputSettings > ( ) ;
16
+ settings . m_PadSize = true ;
17
+ return new List < RecorderInputSetting > ( ) { settings } ;
16
18
}
17
19
}
18
20
}
Original file line number Diff line number Diff line change @@ -12,7 +12,9 @@ public class WEBMRecorderSettings : BaseFCRecorderSettings
12
12
13
13
public override List < RecorderInputSetting > GetDefaultSourcesSettings ( )
14
14
{
15
- return new List < RecorderInputSetting > ( ) { ScriptableObject . CreateInstance < CBRenderTextureInputSettings > ( ) } ;
15
+ var settings = ScriptableObject . CreateInstance < CBRenderTextureInputSettings > ( ) ;
16
+ settings . m_PadSize = true ;
17
+ return new List < RecorderInputSetting > ( ) { settings } ;
16
18
}
17
19
}
18
20
}
Original file line number Diff line number Diff line change 1
1
using System . IO ;
2
2
using UnityEngine ;
3
-
3
+ using UTJ . FrameCapturer . Recorders ;
4
4
5
5
namespace UnityEditor . FrameRecorder
6
6
{
@@ -12,6 +12,7 @@ static class FRPackager
12
12
static void GeneratePackage ( )
13
13
{
14
14
var rootPath = FRPackagerPaths . GetFrameRecorderRootPath ( ) ;
15
+ FrameCapturerPackagerInternal . GeneratePackage ( ) ;
15
16
16
17
string [ ] files = new string [ ]
17
18
{
You can’t perform that action at this time.
0 commit comments