Forum rules - please read before posting.

Request: Find global references for the Variables component

edited January 30 in Technical Q&A

I love the idea of having variables associated with prefabs using the Variables component rather than needing to keep a myriad of global variables around. But since these variables doesn't have the "Find global references" feature found in global variables, it makes it very error prone to work with them in a big project.

This feature has been on top of my list ever since the introduction of the Variables component and I'm sure a lot of us would love it. :smile:

Thanks a bunch!


  • A "Find references" option already exists, but I don't see that a "Find global references" option would be possible, as the Variables component must still be part of the scene file. The prefab itself should not be referenced - only scene instances.

    You can, however, attach a Constant ID component to the scene instance - and find global references made to that. Though unfortunately, there is a bug with this feature that I'll be addressing in the next update.

  • I see how a variables component on a scene instance can be helpful for getting rid of local variables on a scene. But I thought it was also possible to put a variables component on a prefab with a Constant Id (such as a player or an NPC that is used across scenes), and have all its associated vars contained there instead of global variables. Perhaps I misunderstood?

  • edited January 31

    Each scene instance of a prefab is treated as a separate entity. Prefabbing is useful for e.g. repeated game logic, but the prefab itself won't be referenced by logic.

  • I see, I misunderstood the feature.

    I'll suggest another (simple) way if solving the problem I was having in a separate thread :)
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.
Do NOT follow this link or you will be banned from the site!