playMaker

Author Topic: Action category disappears when switch platforms from Android [SOLVED]  (Read 748 times)

playmakertester

  • Full Member
  • ***
  • Posts: 211
It is quite strange that after importing this asset, the Cronos Action disappears from the Action list on iOS while the Cronos Action is present on Android.

Also, the Cronos Playmaker sample scene plays fine on Android, but when I switch to the iOS platform, I get this error and the Cronos Action disappears from the Action list.
Code: [Select]
Slider A: FSM: Slider Time: MissingAction: Could Not Create Action: ScaleGlobalClockTime (Maybe the script was removed?)
UnityEngine.Debug:LogError(Object, Object)

I would like to know the following
(1) Why does this happen?
(2) Is there a solution to this problem?

I tried with Unity 2019.4.6 and 21.1.1.
Playmaker 1.19.1p4
Cronos 3.7 MB 2.4.15

I've never encountered such a strange error before!!
« Last Edit: April 01, 2021, 11:35:49 AM by Alex Chouls »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Hi.
can you right click the action and edit or are you getting an error (while on Android platform)

i think the action is probably using a #IF UNITY_ANDROID
and therefor its not found when you go to ios platform.

its best to contact the author about this.


playmakertester

  • Full Member
  • ***
  • Posts: 211
Hi,

Yes, it can edit.
This is one sample of action making error
At head of code, it using #if CHRONOS_PLAYMAKER

Code: [Select]
#if CHRONOS_PLAYMAKER

using HutongGames.PlayMaker;

namespace Chronos.PlayMaker
{
[ActionCategory("Chronos")]
[Tooltip("Gets a base speed used by a timeline.")]
[HelpUrl("http://ludiq.io/chronos/documentation#Timeline")]
public class GetBaseSpeed : ChronosComponentAction<Timeline>
{
public enum Speed
{
Animator,
Animation,
Particle,
Audio,
Navigation,
NavigationAngular
}

[RequiredField]
[CheckForComponent(typeof(Timeline))]
public FsmOwnerDefault gameObject;

public Speed getSpeed;

[RequiredField]
[UIHint(UIHint.Variable)]
public FsmFloat storeValue;

public bool everyFrame;

public override void Reset()
{
gameObject = null;
getSpeed = Speed.Animator;
storeValue = null;
everyFrame = false;
}

public override void OnEnter()
{
DoAction();

if (!everyFrame)
{
Finish();
}
}

public override void OnUpdate()
{
DoAction();
}

private void DoAction()
{
if (!UpdateCache(Fsm.GetOwnerDefaultTarget(gameObject))) return;

switch (getSpeed)
{
case Speed.Animator:
storeValue.Value = timeline.animator.speed;
break;

case Speed.Animation:
storeValue.Value = timeline.animation.speed;
break;

case Speed.Particle:
storeValue.Value = timeline.particleSystem.playbackSpeed;
break;

case Speed.Audio:
storeValue.Value = timeline.audioSource.pitch;
break;

case Speed.Navigation:
storeValue.Value = timeline.navMeshAgent.speed;
break;

case Speed.NavigationAngular:
storeValue.Value = timeline.navMeshAgent.angularSpeed;
break;

default:
storeValue.Value = 0f;
break;
}
}
}
}

#endif

I looked at various other sites and found that the developer sold Bolt to Unity and is no longer maintaining Cronos.

If this is the case, could you please tell me how I can fix this code?

If Cronos can be used with Playmaker, I think more users will want to use Playmaker.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Hi.
On Player Settings you can try to add "CHRONOS_PLAYMAKER" on 'other settings/Scripting Define Symbols


playmakertester

  • Full Member
  • ***
  • Posts: 211
Hello.

I've tried it!
Oh my god... it now works on iOS!
Playmaker's support community is the best of any visual scripting tool for game developer!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Hi.
Just to be sure, try it in a build :)