Forum rules - please read before posting.

How to assign ActionList through script?

Happy new year! Hope you all had great holiday season!

I have a custom script and I want to assign an ActionLists for later use in the game.

public ActionListAsset myActionList;
The above allows me to drag and drop the ActionList through the inspector. What I need to do is to assign the ActionList through script. Something like:

public ActionListAsset myActionList;
myActionList = someActionList;
I can't seem to find a way to do this though, is there any way this is achievable?

Comments

  • edited January 2019

    Yes, but this is a C# question, not something specific to AC. What ActionList are you trying to assign, exactly?

  • Sorry about that, I'm new to Unity / AC and sometimes I can't tell if problem is more Unity or AC related!

    From what I understand you could use Resources folder to load the files in, or write some editor script to grab the files. So far I've basically settled on assigning ActionLists through the Inspector. Thanks for the reply though!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.