Yasiu Math 1
Collection of mathematic functions that help create game mechanics and procedural tools
Loading...
Searching...
No Matches
Usage of plugin

How to use plugin

Use in blueprints

  1. Right-click in the Blueprint graph.
  2. Search under the category Math / Yasiu.
  3. Select the function you need.

All functions from library are located under same category.

Functions accessible in BP

Squirrel RNG in Blueprints

Squirrel Object is not treated as ActorComponent, it has to be spawned from class using node CreateFromClass

  1. Right-click in the Blueprint graph.
  2. Search for "Spawn From Class"
  3. Put Squirrel 13 RNG into class parameter
  4. Promote object to variable to keep it alive
    • This is only required to keep object alive during gameplay and prevent UE from destroying it.

C++

To use math functions include this in your file:

// Functions in c++
#include "YasiuMathLib.h"
// Functions that use UE types

List of all functions for C++

Functions are grouped into namespaces: Name spaces


To access one of the RNG in C++, add include in your file:

#include "SquirrelRNG.h"
/* or */
#include "PCG_RNG.h"

It is UObject, so it must comply with unreal engine rules for objects lifecycle. Store ref value as any UObject if you want it to persist in game for longer.

/* Declaration in class, initialize this in CDO or during gameplay */
UPROPERTY()
TObjectPtr<USquirrel13_RNG> rng;
Random number generator. Seedable. Gives better random values than epic generator.
Definition SquirrelRNG.h:18