Forum rules - please read before posting.

(SOLVED)Custom Action Toggle

edited September 2022 in Technical Q&A

EDIT: Oops, yes I overlooked the constant ID and it works now haha, sorry for the post. :smiley: Delete if you want!

Hi all,

This is probably just something silly but I'm trying to make a simple custom action to enable/disable any object but when I run the custom action it doesn't seem to be working. The Debug.Log goes through correctly but it doesn't affect the object.

It might be because the gameobject I'm trying it on is already in scene so it's changing the prefab? I'm not sure I'm new to all this and trying to learn!

https://pastebin.com/PgtKeL1F

Is it something to do with a constant ID? Thanks guys :)

Comments

  • Actually there seems to be a slight problem where the toggle resets to true every time I restart unity, does anyone know why?

  • And sometimes getting "MissingReferenceException: The variable m_Object of ActionDisableObject doesn't exist anymore." When I try to do AC's Call Event and enable it again later in the game?

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.