Araziel
Topic Author
Posts: 3
Joined: 02 Feb 2025, 11:58

Help with Set Data Context

10 May 2025, 14:08

Hi!
I'm being really stupid right now.

The following:
I have a View, a GameMode and a ViewController

I want to set the Data Context (ViewController) in my GameMode.
However, this does not work. What am I doing wrong?

View:
Image

GameMode:
Image

ViewController with Test as variable:
Image
 
Rheguilar
Posts: 1
Joined: 06 Nov 2024, 09:24

Re: Help with Set Data Context

11 May 2025, 09:16

Have you tried setting the DataContext directly in the GameMode and making sure it’s properly passed to the View?
Running your store well will make you happy to see Monkey Mart's lively environment and busy activity.
 
User avatar
hcpizzi
Site Admin
Posts: 368
Joined: 09 Feb 2012, 12:40

Re: Help with Set Data Context

12 May 2025, 11:51

Hi,

It's hard to tell without debugging. Off the top of my head, I would first check that the object you're setting the Test property value on is actually the same as the one set as DataContext (you can print the names of the objects on screen from Blueprint), and that the event that sets the value is actually being called (again, you can just print to screen from Blueprint).
 
User avatar
jsantos
Site Admin
Posts: 4823
Joined: 20 Jan 2012, 17:18
Contact:

Re: Help with Set Data Context

12 May 2025, 15:08

Also you could start with one of our examples, that are already working and provide a valid Data Context and start modifying from it.

Who is online

Users browsing this forum: Bing [Bot] and 3 guests