How do I serialize scriptable object references?

  • December 11, 2018 at 17:55 #24214
    Pilgrim
    Participant

    I would like to reference a scriptable object in my AI. However,

    [ApexSerialization] ScriptableObjectType o;

    does not give me a reference field. Is there a way to do this?

    December 12, 2018 at 11:06 #24225
    Geminior
    Keymaster

    There is no support for Unity object references I’m afraid.
    So you will need to employ some sort of manager to hold those and then store a key in the AI (e.g. an enum, int or string) with which you can query the manager for the actual object.

You must be logged in to reply to this topic.