You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use an ItemsControl script to spawn a collection of prefabs (make sure the itemtemplate prefab has a commandbinding on it eg - a grid layout of clickable buttons)
Try using it in the UnityEditor - it works fine and the spawned buttons from itemscontrol are clickable and execute the CommandBinding as expected
Try deploying the same to a UWP - the spawned prefabs lose their CommandBinding.
Root Cause
On deeper investigation, it turns out that the gameobject that gets created for the item template prefab is missing the "ExecuteCommand" handler for its click event. This happens because when item template instantuiates gameobjects in editor, it also runs the corresponding "FigureViewBinding" method. However since that method exists in the Editor script, the event handler is never added to the game objects that get created in the UWP.
This is also the case for nested prefabs.
The text was updated successfully, but these errors were encountered:
Repro Steps
Root Cause
On deeper investigation, it turns out that the gameobject that gets created for the item template prefab is missing the "ExecuteCommand" handler for its click event. This happens because when item template instantuiates gameobjects in editor, it also runs the corresponding "FigureViewBinding" method. However since that method exists in the Editor script, the event handler is never added to the game objects that get created in the UWP.
This is also the case for nested prefabs.
The text was updated successfully, but these errors were encountered: