playMaker

Author Topic: Stripping code level @medium or high creates pile of errors  (Read 1049 times)

Broken Stylus

  • Beta Group
  • Hero Member
  • *
  • Posts: 773
Stripping code level @medium or high creates pile of errors
« on: February 03, 2021, 09:28:58 AM »
I have an error at the launch of the app that blocks literally everything when building an APK on medium or high code stripping levels.

Code: [Select]
433 467 Error Unity MissingMethodException: Default constructor not found for type HutongGames.PlayMaker.Actions.MissingAction
433 467 Error Unity   at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) [0x00000] in <00000000000000000000000000000000>:0
433 467 Error Unity   at System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00000] in <00000000000000000000000000000000>:0
433 467 Error Unity   at System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00000] in <00000000000000000000000000000000>:0
433 467 Error Unity   at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) [0x00000] in <00000000000000000000000000000000>:0
433 467 Error Unity   at System.Activator.CreateInstance (System.Type type) [0x00000] in <00000000000000000000000000000000>:0
433 467 Error Unity   at HutongGames.PlayMaker.ActionData.CreateAction (HutongGames.PlayMaker.ActionData+Context context, Sy

This repeats 16 times before the main scene launches (or more precisely tries to since no Playmaker code seems to run) and happens on Android but might likely happen on iOS too. Any idea why this fails?

The stripping shaves off over some 20Mb on the build size and that's most appreciated, but now I'm wondering if Unity isn't just dunking the whole stash of Playmaker DLLs in the process.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: Stripping code level @medium or high creates pile of errors
« Reply #1 on: February 03, 2021, 04:17:35 PM »
From the error, it looks like stripping is removing action scripts.
I'll take a look at this and do some tests.

FWIW, I've been making WebGL builds recently for new samples and getting them under 6MB (with PlayMaker).

Broken Stylus

  • Beta Group
  • Hero Member
  • *
  • Posts: 773
Re: Stripping code level @medium or high creates pile of errors
« Reply #2 on: February 07, 2021, 12:38:06 PM »
I don't know if I'm the only one having this problem but if you have a few suggestions to try to circumvent this issue, I could do a few builds after implementing them and see what happens then.
The 16 repetitions might be related to some initialization but clearly some actions are completely left out of the build so nothing can start properly, and that right from the primary script in my Main scene.

milad132

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Stripping code level @medium or high creates pile of errors
« Reply #3 on: April 09, 2023, 10:54:19 AM »
Hi all,

Was a solution figured out for this? I am having the same problem and making my way through the forum, so any help would be appreciated.

Thanks!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Stripping code level @medium or high creates pile of errors
« Reply #4 on: April 09, 2023, 01:26:17 PM »
Hi.
If you are using Get/Set Properties actions that is probably the cause of the issue.

You can solve it by using dedicated actions, or use Linker Wizard