Playmaker Forum

PlayMaker Updates & Downloads => Share New Actions => Topic started by: Maart on February 10, 2022, 09:19:59 AM

Title: ApplicationGetAbsoluteUrl
Post by: Maart on February 10, 2022, 09:19:59 AM
I wanted to pass parameters trough an url with a webgl build so I needed the absolute url, here is the action


// (c) Copyright HutongGames, LLC 2010-2020. All rights reserved. 
// License: Attribution 4.0 International(CC BY 4.0)
/*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/

using UnityEngine;

namespace HutongGames.PlayMaker.Actions
{
   [ActionCategory(ActionCategory.Application)]
   [Tooltip("Get the Application Persistent Data Path")]
   public class ApplicationGetAbsoluteUrl : FsmStateAction
   {
      
      [RequiredField]
      [Tooltip("The Application Absolute Url")]
      [UIHint(UIHint.Variable)]
      public FsmString ApplicationAbsoluteUrl;


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

      public override void OnEnter()
      {
         ApplicationAbsoluteUrl.Value = Application.absoluteURL;

         Finish();
      }
   }
}
Title: Re: ApplicationGetAbsoluteUrl
Post by: djaydino on February 10, 2022, 09:33:22 AM
Hi.
Thanks for sharing.

You can share the .cs file (or export as a package) in the attachment below :)
Title: Re: ApplicationGetAbsoluteUrl
Post by: Maart on February 11, 2022, 04:42:03 AM
here is the .cs file