macklebee Posted January 26, 2017 Share Posted January 26, 2017 Based on this post by Phoenix88: http://www.leadwerks.com/werkspace/topic/15629-entitys-childs-start-function-does-not-get-called/#entry104340 and the previous closed bug report from Rick: http://www.leadwerks.com/werkspace/topic/11252-prefab-children-not-getting-scriptstart-called/page__hl__prefab+children Prefabs that have child entity scripts are not calling their Start() functions when loaded via code. The scripts appear to be loaded since the Start() function can be called: prefab = Prefab:Load("Prefabs/Pivot_crawler.pfb") child = prefab:FindChild("Crawler") child.script:Start() Loading a prefab from Map:Load() works but not from Prefab:Load(). It's almost like the 'Prefab.NoStartCall' flag is hardcoded on the child entities. Attaching example application that has a map that loads a prefab consisting of a pivot and a scripted crawler as its child and the exact same prefab next to it loaded via code. PrefabChildTest.zip 1 Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
macklebee Posted January 26, 2017 Author Share Posted January 26, 2017 Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Josh Posted January 26, 2017 Share Posted January 26, 2017 Okay, this has always been this way, but it is easy to change. My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts