Skip to content

Commit

Permalink
actor component
Browse files Browse the repository at this point in the history
  • Loading branch information
tenowg committed Apr 28, 2024
1 parent 94a39f7 commit fe1c35f
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to the "unrealsnippets" extension will be documented in this

## Changes

- 4/27/2024
- Added ActorComponent (ue-actor-component-header, ue-actor-component-code)

- 4/26/2024
- Started adding Mass AI snippets
- Fragment (mass-fragment)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "UnrealSnippets",
"description": "",
"publisher": "tenowg",
"version": "0.5.3",
"version": "0.6.0",
"pricing": "Free",
"engines": {
"vscode": "^1.85.0"
Expand Down
57 changes: 57 additions & 0 deletions snippets/general-file.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,62 @@
"body": [
"#include \"$TM_FILENAME_BASE.h\"",
]
},
"Actor_Component_header": {
"prefix": "ue-actor-component-header",
"isFileTemplate": true,
"body": [
"#pragma once",
"",
"#include \"CoreMinimal.h\"",
"#include \"Components/ActorComponent.h\"",
"#include \"$TM_FILENAME_BASE.generated.h\"",
"",
"UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )",
"class $0_API U$TM_FILENAME_BASE : public UActorComponent",
"{",
" GENERATED_BODY()",
"",
"public:",
" // Sets default values for this component's properties",
" U$TM_FILENAME_BASE();",
"",
"protected:",
" // Called when the game starts",
" virtual void BeginPlay() override;",
"",
"public:",
" // Called every frame",
" virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;",
"",
"};"
]
},
"Actor_Component_code": {
"prefix": "ue-actor-component-code",
"isFileTemplate": true,
"body": [
"#include \"$TM_FILENAME_BASE.h\"",
"",
"// Sets default values for this component's properties",
"U$TM_FILENAME_BASE::U$TM_FILENAME_BASE()",
"{",
" // Set this component to be initialized when the game starts, and to be ticked every frame. You can turn these features",
" // off to improve performance if you don't need them.",
" PrimaryComponentTick.bCanEverTick = true;",
"}",
"",
"// Called when the game starts",
"void U$TM_FILENAME_BASE::BeginPlay()",
"{",
" Super::BeginPlay();",
"}",
"",
"// Called every frame",
"void U$TM_FILENAME_BASE::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)",
"{",
" Super::TickComponent(DeltaTime, TickType, ThisTickFunction);",
"}"
]
}
}

0 comments on commit fe1c35f

Please sign in to comment.