Forum rules - please read before posting.

[Bug] Action.FieldToID doesn't always return the new ConstantID value

v1.76.1 (haven't update as I have a bunch of customizations, so not sure if this is fixed in a newer version)

Basically, in Action.cs, line 988 in FieldToID (GameObject field, int _constantID, bool alwaysAssign, bool _isAssetFile)

The function doesn't return the int value of that newly added ConstantID component but instead the ID that was already passed into the function.

Was going insane wondering why my int value didn't seem to be updating with some custom inspector work lol.

Not sure if that's intended but I don't know enough about your systems to think of why it would be.

Comments

  • Confirmed it's still the same way in the latest versions too. And in all of the "ToID" functions in that script.

  • Thanks for the report - I will look into this.

    Is this affecting the behaviour of AC's own Editors, or is it only felt by your custom Inspectors?

  • I'm not sure if it has an effect on any of AC's own tools, though the logic feels like it could. It's just unexpected behavior when utilizing this function from code 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.