Hi Chris,Im wondering if there will be an issue /problem with my approach to using ActionList,
AC is great and more and more i integrate my code with it, so for running Actions I figured out that great way to have tidy files and all i one place, I use one Actionlist file with 140 Action by now, some of them are connected some are just one Action, and i call for script appropriate Action number and it runs as normal, so:
1. Is this approach correct?
2. When can be performance issues with this one file?
3. I have this ActionList connected to my game controller as Cutscene script then from script i call it by:
AC.AdvGame.RunActionListAsset(this.GetComponent<Cutscene>().assetFile, 39, true);
is it correct? and if theres better way to point this asset file in code?
Of course i use lots of Action list files that get run by AC, but with running Actions form script i mainly use one file, what do you think?
Comments
myActionListAsset.RunFromIndex (39);
Is equivalent to:
AdvGame.RunActionListAsset (myActionListAsset, 39, true);
However, when an ActionList asset runs, it must first "download" itself into the scene by having it converted to a Cutscene. This means that all of its Actions are copied, even if not all of them are going to be run for that instance.
You might get a performance spike at that moment, but whether its visible depends on how many Actions, the speed of the platform, etc so it's hard to judge whether its an issue or not.
To have an ActionList asset included that you call through script, just create a Cutscene in a scene, and make an ActionList: Run Action that refers to that asset. The Cutscene itself will never be run, so it doesn't matter if the Action is connected to anything else - it just being referred to in the scene will be enough to have it listed in the Speech Manager.