Referencing Verse files inside of Scene Graph

’ve started learning Scene Graph, and I’m wondering if it’s possible to use regular Verse files with the creative_device class inside a Scene Graph component.

For example, I’m working on a hunger system in a creative_device that contains functions like IncreaseHunger(), GetHunger(), and DecreaseHunger(). I’d like to call these functions from a Scene Graph interactable component when a player interacts with a custom object.

Should I write this logic directly inside the Scene Graph file, or is there a way to reference my existing hunger system?

Currently, when I reference the hunger_system as editable inside the Scene Graph interactable component and try to build, I get the error:

“Referencing devices is not supported within this context.”

Thank you for your help!

1 Like

Hi Kurmay, getting someone from the Verse team to take a look.

1 Like

Thank you Flak!

From one of our engineers:

From one of our engineers:
You can reference the Verse device in the usual way, for example:
@editable
MyDevice : trigger_device = trigger_device{}
When compiling and adding the component to the entity, you can reference the device from the level.

1 Like

Hello Flak, I can confirm that this works with Fortnite’s native Creative devices (e.g., trigger device, item granter, etc.). However, it does not work with other Verse files of type creative_device.

In my case, I created a hunger system using a regular Verse file (not Scene Graph). All the settings and functions, including the UI, are contained in this file. I also made an interactable object using Scene Graph, and I want to call the hunger system functions when interacting with that object.

When I add the hunger system as @editable inside the Scene Graph component file, it compiles successfully, but in the editor it shows that this is not supported within this context.

I could move the logic into the interactable component and call it directly from there, but I don’t think that’s a good idea. I prefer to keep the system split into reusable, easy-to-customize files that I can copy over when needed. On top of that, certain functions such as GetPlayspace()cannot be used inside a Scene Graph component, since it expects a creative_object_interface.

What would be the best way to make this work? I believe Scene Graph has a lot of potential, and I’d like to use it in my projects as much as possible.

Thank you.