playMaker

Author Topic: Unity Cloud Build, iOS, FSM Template Issues  (Read 973 times)

mrphilipjoel

  • Playmaker Newbie
  • *
  • Posts: 49
Unity Cloud Build, iOS, FSM Template Issues
« on: April 07, 2022, 03:43:43 PM »
Greetings,

I'm using PUN2 doing a multiplayer dice game.
I have a different PUN2 multiplayer game on iOS that I don't have any issues with.

But, on my dice game, I'm using lots of FSM templates.
It seems as if my FSM templates are not running on the iOS build.
They run fine in the editor, and on PC builds.

I'm not sure if a need to change a build setting, or what.

Anyone have any suggestions?

andyandyandy

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 63
Re: Unity Cloud Build, iOS, FSM Template Issues
« Reply #1 on: April 07, 2022, 07:56:02 PM »
Sorry dude. You ever though about using them as a game object prefab and just use "set fsm" states as a alternative?

mrphilipjoel

  • Playmaker Newbie
  • *
  • Posts: 49
Re: Unity Cloud Build, iOS, FSM Template Issues
« Reply #2 on: April 07, 2022, 09:47:12 PM »
Yeah. I was thinking about that earlier. Just moving my templates, into a regular FSM, and then calling the events that way.

But I would still love to know WHY templates aren't working on my cloud builds, so i can try to solve it.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7625
    • jinxtergames
Re: Unity Cloud Build, iOS, FSM Template Issues
« Reply #3 on: April 13, 2022, 10:36:23 PM »
Hi.
Which Unity/Playmaker version are you using.
I will ask Alex

mrphilipjoel

  • Playmaker Newbie
  • *
  • Posts: 49
Re: Unity Cloud Build, iOS, FSM Template Issues
« Reply #4 on: April 18, 2022, 04:36:51 PM »
Unity 2020.3.29f1
Playmaker 1.9.4

I'm also having an issue on iOS (also doing cloud build) that it is unable to get actor number using 'get player properties'. I even tried writing a custom action to only get the actor number and nothing else (to see if something else was bogging it down). But, even though logic works perfectly in editor, I can't get actor number on iOS build.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7625
    • jinxtergames
Re: Unity Cloud Build, iOS, FSM Template Issues
« Reply #5 on: April 18, 2022, 07:11:25 PM »
Hi.
Can you show the script on the custom action you made (to get actor only)

mrphilipjoel

  • Playmaker Newbie
  • *
  • Posts: 49
Re: Unity Cloud Build, iOS, FSM Template Issues
« Reply #6 on: April 20, 2022, 08:48:31 AM »
I just took the 'get player properties' action and removed everything that wasn't the actor. This action works in editor. But, not on iOS.


Code: [Select]
using Photon.Realtime;
using Photon.Pun;

namespace HutongGames.PlayMaker.Pun2.Actions
{
[ActionCategory("Photon")]
[Tooltip("Get built in and custom properties of a Photon player.")]
[HelpUrl("")]
public class PunGetLocalPlayerActorNumber : PunActionBase
    {

        [Tooltip("The Photon player")]
        [RequiredField]
        public PlayerReferenceProperty player;

[Tooltip("The player's ID")]
[UIHint(UIHint.Variable)]
public FsmInt actorNumber;

private Player _player;

public override void Reset()
{
            actorNumber = null;
}

        public override void OnEnter()
        {
            ExecuteAction();
            Finish();
        }

        void ExecuteAction()
        {
            _player = player.GetPlayer(this);

            if (_player == null)
            {
                return;
            }

            if (!actorNumber.IsNone) actorNumber.Value = _player.ActorNumber;

}

}
}

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7625
    • jinxtergames
Re: Unity Cloud Build, iOS, FSM Template Issues
« Reply #7 on: April 20, 2022, 10:44:34 AM »
Hi.
Hmm i cant see any reason.

is it supported for ios?

Also on the  if (_player == null) set a debug.Log and get the log file from the ios device.
or set a "Fail" event inside the (_player == null)  which can then show something on screen (connect to a state and use a Set Text For Example, or make a 'Error' Sound)

if it returns null there might be some issue with the PlayerReferenceProperty 

if its not null.


Also try to place outside a template, if it works then.

Another thing you can try is to copy everything inside the template and place in a new template.
But if it works on build i don't think that the template is the issue.