playMaker

Author Topic: Can Playmaker code be distributed in asset bundles? [SOLVED]  (Read 1428 times)

davidosullivan

  • Playmaker Newbie
  • *
  • Posts: 10
    • View Profile
Can Playmaker code be distributed in asset bundles? [SOLVED]
« on: December 02, 2015, 07:24:48 PM »
Hi there,

I have tried asking this in another way in the general forum, but nobody seems to know the answer...

I know that with the AppStore, if you want to expand your game using Asset Bundles that the user downloads at some point after they have the original executable, you are not allowed to include any scripts in the AssetBundle, it can only be Data. So Scenes are ok but any extra C# scripts are apparently not allowed.

So what I want to know before I buy is, is Playmaker an interface for generating scripts, or is a component that generates code at runtime, based on its settings and data.

If its the second option, then a scene in an asset bundle, could in theory be completely coded in Playmaker and do almost anything possible in Unity, and the user would still only have to download the asset bundle, they would not have to re-install the app.

Is this the case? If so why is this not touted as a feature, thats pretty HUGE I'd say...
« Last Edit: February 10, 2016, 03:07:34 PM by Alex Chouls »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3202
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Can Playmaker code be distributed in asset bundles?
« Reply #1 on: December 02, 2015, 10:07:55 PM »
PlayMakerFSMs can indeed be included in asset bundles, allowing you to add new "scripts" to deployed apps. Yes this is a pretty huge feature that we should probably advertise more! :)

Note, you cannot use actions in asset bundles that weren't in the original build. But it's still a powerful way to add new behaviours to apps without having to submit an update etc.


chinper

  • Playmaker Newbie
  • *
  • Posts: 13
    • View Profile
Re: Can Playmaker code be distributed in asset bundles? [SOLVED]
« Reply #2 on: March 07, 2016, 11:07:51 PM »
Hi I don't really get it about adding new scripts into the asset bundles. So if the original build doesn't have the script or we have modified the playmaker action scripts, will it still load fine with the original build?

I am facing issue as my windows build (older version) trying to load the scene asset bundles that has modified script and they don't work. Is there a way not to update the whole build?

memetic arts

  • Full Member
  • ***
  • Posts: 140
    • View Profile
Re: Can Playmaker code be distributed in asset bundles? [SOLVED]
« Reply #3 on: March 30, 2016, 12:36:58 PM »
I agree, PlayMaker is a great way to deliver scripted functionality via AssetBundles, and I'm using that quite extensively in an app I'm about to launch, in conjuction with ArrayMaker/DataMaker and XML.

The point that Alex is making, I believe, is that you can have instances of scripts attached to objects in your AssetBundles, as long as the script on which the instantiation is based is included in your "hosting" project.  So you can use the same script in AssetBundles, which may use variables to alter the bundled content, but the core script has to be present in the base file. 

And, in case your bundle contains an entire scene (as mine does), you'll need to instantiate the objects/components via prefabs.

Hope that helped.