ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Unreal Snippets

by awforsythe ALL

A collection of Sublime Text 3 snippets for writing Unreal Engine 4 game code

Labels snippets, Unreal, UE4

Details

Installs

  • Total 2K
  • Win 1K
  • Mac 84
  • Linux 84
Dec 21 Dec 20 Dec 19 Dec 18 Dec 17 Dec 16 Dec 15 Dec 14 Dec 13 Dec 12 Dec 11 Dec 10 Dec 9 Dec 8 Dec 7 Dec 6 Dec 5 Dec 4 Dec 3 Dec 2 Dec 1 Nov 30 Nov 29 Nov 28 Nov 27 Nov 26 Nov 25 Nov 24 Nov 23 Nov 22 Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7
Windows 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 1 2 1 0 1 0 0 0 0 0 0 0 3 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Unreal Snippets

A collection of Sublime Text 3 snippets for writing Unreal Engine 4 game code.

Some of these snippets assume that your project's source modules follow the convention of splitting source files into Public and Private subdirectories.

Available Snippets

Project (.uproject)

  • uuproj - Boilerplate .uproject file (e.g. Project.uproject)

Module (C#)

  • umt - Define a project-level target rules file (e.g. Source/Project.Target.cs)
  • umb - Define a module-level build rules files (e.g. Source/ProjectCore/ProjectCore.Build.cs)
  • umh - Declare a module in its public header file (e.g. Source/ProjectCore/Public/ProjectCore.h)
  • umc - Define a module in its private cpp file (e.g. Source/ProjectCore/Private/ProjectCore.cpp)
  • umcp - Define the primary game module implementation (one per project)

Logging (C++)

  • ulh - Declare a module-level log category in a module-private header (e.g. Source/ProjectCore/Private/Log.h)
  • ulc - Define a module-level log category in a cpp file (e.g. Source/ProjectCore/Private/Log.cpp)
  • ull - Write a single UE_LOG line using the module-level log category
  • ulf - Write a single UE_LOG line at Fatal severity

Classes (C++)

  • uco - Declare a UObject subclass
  • ucc - Declare a UActorComponent subclass
  • uca - Declare an AActor subclass
  • ucs - Declare a UBlueprintFunctionLibrary subclass (i.e. a “statics” class)
  • uci - Declare a UInterface subclass with associated native interface

Macros (C++)

  • ume - Insert an export macro in a type definition

Properties (C++)

  • upc - Declare a component UPROPERTY (Visible/ReadOnly in “Components” category)
  • upe - Declare an editable UPROPERTY (Editable/ReadWrite in “” category)
  • upv - Declare a visible UPROPERTY (Visible/ReadOnly in “” category)

Functions (C++)

  • uff - Declare a BlueprintCallable member function
  • ufs - Declare a BlueprintCallable static function with a WorldContextObject parameter
  • ufi - Declare a pure virtual function in a native interface class
  • ufc - Declare a constructor that accepts a const FObjectInitializer reference (in a class header)
  • ufr - Define the implementation of GetLifetimeReplicatedProps (in an actor source file)

Creating a Project

Example setup steps for creating a new Unreal C++ project from scratch:

  • Create a root Unreal project directory: replace Project with your project name
  • Add Project.uproj, run uuproj, populate with primary module name (e.g. ProjectCore)
  • Add a Source directory
  • Within that directory, add Project.Target.cs, run umt, enter primary module name
  • Add ProjectEditor.Target.cs the same way, set Type to TargetType.Editor
  • If desired, add ProjectServer.Target.cs, set Type to TargetType.Server
  • Add a subdirectory for the primary module, e.g. ProjectCore
  • Within that directory, add ProjectCore.Build.cs, run umb
  • Add two subdirectories, Public and Private
  • Within Public, add ProjectCore.h, run umh
  • Within Private, add ProjectCore.cpp, run umcp
  • Within Private, add Log.h, run ulh
  • Within Private, add Log.cpp, run ulc

At this point, you should be able to build your project and open it with the version of UE4Editor that you've built against.