• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GML Question on forceinline

Zhanghua

Member
When and Where should i call these functions:
Just once? or for Every Script?
gml_pragma("forceinline");
gml_release_mode(true);
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
gml_pragma("forceinline") is per-script, applies to YYC, and is generally something to use with care on scripts that are incredibly often-used.

gml_release_mode is global (can be ran once per game start) and changes between sets of functions that are used.
 

Zhanghua

Member
gml_pragma("forceinline") is per-script, applies to YYC, and is generally something to use with care on scripts that are incredibly often-used.

gml_release_mode is global (can be ran once per game start) and changes between sets of functions that are used.
TKS!
So I should write gml_pragma("forceinline") at every Scripte which I want to refine.
And the gml_release_mode , Just write it anywhere?
 

RyanC

Member
1. Yes.
2. Yes - so long as that code runs.
Any chance of a little help with this?
I've tried to use the gml_release_mode(true); function in various places in my project and it doesn't do anything.
When I test it on windows and also compiling an apk for android it will still show a reference to an undefined variable as an error message.
 

Zhanghua

Member
Any chance of a little help with this?
I've tried to use the gml_release_mode(true); function in various places in my project and it doesn't do anything.
When I test it on windows and also compiling an apk for android it will still show a reference to an undefined variable as an error message.
You should refine your code, cause the YOYO will reset the code to native form.
 
Top