-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,7 @@ _Hidden/ | |
_Hidden.meta | ||
obj/ | ||
libs/ | ||
Plugin/_build_* | ||
|
||
openh264-* | ||
FrameCapturer/*.csproj | ||
|
40 changes: 40 additions & 0 deletions
40
FrameCapturer/Assets/UTJ/FrameCapturer/Editor/MovieEncoderConfigDrawer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using UnityEngine; | ||
using UnityEditor; | ||
|
||
namespace UTJ.FrameCapturer | ||
{ | ||
[CustomPropertyDrawer(typeof(MovieEncoderConfigs))] | ||
class MovieEncoderConfigsDrawer : PropertyDrawer | ||
{ | ||
public override float GetPropertyHeight(SerializedProperty property, GUIContent label) | ||
{ | ||
return 0.0f; | ||
} | ||
|
||
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) | ||
{ | ||
var type = property.FindPropertyRelative("format"); | ||
EditorGUILayout.PropertyField(type); | ||
EditorGUI.indentLevel++; | ||
switch ((MovieEncoder.Type)type.intValue) | ||
{ | ||
case MovieEncoder.Type.Png: | ||
EditorGUILayout.PropertyField(property.FindPropertyRelative("pngEncoderSettings"), true); | ||
break; | ||
case MovieEncoder.Type.Exr: | ||
EditorGUILayout.PropertyField(property.FindPropertyRelative("exrEncoderSettings"), true); | ||
break; | ||
case MovieEncoder.Type.Gif: | ||
EditorGUILayout.PropertyField(property.FindPropertyRelative("gifEncoderSettings"), true); | ||
break; | ||
case MovieEncoder.Type.WebM: | ||
EditorGUILayout.PropertyField(property.FindPropertyRelative("webmEncoderSettings"), true); | ||
break; | ||
case MovieEncoder.Type.MP4: | ||
EditorGUILayout.PropertyField(property.FindPropertyRelative("mp4EncoderSettings"), true); | ||
break; | ||
} | ||
EditorGUI.indentLevel--; | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
FrameCapturer/Assets/UTJ/FrameCapturer/Editor/MovieEncoderConfigDrawer.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.