When I use Check or Change Variable node to Check or Change Variable on a spawned prefabs does I always have to store it in like "Selected data" for example and only then I can Check or Change Variable in that spawned prefabs?
Or I can also change it via select 'Game Object/prefabs'.
I ask this question because I can not Check or Change Variable via select 'Game Object/prefabs'.
So just to be sure this is not a bug and I just do it wrong!
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sorry for didn't say it clearly enough because English is not my native.
What I mean is when I use the "Spawn prefabs" node there is an option to store that prefabs data into the "Selected data".
Does it require me to store that prefabs into the "Selected data" first before I can use it in the "Check/Change Variable" node or not?
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Because I can't check or change the variable that prefabs though the object selection directly.
So I have to store it in "Selected data" to be able to use it!
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
And on that 'Object variables' I'm not set any variables for it.
And when I check for variable I uncheck the option 'Exists'
Make sure you're using the Object variable origin when accessing the spawned prefab's variables.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Hmm! I think I know something is wrong!
When I spawn an object then change its variable it working.
But when I use the Input key to check and change the variable is not working.
Are you try to test it with this? Spawn an object then change it variable, it works as you expected.
But when you use the input key like "Mouse" to check and change it variable every fixed frame, then it not work.
Why is that?
I will attach my schematic here if you want to take a look to see what did I do wrong.
https://drive.google.com/file/d/17hLqF7sooFOcPgRsmPeY-mG_fs7M57nr/view?usp=sharing
Disable Clear Prefabs in your schematic's Settings node. If it's enabled, the references to spawned prefabs will be removed when running the schematic again, and since your Spawn Prefab node isn't used in the node chain before accessing the variables there's no chance it can ever be used.
That's why using selected data worked, because that isn't cleared in your setup.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Thank! I didn't even look into that setting :D