Reply To: Set Property on an instantiated GameObject

NodeCanvas Forums Support Set Property on an instantiated GameObject Reply To: Set Property on an instantiated GameObject


I have been playing around and it seems to be a bug (or a happy coincidence in my case).

If I first assign the prefab (which is on the blackboard) on which the property I want to set resides and then change it to a dynamic var, it initially allows it, but as soon as I press play (or re-validate the graph), the dynamic var changes back to the prefab on the blackboard. I have to do this little dance of changing the target, close the graph editor window, save and re-open it to have the dynamic var stick.

I guess it works because it’s the same property, on the same script, but on the instance of the prefab, instead of the prefab itself.

I’m guessing NodeCanvas isn’t really designed for this specific case. I figure there are multiple ways to achieve what I want to do, but I was hoping this would be an option to allow some more “on the go” spawning of objects and setting some variables on the instance, without manually looking up stuff in the scene.

Perhaps it is still possible (to a certain degree), but I just haven’t properly figured it out yet. 🙂