Skip to content

Pragmas

Ruslan Mustakov edited this page May 16, 2016 · 1 revision

nimue4 supports full set of specifiers for UFunctions and UProperties. However, it also provides useful shortcut pragmas that allow writing procedures in more idiomatic Nim style.

Method Pragmas

General Pragmas

  • constructor - this procedure is the constructor of the class
  • override - this method overrides method of the parent class
  • abstract - this method is abstract - it has no implementation and is intended to be implemented in subclasses
  • callSuper - call super's method before invoking this method's body
  • callSuperAfter - call super's method after invoking this method's body

UFunction Pragmas

Adding any of the following pragmas to a method makes it marked as UFunction:

  • category - category of the function in Blueprint editing tools
  • console - the function is runnable from game console
  • bpCallable - the function is callable from Blueprints. Optionally, specify name of the function as it will be displayed in Blueprint.
  • bpOverridable - the function can be overriden in Blueprint. Optionally, specify name of the function as it will be displayed in Blueprint. If this function is implemented in Blueprint, Blueprint behaviour will replace the behaviour implemented in code.
  • bpExtendable - the function can be extended in Blueprint. Optionally, specify name of the function as it will be displayed in Blueprint. This is different from bpOverridable in that, when the function is implemented in Blueprint, the code logic will be executed first, followed by the logic implemented in Blueprint.

Field Pragmas

UProperty Pragmas

Adding any of the following pragmas to a field makes it marked as UProperty:

  • category - category of the field in Blueprint and editor windows
  • config - the property value should be initialized from a config file
  • transient - the property should not be saved. zero-filled at load time. Optionally, specify name of the property as it will be displayed in Blueprint and editor windows.
  • bpReadOnly - the property is available in Blueprints as read-only. Optionally, specify name of the property as it will be displayed in Blueprint and editor windows.
  • bpReadWrite - the property can be read and modified in Blueprints. Optionally, specify name of the property as it will be displayed in Blueprint and editor windows.
  • editorReadOnly - the property is displayed in editor windows as read-only. Optionally, specify name of the property as it will be displayed in Blueprint and editor windows.
  • editorReadWrite - the property can be viewed and modified in editor windows. Optionally, specify name of the property as it will be displayed in Blueprint and editor windows.
  • bpDelegate - makes it possible to bind the delegate from Blueprints. Only available for dynamic delegates.
Clone this wiki locally