A few things have happened since the last update:
* Virtual functions implemented:
This is how a uClass looks like now, you can mix ufuncs, nim funcs and virtual
funcs. It's the override block. For const there is a pragma that allows you to
specify them
uClass ANimCharacter of ACharacter:
(config=Game)
uprops(EditAnywhere, BlueprintReadOnly, Category = Input):
defaultMappingContext : UInputMappingContextPtr
(jumpAction, moveAction) : UInputActionPtr
defaults: # default values for properties on the cdo
capsuleComponent.capsuleRadius = 42
capsuleComponent.capsuleHalfHeight = 96
characterMovement.jumpZVelocity = 700
characterMovement.airControl = 0.5
characterMovement.maxWalkSpeed = 500
characterMovement.minAnalogWalkSpeed = 20
characterMovement.brakingDecelerationWalking = 2000
characterMovement.bOrientRotationToMovement = true
override: #virual funcs implemented like this in the dsl
proc setupPlayerInputComponent(playerInputComponent :
UInputComponentPtr) =
let pc = self.getPlayerController()
if pc.isNotNil():
let inputComponent =
ueCast[UEnhancedInputComponent](playerInputComponent)
pc.bShowMouseCursor = true
let subsystem =
getSubsystem[UEnhancedInputLocalPlayerSubsystem](pc).get()
subsystem.addMappingContext(self.defaultMappingContext, 0)
inputComponent.bindAction(self.jumpAction,
ETriggerEvent.Triggered, self, n"jump")
inputComponent.bindAction(self.jumpAction,
ETriggerEvent.Completed, self, n"stopJumping")
inputComponent.bindAction(self.moveAction,
ETriggerEvent.Triggered, self, n"move")
super(self, playerInputComponent)
ufuncs:
proc getPlayerController() : APlayerControllerPtr =
ueCast[APlayerController](self.getController())
proc move(value: FInputActionValue) =
let
movementVector = value.axis2D()
rot = self.getControlRotation()
rightDir = FRotator(roll: rot.roll, yaw: rot.yaw).getRightVector()
forwardDir = FRotator(yaw: rot.yaw).getForwardVector()
self.addMovementInput(rightDir, movementVector.x, false)
self.addMovementInput(forwardDir, movementVector.y, false)
Run
* New approach to bindings.
Redid how bindings are generated, now they can automatically fix cycles between
the modules and the user can select what to generate. They are also more atomic
to reduce comp times (between 3-5 seconds)
* New module system
Now it's possible to generate a module will be converted into a dll a hooked up
by NUE. This helps with comp times too as the project grows
* Initial work on parsing cpp: Alongside the new bindings, the cpp is now
traversed and if I uClass is in the traversed cpp (the entry point is the PCH)
then instead of creating a memory compatible type, NUE just import it. I want
to extend it to bind non reflection exposed functions
* POC of NimScript inside NUE (below a video, thanks to Beef for the help!)
<https://twitter.com/_jmgomez_/status/1632128374268108800>