Skip to content

Commit 548001f

Browse files
committed
Use sealed and internal keywords in script gen
1 parent 52155bc commit 548001f

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ This release tidies up this package, so it is consistent with other packages pub
2323
- Updated samples as they broke after changing class names and namespaces.
2424
- Updated script generation logic to accomodate namespace and naming changes.
2525
- Updated Documentation to include, namespace, menu item and renaming changes. Additionally, some information regarding addressables was added as well.
26+
- Updated Script Creator window to generate more restricted classes, with `sealed` and `internal` keywords instead of just `public`.
2627

2728
## [v2.2.0](https://github.com/chark/scriptable-events/compare/v2.1.0...v2.2.0) - 2022-08-04
2829

Editor/ScriptCreation/Templates/EditorTemplate.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace ${EDITOR_NAMESPACE}
44
{
55
[CustomEditor(typeof(${EVENT_NAME}))]
6-
public class ${EDITOR_NAME} : ScriptableEventEditor<${EVENT_ARG_NAME}>
6+
internal sealed class ${EDITOR_NAME} : ScriptableEventEditor<${EVENT_ARG_NAME}>
77
{
88
protected override ${EVENT_ARG_NAME} DrawArgField(${EVENT_ARG_NAME} value)
99
{

Editor/ScriptCreation/Templates/EventTemplate.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace ${EVENT_NAMESPACE}
77
menuName = ScriptableEventConstants.MenuNameCustom + "/${EVENT_MENU_NAME}",
88
order = ScriptableEventConstants.MenuOrderCustom + ${EVENT_MENU_ORDER}
99
)]
10-
public class ${EVENT_NAME} : ScriptableEvent<${EVENT_ARG_NAME}>
10+
internal sealed class ${EVENT_NAME} : ScriptableEvent<${EVENT_ARG_NAME}>
1111
{
1212
}
1313
}

Editor/ScriptCreation/Templates/ListenerTemplate.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace ${LISTENER_NAMESPACE}
66
ScriptableEventConstants.MenuNameCustom + "/${LISTENER_MENU_NAME}",
77
ScriptableEventConstants.MenuOrderCustom + ${LISTENER_MENU_ORDER}
88
)]
9-
public class ${LISTENER_NAME} : ScriptableEventListener<${EVENT_ARG_NAME}>
9+
internal sealed class ${LISTENER_NAME} : ScriptableEventListener<${EVENT_ARG_NAME}>
1010
{
1111
}
1212
}

0 commit comments

Comments
 (0)