-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbase_component.snippet
75 lines (66 loc) · 2.04 KB
/
base_component.snippet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Base Component</Title>
<Author />
<Description>Base Lumberyard Component</Description>
<HelpUrl></HelpUrl>
<SnippetTypes />
<Keywords />
<Shortcut>compc</Shortcut>
</Header>
<Snippet>
<References />
<Imports />
<Declarations>
<Literal Editable="true">
<ID>ClassName</ID>
<Type />
<ToolTip />
<Default>ClassName</Default>
<Function />
</Literal>
<Literal Editable="true">
<ID>Namespace</ID>
<Type />
<ToolTip />
<Default>Namespace</Default>
<Function />
</Literal>
<Literal Editable="true">
<ID>Description</ID>
<Type />
<ToolTip />
<Default>Description</Default>
<Function />
</Literal>
</Declarations>
<Code Language="CPP">
<![CDATA[#include "StdAfx.h"
#include "$ClassName$.h"
#include "AzCore\Serialization\EditContext.h"
#include "AzCore\Math\Transform.h"
#include "AzCore\Component\TransformBus.h"
using namespace $Namespace$;
void $ClassName$::Reflect(AZ::ReflectContext* reflection) {
if (auto serializationContext = azrtti_cast<AZ::SerializeContext*>(reflection)) {
serializationContext->Class<$ClassName$>()
->Version(1);
if (auto editContext = serializationContext->GetEditContext()) {
editContext->Class<$ClassName$>("$ClassName$", "$Description$")
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
->Attribute(AZ::Edit::Attributes::Category, "$Namespace$")
->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("Game"));
}
}
}
void $ClassName$::Init() {
}
void $ClassName$::Activate() {
}
void $ClassName$::Deactivate() {
}]]></Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>