gml_pragma


描述

The gml_pragma function affects how the given target compiles your code and should be called with the different commands to further optimise the final compilation of your project. These commands are effectively pre-processed before the game is compiled and so the function can be placed anywhere in your project and it will still be processed before the game is fully compiled. The available commands are as follows:

NOTE: The first argument to the gml_pragma function must be a compile time string constant and not a variable.


语法:

gml_pragma(command, [optional...]);

参数 描述
command A string with one of the commands listed below.
[optional] Some of the available commands require an optional argument or arguments. These are explained below for each command.


返回:

N/A(无返回值)


例如:

gml_pragma("forceinline");

The above example code will force the script where it is used to be in-lined on compile.