在此项目中,您能够访问使用 Visual Effect Graph 制作的示例场景和效果。
您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

34 行
1.3 KiB

#if VFX_OUTPUTEVENT_CINEMACHINE_2_6_0_OR_NEWER
using UnityEngine;
using UnityEngine.VFX.Utility;
namespace UnityEditor.VFX.Utility
{
[CustomEditor(typeof(VFXOutputEventCinemachineCameraShake))]
class VFXOutputEventCinemachineCameraShakeEditor : VFXOutputEventHandlerEditor
{
SerializedProperty m_CinemachineImpulseSource;
SerializedProperty m_AttributeSpace;
protected override void OnEnable()
{
base.OnEnable();
m_CinemachineImpulseSource = serializedObject.FindProperty(nameof(VFXOutputEventCinemachineCameraShake.cinemachineImpulseSource));
m_AttributeSpace = serializedObject.FindProperty(nameof(VFXOutputEventCinemachineCameraShake.attributeSpace));
}
public override void OnInspectorGUI()
{
serializedObject.Update();
EditorGUI.BeginChangeCheck();
DrawOutputEventProperties();
EditorGUILayout.PropertyField(m_CinemachineImpulseSource);
EditorGUILayout.PropertyField(m_AttributeSpace);
HelpBox("Attribute Usage", "- position : position of the camera impulse\n- velocity : impulse velocity");
if (EditorGUI.EndChangeCheck())
serializedObject.ApplyModifiedProperties();
}
}
}
#endif