Forum rules - please read before posting.

Problem with GameObject parameters after 1.67

Unity 2018.3.11f1, AC 1.67.4

I always update all my live AC projects to the latest version, usually without any hitches, but 1.67 has given me a bit of grief. I have some other issues which I'll try and get round to later, but the major problem is as follows -

In many of my games I have multiple NPCs, and I set their on-screen positions at the start of each scene, based on an in-scene GameObject, usually a Path. Until 1.67 that was all working fine, but since upgrading it's stopped working, and the reason seems to be that the GameObject parameter value is being "lost"

To replicate:

1) Set up a new Asset-based ActionList, with "Use parameters" ticked (my own test also has "Pause Gameplay" selected, Is Skippable ticked, Unfreeze Pause Menu ticked, and Can Run Multiple Instances unticked)

2) Add a GameObject parameter

3) Add a new Action of ActionType = Action List/Set Parameter, and tick "Change Own". (Note that the parameter will be set internally by the ActionList itself, rather than being passed into it by the calling ActionList)

4) Set the parameter to a Scene-based object, such as a Path. Everything looks good. It records the Constant Id, as expected

5) Set the ActionList to be run when the Scene starts

6) Open the Scene, in order to run the ActionList. Everything still looks good, the Constant Id is still showing. Open a different Scene. Everything still looks good. Although the GameObject itself isn't displayed, the Constant Id is still being correctly displayed

7) Close and then re-open the Project

8) Everything no longer looks good. The Constant Id has now disappeared, along with the reference to the GameObject

Comments

  • Apologies for the grief, and thank you for the steps. I shall go through them and see what's going on.

  • edited April 2019

    Recreated. I shall issue a fix presently.

    In the meantime, open ActionParamSet.cs and replace:

    protected int gameObjectConstantID;
    

    with:

    public int gameObjectConstantID;
    
  • edited April 2019

    cool, thanks chris

    i see you've already fixed the problem in 1.67.5, even before i had a chance to make the change myself!

    i'm sure i've said this before, or something like it, but one of the many pleasures of using AC is the absolutely stellar support we all receive

    while everything else in the Asset Store is being deprecated left right and centre, or moving to new "charging models", AC is a veritable beacon of light in a cruel unfriendly universe

    long may it continue

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.