Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: blackant on November 29, 2021, 04:47:25 AM

Title: is getProperty.onUpdate high cost ?
Post by: blackant on November 29, 2021, 04:47:25 AM
Hi,

i'am trying to optimize my game with profiler, and noticed that this action is  looking a bit expensive in the garbage collector.
but i am a total noob in terms of performing, that why i said ... i'm trying...  ::)

regarding the screenshot, i can certainly find some other way to optimize my game and the way i use FSMs, and i wonder if using Get/Set property is higher cost than tipping a custom script that will refer directly to  the desirer object type ?

if (i can gain some fps)
{
     i'll spend some time writing more actions;
     then IllBeHappy();
     And then PlayersWillBeToo( :P);
}
Title: Re: is getProperty.onUpdate high cost ?
Post by: djaydino on November 29, 2021, 10:59:38 AM
Hi.
Get/Set property is mirroring scripts, therefore its slower than dedicated actions.

Something that can hit performance is for example having a lot of raycasts going on every frame.
Also Create/Destroy objects
Title: Re: is getProperty.onUpdate high cost ?
Post by: blackant on December 01, 2021, 02:59:18 AM
yeah, i can confirm, i have replaced the get/set property with my actions and it's working better.