Enfusion Script API
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions
System

Enforce script system methods. More...

Classes

interface  FileHandle
 
interface  FileIO
 
interface  FilePath
 
interface  GameProject
 
interface  GameSessionStorage
 GameSessionStorage is used to store data for whole lifetime of game executable run. Here can be stored data which must survive scripts/addons reloading. More...
 
interface  ParseHandle
 
interface  RandomGenerator
 
interface  ScreenshotPixelData
 data for screenshot in RGBA8 format -> each channel has 8 bits and four channels are used (mostly RGB channels are important) thus size in bytes for one pixel is 4 More...
 
interface  System
 
interface  SearchResourcesFilter
 Object used for holding filtering params for ResourceDatabase.SearchResources() method. More...
 
interface  MemoryStatsSnapshot
 
interface  ProcessHandle
 Handle to a running process. More...
 
interface  BaseSystem
 To create a system, you just need to create a class which inherits from BaseSystem, and then specify GetSystemPoint to your need. More...
 
interface  SndSystem
 
interface  WorldController
 
interface  WorldControllerInfo
 
interface  WorldSystemInfo
 

Typedefs

typedef func SearchResourcesCallback
 Callback used for processing results from ResourceDatabase.SearchResources() method.
 
typedef func FindFilesCallback
 
typedef func ScreenshotCallback
 screenshot callback API, returned data are in RGBA8 format -> each channel has 8 bits and four channels are used thus size in bytes for one pixel is 4 and the int type can be used for simpler work
 

Enumerations

enum  EPlatform {
  EPlatform.WINDOWS , EPlatform.LINUX , EPlatform.XBOX_ONE , EPlatform.XBOX_ONE_S ,
  EPlatform.XBOX_ONE_X , EPlatform.XBOX_SERIES_S , EPlatform.XBOX_SERIES_X , EPlatform.PS4 ,
  EPlatform.PS5 , EPlatform.UNKNOWN
}
 
enum  FileAttribute {
  FileAttribute.DIRECTORY , FileAttribute.HIDDEN , FileAttribute.READONLY , FileAttribute.COMPRESSED ,
  FileAttribute.ARCHIVE , FileAttribute.SYSTEM , FileAttribute.NOINDEXED , FileAttribute.ENCRYPTED ,
  FileAttribute.ISCREATOR , FileAttribute.INVALID
}
 File attributes. See FileDescription. More...
 
enum  FileMode {
  FileMode.READ , FileMode.OPENW , FileMode.WRITE , FileMode.APPEND ,
  FileMode.MASK , FileMode.FILEFLAGS_NO_PREREAD
}
 Mode for opening file. See FileSystem::Open. More...
 
enum  ESystemLocation { ESystemLocation.Both , ESystemLocation.Client , ESystemLocation.Server }
 
enum  ESystemPoint {
  ESystemPoint.FrameStartBegin , ESystemPoint.FrameStart , ESystemPoint.Frame , ESystemPoint.BeforeFixedFrame ,
  ESystemPoint.FixedFrame , ESystemPoint.AfterFixedFrame , ESystemPoint.AfterSimulation , ESystemPoint.BeforePhysics ,
  ESystemPoint.SimulatePhysics , ESystemPoint.PostSimulatePhysics , ESystemPoint.AfterPhysics , ESystemPoint.PostFrame ,
  ESystemPoint.BeforePostFixedFrame , ESystemPoint.PostFixedFrame , ESystemPoint.AfterPostFixedFrame , ESystemPoint.AfterPostSimulation
}
 

Functions

void SearchResourcesCallback (ResourceName resourceName, string exactPath="")
 
void FindFilesCallback (string fileName, FileAttribute attributes=0, string filesystem=string.Empty)
 
void ScreenshotCallback (ScreenshotPixelData data, int imageWidth, int imageHeight, int stride)
 

Detailed Description

Enforce script system methods.

Typedef Documentation

◆ FindFilesCallback

◆ ScreenshotCallback

screenshot callback API, returned data are in RGBA8 format -> each channel has 8 bits and four channels are used thus size in bytes for one pixel is 4 and the int type can be used for simpler work

example how to access pixel data on further c++ side:

for (int y = 0; y < height; y++)
{
    int const* row = (int const*) (((char const*) data) + stride);
    for (int x = 0; x < width; x++)
    {
        int pixel = row[x];
        ...
    }
}
Parameters
pixelspointer to pixels
widthwidth of image data
heightheight of image data
stridestride is offset to next row - it doesn't need to be same like image width due to GPU data alignment rules

◆ SearchResourcesCallback

Callback used for processing results from ResourceDatabase.SearchResources() method.

Enumeration Type Documentation

◆ EPlatform

enum EPlatform
Enumerator
WINDOWS 
LINUX 
XBOX_ONE 
XBOX_ONE_S 
XBOX_ONE_X 
XBOX_SERIES_S 
XBOX_SERIES_X 
PS4 
PS5 
UNKNOWN 

◆ ESystemLocation

Enumerator
Both 
Client 
Server 

◆ ESystemPoint

Enumerator
FrameStartBegin 
FrameStart 
Frame 
BeforeFixedFrame 
FixedFrame 
AfterFixedFrame 
AfterSimulation 
BeforePhysics 
SimulatePhysics 
PostSimulatePhysics 
AfterPhysics 
PostFrame 
BeforePostFixedFrame 
PostFixedFrame 
AfterPostFixedFrame 
AfterPostSimulation 

◆ FileAttribute

File attributes. See FileDescription.

Enumerator
DIRECTORY 

File is directory.

HIDDEN 

File is hidden.

READONLY 

File is read-only.

COMPRESSED 

File is from compressed archive.

ARCHIVE 

File is archived.

SYSTEM 
NOINDEXED 
ENCRYPTED 
ISCREATOR 

For consoles, it indicates, that the file is created by current user.

INVALID 

◆ FileMode

enum FileMode

Mode for opening file. See FileSystem::Open.

Enumerator
READ 

File is readonly.

OPENW 

File is just opened for write.

WRITE 

File is read-write. When do not exists, it's created.

APPEND 

File pointer is set to end of file.

MASK 
FILEFLAGS_NO_PREREAD 

Function Documentation

◆ FindFilesCallback()

void FindFilesCallback ( string  fileName,
FileAttribute  attributes = 0,
string  filesystem = string.Empty 
)

◆ ScreenshotCallback()

void ScreenshotCallback ( ScreenshotPixelData  data,
int  imageWidth,
int  imageHeight,
int  stride 
)

◆ SearchResourcesCallback()

void SearchResourcesCallback ( ResourceName  resourceName,
string  exactPath = "" 
)