Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: volcank on February 25, 2024, 02:47:26 AM

Title: Find Closest Object and then Smooth look at enemy not working in mobile!
Post by: volcank on February 25, 2024, 02:47:26 AM
Hi I am making a game where the player should auto find the closest enemy and starts shooting at it and then switch to next enemy depending on disrance etc. The thing is it is working in unity editor but not working in mobile. I am using Control Freak to control in mobile but I don't think that's the main issue. I tried other actions like Find Closest 2 or Find Closest Agent from eco system still not working. You can find the FSMs I set up below.

Here is the link to the gameplay I have in unity editor which is. supposed to work in mobile. I recorded it from my screen in unity editor.


I really would appreciate your help.

Best


Title: Re: Find Closest Object and then Smooth look at enemy not working in mobile!
Post by: Alex Chouls on March 01, 2024, 08:37:46 AM
I’m not seeing anything there that shouldn’t work on mobile. Are you using Get/Set Property actions anywhere else? These are often the cause of different behavior on mobile when Unity strips the build. You can force Unity to keep classes/methods when building for mobile using a link.xml file (there’s also a linker wizard you can download on the forums to help build the xml file).
Title: Re: Find Closest Object and then Smooth look at enemy not working in mobile!
Post by: volcank on March 10, 2024, 05:16:09 AM
Hi Alex,
Thank you for the advice. I don't think I am using get/set property anywhere else in my project. But I will double check that again. Also sorry for late reply.

Best